diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index da2f5e215..a1ed01139 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -39610,7 +39610,7 @@ toughness=1 name=Form of the Dragon auto=@each my upkeep:damage:5 target(creature,player) 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. mana={4}{R}{R}{R} type=Enchantment @@ -64668,7 +64668,7 @@ toughness=2 [/card] [card] name=Magus of the Moat -auto=lord(creature[-flying]) cantattack +auto=lord(creature) flyersonly text=Creatures without flying can't attack. mana={2}{W}{W} type=Creature @@ -69545,7 +69545,7 @@ toughness=1 [/card] [card] name=Moat -auto=lord(creature[-flying]) cantattack +auto=lord(creature) flyersonly text=Creatures without flying can't attack. mana={2}{W}{W} type=Enchantment @@ -106044,7 +106044,8 @@ toughness=2 name=Stormtide Leviathan abilities=islandwalk 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. mana={5}{U}{U}{U} type=Creature @@ -109798,7 +109799,7 @@ type=Legendary Land [/card] [card] 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. mana={3}{W}{U} type=Enchantment @@ -111800,7 +111801,7 @@ type=Sorcery [card] name=Thoughtseize 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. mana={B} type=Sorcery diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index 98224a8e0..b72b67f08 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -254,7 +254,8 @@ class Constants DETHRONE = 132, OVERLOAD = 133, 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_M = 'M', //Mythics diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index cdbfc47b0..f354162a1 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -3982,6 +3982,8 @@ int AbilityFactory::abilityEfficiency(MTGAbility * a, Player * p, int mode, Targ badAbilities[(int)Constants::WEAK] = true; badAbilities[(int)Constants::NOLIFEGAIN] = true; badAbilities[(int)Constants::NOLIFEGAINOPPONENT] = true; + badAbilities[(int)Constants::MUSTBLOCK] = true; + badAbilities[(int)Constants::FLYERSONLY] = true; if (AInstantBasicAbilityModifierUntilEOT * abi = dynamic_cast(a)) { diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 432f8e965..de9b36f6f 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -637,6 +637,8 @@ int MTGCardInstance::canAttack() { if (basicAbilities[(int)Constants::CANTATTACK]) return 0; + if (basicAbilities[(int)Constants::FLYERSONLY] && !basicAbilities[(int)Constants::FLYING]) + return 0; if (tapped) return 0; if (hasSummoningSickness()) diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 16aa9eebf..5d40a9513 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -165,7 +165,8 @@ const char* Constants::MTGBasicAbilities[] = { "mustblock", "dethrone", "overload", - "shackler" + "shackler", + "flyersonly" }; map Constants::MTGBasicAbilitiesMap;