mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-15 15:02:16 -07:00
* Untangle the card_info.cpp mess and split into individual files. Took 53 minutes * Auto-lint was disabled and my pre-commit hook didn't fire. Oh well. Took 3 minutes * Fix oracle. Took 35 seconds * Lint! Took 20 seconds * Fix tests. Took 3 minutes * CMakeLists.txt: The reason why I have to disable auto-lint. Took 2 minutes * dbconverter. Took 3 minutes * Oracle again. Took 3 minutes * dbconverter again. Took 3 minutes * dbconverter again again. Took 2 minutes * More fixes. Took 4 minutes Took 21 seconds * Everything needs everything. Took 3 minutes * Everything means everything. Took 4 minutes * All the tests. Took 4 minutes * I hate everything about this. Took 3 minutes --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
73 lines
1.6 KiB
C++
73 lines
1.6 KiB
C++
#ifndef COCKATRICE_CARD_RELATION_H
|
|
#define COCKATRICE_CARD_RELATION_H
|
|
|
|
#include "card_relation_type.h"
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
|
|
class CardRelation : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
private:
|
|
QString name;
|
|
CardRelationType attachType;
|
|
bool isCreateAllExclusion;
|
|
bool isVariableCount;
|
|
int defaultCount;
|
|
bool isPersistent;
|
|
|
|
public:
|
|
explicit CardRelation(const QString &_name = QString(),
|
|
CardRelationType _attachType = CardRelationType::DoesNotAttach,
|
|
bool _isCreateAllExclusion = false,
|
|
bool _isVariableCount = false,
|
|
int _defaultCount = 1,
|
|
bool _isPersistent = false);
|
|
|
|
const QString &getName() const
|
|
{
|
|
return name;
|
|
}
|
|
CardRelationType getAttachType() const
|
|
{
|
|
return attachType;
|
|
}
|
|
bool getDoesAttach() const
|
|
{
|
|
return attachType != CardRelationType::DoesNotAttach;
|
|
}
|
|
bool getDoesTransform() const
|
|
{
|
|
return attachType == CardRelationType::TransformInto;
|
|
}
|
|
|
|
QString getAttachTypeAsString() const
|
|
{
|
|
return cardAttachTypeToString(attachType);
|
|
}
|
|
|
|
bool getCanCreateAnother() const
|
|
{
|
|
return !getDoesAttach();
|
|
}
|
|
bool getIsCreateAllExclusion() const
|
|
{
|
|
return isCreateAllExclusion;
|
|
}
|
|
bool getIsVariable() const
|
|
{
|
|
return isVariableCount;
|
|
}
|
|
int getDefaultCount() const
|
|
{
|
|
return defaultCount;
|
|
}
|
|
bool getIsPersistent() const
|
|
{
|
|
return isPersistent;
|
|
}
|
|
};
|
|
|
|
#endif // COCKATRICE_CARD_RELATION_H
|