some bug fixes

fix where the copier is treated as the same copied card, also fixes the
display ability of momir (forced), disabled reveal for AI if aicode is
not found (should add alternate for ai).
This commit is contained in:
Anthony Calosa
2017-02-06 21:48:41 +08:00
parent 2dc6c62acb
commit 831c8f73b0
7 changed files with 49 additions and 25 deletions

View File

@@ -18,8 +18,16 @@ Token::Token(string _name, MTGCardInstance * source, int _power, int _toughness)
rarity = Constants::RARITY_T;
name = _name;
if (name.size() && name[0] >= 97 && name[0] <= 122) name[0] -= 32; //Poor man's camelcase. We assume strings we get are either Camelcased or lowercase
setMTGId(-source->getMTGId());
setId = source->setId;
if(source->isACopier && source->copiedSetID)
{
setMTGId(-source->copiedID);
setId = source->copiedSetID;
}
else
{
setMTGId(-source->getMTGId());
setId = source->setId;
}
model = this;
data = this;
owner = source->owner;