Added/fixed primitives, updated the "missing_cards_by_sets" folder, improved all cards with replicate (now they use a special version of multikicker but they don't count as kicked spell), improved all cards with "fizzle" and "fizzleto" ability and improved engine for "fizzle" and "nofizzle" ability (e.g. now it's possible to grant a card the nofizzle ability on stack), added new keyword "mycolnum" to count the number colors of a card.

This commit is contained in:
Vittorio Alfieri
2021-08-31 20:06:33 +02:00
parent 45de20c8d3
commit 54d0c32035
28 changed files with 455 additions and 616 deletions
+5 -5
View File
@@ -526,7 +526,7 @@ int MTGPutInPlayRule::reactToClick(MTGCardInstance * card)
while(previousManaPool->canAfford(withKickerCost,card->has(Constants::ANYTYPEOFMANA)))
{
withKickerCost->add(withKickerCost->getKicker());
if(!card->basicAbilities[Constants::HASNOKICKER]) card->kicked += 1; //Some kicker costs are not a real kicker (e.g. Fuse cost).
if(!card->basicAbilities[Constants::HASNOKICKER] || card->basicAbilities[Constants::HASREPLICATE]) card->kicked += 1; //Some kicker costs are not a real kicker (e.g. Fuse cost) or they are a replicate cost (eg. "Vacuumelt").
}
for(int i = 0;i < card->kicked;i++)
player->getManaPool()->pay(card->getManaCost()->getKicker());
@@ -537,7 +537,7 @@ int MTGPutInPlayRule::reactToClick(MTGCardInstance * card)
{
player->getManaPool()->pay(card->getManaCost()->getKicker());
payResult = ManaCost::MANA_PAID_WITH_KICKER;
if(!card->basicAbilities[Constants::HASNOKICKER]) card->kicked = 1; //Some kicker costs are not a real kicker (e.g. Fuse cost).
if(!card->basicAbilities[Constants::HASNOKICKER] || card->basicAbilities[Constants::HASREPLICATE]) card->kicked = 1; //Some kicker costs are not a real kicker (e.g. Fuse cost) or they are a replicate cost (eg. "Vacuumelt").
card->alternateCostPaid[ManaCost::MANA_PAID_WITH_KICKER] = 1;
}
delete withKickerCost;
@@ -681,7 +681,7 @@ int MTGKickerRule::reactToClick(MTGCardInstance * card)
{
if (!game->targetListIsSet(card))
{
if(!card->basicAbilities[Constants::HASNOKICKER]) card->kicked = 1; //Some kicker costs are not a real kicker (e.g. Fuse cost).
if(!card->basicAbilities[Constants::HASNOKICKER] || card->basicAbilities[Constants::HASREPLICATE]) card->kicked = 1; //Some kicker costs are not a real kicker (e.g. Fuse cost) or they are a replicate cost (eg. "Vacuumelt").
return 0;
}
}
@@ -704,7 +704,7 @@ int MTGKickerRule::reactToClick(MTGCardInstance * card)
while(previousManaPool->canAfford(withKickerCost,card->has(Constants::ANYTYPEOFMANA)))
{
withKickerCost->add(withKickerCost->getKicker());
if(!card->basicAbilities[Constants::HASNOKICKER]) card->kicked += 1; //Some kicker costs are not a real kicker (e.g. Fuse cost).
if(!card->basicAbilities[Constants::HASNOKICKER] || card->basicAbilities[Constants::HASREPLICATE]) card->kicked += 1; //Some kicker costs are not a real kicker (e.g. Fuse cost) or they are a replicate cost (eg. "Vacuumelt").
}
for(int i = 0;i < card->kicked;i++)
player->getManaPool()->pay(card->getManaCost()->getKicker());
@@ -715,7 +715,7 @@ int MTGKickerRule::reactToClick(MTGCardInstance * card)
{
player->getManaPool()->pay(card->getManaCost()->getKicker());
payResult = ManaCost::MANA_PAID_WITH_KICKER;
if(!card->basicAbilities[Constants::HASNOKICKER]) card->kicked = 1; //Some kicker costs are not a real kicker (e.g. Fuse cost).
if(!card->basicAbilities[Constants::HASNOKICKER] || card->basicAbilities[Constants::HASREPLICATE]) card->kicked = 1; //Some kicker costs are not a real kicker (e.g. Fuse cost) or they are a replicate cost (eg. "Vacuumelt").
card->alternateCostPaid[ManaCost::MANA_PAID_WITH_KICKER] = 1;
}
delete withKickerCost;