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
+4 -18
View File
@@ -64,6 +64,7 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to
bypassTC = false;
discarded = false;
copiedID = getId();
copiedSetID = 0;
LKIpower = power;
LKItoughness = toughness;
cardistargetted = 0;
@@ -143,6 +144,7 @@ void MTGCardInstance::copy(MTGCardInstance * card)
spellTargetType = data->spellTargetType;
alias = data->alias;
copiedID = card->copiedID;
copiedSetID = card->setId;
doubleFaced = data->doubleFaced;
AICustomCode = data->AICustomCode;
CrewAbility = data->CrewAbility;
@@ -156,25 +158,9 @@ void MTGCardInstance::copy(MTGCardInstance * card)
int castMethodBackUP = this->castMethod;
mtgid = source->getId();
MTGCardInstance * oldStored = this->storedSourceCard;
//test copy filtered
/*cardsAbilitiesFilter.clear();
for(unsigned int i = 0;i < card->cardsAbilities.size();i++)
{
MTGAbility * a = dynamic_cast<MTGAbility *>(card->cardsAbilities[i]);
if(a && a->source == card)
{
cardsAbilitiesFilter.push_back(a);
}
}*/
if(observer->players[1]->playMode == Player::MODE_TEST_SUITE)
mtgid = backupid; // there must be a way to get the token id...
else
{
mtgid = card->getMTGId(); ///////////////////////////////////////////////////
setId = card->setId; // Copier/Cloner cards produces the same token...//
rarity = card->getRarity(); ///////////////////////////////////////////////////
}
mtgid = backupid; // found a way :)
castMethod = castMethodBackUP;
backupTargets = this->backupTargets;
storedCard = oldStored;