Added / fixed primitives from ONE set, fixed Treasure name in all sets and primitives, updated missing cards by sets list, improved token creator ability by trying to retrieve the token id from the same set of source card (e.g. Urza's Saga), improved toxic ability adding a new target chooser "hastoxic" and adding a new keyword "toxicity" to retrieve the toxic amount of card.

This commit is contained in:
Vittorio Alfieri
2023-06-18 23:23:51 +02:00
parent 2ca092090d
commit 3b05932a8b
24 changed files with 487 additions and 295 deletions

View File

@@ -583,6 +583,33 @@ int MTGCardInstance::has(int basicAbility)
return basicAbilities[basicAbility];
}
//Return the toxicity of card
int MTGCardInstance::getToxicity()
{
int toxicity = 0;
if(has(Constants::POISONTOXIC))
toxicity = 1;
else if(has(Constants::POISONTWOTOXIC))
toxicity = 2;
else if(has(Constants::POISONTHREETOXIC))
toxicity = 3;
else if(has(Constants::POISONFOURTOXIC))
toxicity = 4;
else if(has(Constants::POISONFIVETOXIC))
toxicity = 5;
else if(has(Constants::POISONSIXTOXIC))
toxicity = 6;
else if(has(Constants::POISONSEVENTOXIC))
toxicity = 7;
else if(has(Constants::POISONEIGHTTOXIC))
toxicity = 8;
else if(has(Constants::POISONNINETOXIC))
toxicity = 9;
else if(has(Constants::POISONTENTOXIC))
toxicity = 10;
return toxicity;
}
ManaCost* MTGCardInstance::getReducedManaCost()
{
return &reducedCost;