deck editor

This commit is contained in:
Max-Wilhelm Bruker 2009-06-01 21:55:41 +02:00
parent 9a277ccccf
commit 3502ec80e4
8 changed files with 304 additions and 86 deletions

View file

@ -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))