mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-11 08:34:52 -07:00
deck editor
This commit is contained in:
parent
9a277ccccf
commit
3502ec80e4
8 changed files with 304 additions and 86 deletions
|
|
@ -28,6 +28,35 @@ CardInfo::~CardInfo()
|
|||
delete pixmap;
|
||||
}
|
||||
|
||||
QString CardInfo::getMainCardType() const
|
||||
{
|
||||
QString result = getCardType();
|
||||
/*
|
||||
Legendary Artifact Creature - Golem
|
||||
Instant // Instant
|
||||
*/
|
||||
|
||||
int pos;
|
||||
if ((pos = result.indexOf('-')) != -1)
|
||||
result.remove(pos, result.length());
|
||||
if ((pos = result.indexOf("//")) != -1)
|
||||
result.remove(pos, result.length());
|
||||
result = result.simplified();
|
||||
/*
|
||||
Legendary Artifact Creature
|
||||
Instant
|
||||
*/
|
||||
|
||||
if ((pos = result.lastIndexOf(' ')) != -1)
|
||||
result = result.mid(pos + 1);
|
||||
/*
|
||||
Creature
|
||||
Instant
|
||||
*/
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void CardInfo::addEdition(const QString &edition)
|
||||
{
|
||||
if (!editions.contains(edition))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue