fix flying and multiple moat in play

putrid imp that gains temporary flying cant attack if the opponent has
multiple moat in play, this should fix it.
This commit is contained in:
Anthony Calosa
2016-07-23 09:45:12 +08:00
parent 007010067b
commit fe577d9dd0
5 changed files with 15 additions and 8 deletions
+7 -6
View File
@@ -39610,7 +39610,7 @@ toughness=1
name=Form of the Dragon name=Form of the Dragon
auto=@each my upkeep:damage:5 target(creature,player) auto=@each my upkeep:damage:5 target(creature,player)
auto=@each end:lifeset:5 auto=@each end:lifeset:5
auto=lord(creature[-flying]|opponentBattlefield) cantattack auto=lord(creature|opponentBattlefield) flyersonly
text=At the beginning of your upkeep, Form of the Dragon deals 5 damage to target creature or player. -- At the beginning of each end step, your life total becomes 5. -- Creatures without flying can't attack you. text=At the beginning of your upkeep, Form of the Dragon deals 5 damage to target creature or player. -- At the beginning of each end step, your life total becomes 5. -- Creatures without flying can't attack you.
mana={4}{R}{R}{R} mana={4}{R}{R}{R}
type=Enchantment type=Enchantment
@@ -64668,7 +64668,7 @@ toughness=2
[/card] [/card]
[card] [card]
name=Magus of the Moat name=Magus of the Moat
auto=lord(creature[-flying]) cantattack auto=lord(creature) flyersonly
text=Creatures without flying can't attack. text=Creatures without flying can't attack.
mana={2}{W}{W} mana={2}{W}{W}
type=Creature type=Creature
@@ -69545,7 +69545,7 @@ toughness=1
[/card] [/card]
[card] [card]
name=Moat name=Moat
auto=lord(creature[-flying]) cantattack auto=lord(creature) flyersonly
text=Creatures without flying can't attack. text=Creatures without flying can't attack.
mana={2}{W}{W} mana={2}{W}{W}
type=Enchantment type=Enchantment
@@ -106044,7 +106044,8 @@ toughness=2
name=Stormtide Leviathan name=Stormtide Leviathan
abilities=islandwalk abilities=islandwalk
auto=lord(land) transforms((island)) auto=lord(land) transforms((island))
auto=lord(creature[-flying;-islandwalk]) cantattack auto=lord(creature[-islandwalk]) cantattack
auto=lord(creature) flyersonly
text=Islandwalk -- All lands are Islands in addition to their original type. -- Creatures without flying or islandwalk can't attack. text=Islandwalk -- All lands are Islands in addition to their original type. -- Creatures without flying or islandwalk can't attack.
mana={5}{U}{U}{U} mana={5}{U}{U}{U}
type=Creature type=Creature
@@ -109798,7 +109799,7 @@ type=Legendary Land
[/card] [/card]
[card] [card]
name=Teferi's Moat name=Teferi's Moat
auto=chooseacolor lord(creature[chosencolor&-flying]|opponentBattlefield) cantattack chooseend auto=chooseacolor lord(creature[chosencolor]|opponentBattlefield) flyersonly chooseend
text=As Teferi's Moat enters the battlefield, choose a color. -- Creatures of the chosen color without flying can't attack you. text=As Teferi's Moat enters the battlefield, choose a color. -- Creatures of the chosen color without flying can't attack you.
mana={3}{W}{U} mana={3}{W}{U}
type=Enchantment type=Enchantment
@@ -111800,7 +111801,7 @@ type=Sorcery
[card] [card]
name=Thoughtseize name=Thoughtseize
target=player target=player
auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-land]|reveal) moveto(ownerhand) and!( transforms((,newability[reject],newability[all(*[-land]|reveal) moveto(ownerhand) and!(reject)!])) oneshot )! optiononeend optiontwo name(look) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed transforms((,newability[life:-2 controller])) oneshot afterrevealedend revealend auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-land]|reveal) moveto(ownerhand) and!( transforms((,newability[reject],newability[all(*[-land]|reveal) moveto(ownerhand)])) oneshot )! optiononeend optiontwo name(look) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend afterrevealed transforms((,newability[life:-2 controller])) oneshot afterrevealedend revealend
text=Target player reveals his or her hand. You choose a nonland card from it. That player discards that card. You lose 2 life. text=Target player reveals his or her hand. You choose a nonland card from it. That player discards that card. You lose 2 life.
mana={B} mana={B}
type=Sorcery type=Sorcery
+2 -1
View File
@@ -254,7 +254,8 @@ class Constants
DETHRONE = 132, DETHRONE = 132,
OVERLOAD = 133, OVERLOAD = 133,
SHACKLER = 134, SHACKLER = 134,
NB_BASIC_ABILITIES = 135, FLYERSONLY = 135,//can attack only if it has flying
NB_BASIC_ABILITIES = 136,
RARITY_S = 'S', //Special Rarity RARITY_S = 'S', //Special Rarity
RARITY_M = 'M', //Mythics RARITY_M = 'M', //Mythics
+2
View File
@@ -3982,6 +3982,8 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ
badAbilities[(int)Constants::WEAK] = true; badAbilities[(int)Constants::WEAK] = true;
badAbilities[(int)Constants::NOLIFEGAIN] = true; badAbilities[(int)Constants::NOLIFEGAIN] = true;
badAbilities[(int)Constants::NOLIFEGAINOPPONENT] = true; badAbilities[(int)Constants::NOLIFEGAINOPPONENT] = true;
badAbilities[(int)Constants::MUSTBLOCK] = true;
badAbilities[(int)Constants::FLYERSONLY] = true;
if (AInstantBasicAbilityModifierUntilEOT * abi = dynamic_cast<AInstantBasicAbilityModifierUntilEOT *>(a)) if (AInstantBasicAbilityModifierUntilEOT * abi = dynamic_cast<AInstantBasicAbilityModifierUntilEOT *>(a))
{ {
+2
View File
@@ -637,6 +637,8 @@ int MTGCardInstance::canAttack()
{ {
if (basicAbilities[(int)Constants::CANTATTACK]) if (basicAbilities[(int)Constants::CANTATTACK])
return 0; return 0;
if (basicAbilities[(int)Constants::FLYERSONLY] && !basicAbilities[(int)Constants::FLYING])
return 0;
if (tapped) if (tapped)
return 0; return 0;
if (hasSummoningSickness()) if (hasSummoningSickness())
+2 -1
View File
@@ -165,7 +165,8 @@ const char* Constants::MTGBasicAbilities[] = {
"mustblock", "mustblock",
"dethrone", "dethrone",
"overload", "overload",
"shackler" "shackler",
"flyersonly"
}; };
map<string,int> Constants::MTGBasicAbilitiesMap; map<string,int> Constants::MTGBasicAbilitiesMap;