From 14d8d65de0983b977372dc7c1667c02a5bec695e Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 10 Aug 2016 07:31:15 +0800 Subject: [PATCH] asflash spellmastery is for alternate cost, added asflash... so cards that find cards with flash don't find asflash... --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 19 ++++++++----------- projects/mtg/include/MTGDefinitions.h | 3 ++- projects/mtg/src/MTGDefinitions.cpp | 3 ++- projects/mtg/src/MTGRules.cpp | 8 ++++---- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index aa175272a..d874aff17 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -2600,7 +2600,7 @@ toughness=0 [card] name=Aluren auto=lord(creature[manacost<=3]|hand,exile,graveyard) zerocast -auto=lord(creature[manacost<=3]|hand,exile,graveyard) spellmastery +auto=lord(creature[manacost<=3]|hand,exile,graveyard) asflash text=Any player may play creature cards with converted mana cost 3 or less without paying their mana cost and as though they had flash. mana={2}{G}{G} type=Enchantment @@ -83557,9 +83557,7 @@ toughness=4 [card] name=Quick Sliver abilities=flash -auto=lord(sliver|myhand) flash -auto=lord(sliver|opponenthand) flash -auto=lord(sliver|library,graveyard,exile) spellmastery +auto=lord(sliver|hand,library,graveyard,exile) asflash text=Flash -- Any player may play Sliver cards as though they had flash. mana={1}{G} type=Creature @@ -85170,7 +85168,7 @@ toughness=3 name=Rattlechains abilities=flash, flying auto=target(spirit) hexproof ueot -auto=lord(spirit|myhand,mylibrary,mygraveyard,myexile) spellmastery +auto=lord(spirit|myhand,mylibrary,mygraveyard,myexile) asflash text=Flash -- Flying -- When Rattlechains enters the battlefield, target Spirit gains hexproof until end of turn. -- You may cast Spirit spells as though they had flash. mana={1}{U} type=Creature @@ -96260,8 +96258,7 @@ toughness=2 [card] name=Shimmer Myr abilities=flash -auto=lord(artifact|myhand) flash -auto=lord(artifact|mylibrary,mygraveyard,myexile) spellmastery +auto=lord(artifact|myhand,mylibrary,mygraveyard,myexile) asflash text=Flash -- You may cast artifact cards as though they had flash. mana={3} type=Artifact Creature @@ -118479,7 +118476,7 @@ toughness=2 [/card] [card] name=Vedalken Orrery -auto=lord(*[-land]|myhand,mylibrary,mygraveyard,myexile) spellmastery +auto=lord(*[-land]|myhand,mylibrary,mygraveyard,myexile) asflash text=You may cast nonland cards as though they had flash. mana={4} type=Artifact @@ -118981,7 +118978,7 @@ type=Enchantment [/card] [card] name=Vernal Equinox -auto=lord(*[creature;enchantment]|hand,library,graveyard,exile) spellmastery +auto=lord(*[creature;enchantment]|hand,library,graveyard,exile) asflash text=Any player may play creature and enchantment cards as though they had flash. mana={3}{G} type=Enchantment @@ -124574,7 +124571,7 @@ type=Sorcery [card] name=Winding Canyons auto={T}:Add{1} -auto={2}{T}:name(flash) emblem transforms((,newability[lord(creature|myhand,mylibrary,mygraveyard,myexile) spellmastery])) ueot +auto={2}{T}:name(flash) emblem transforms((,newability[lord(creature|myhand,mylibrary,mygraveyard,myexile) asflash])) ueot text={T}: Add {1} to your mana pool. -- {2}, {T}: Until end of turn, you may play creature cards as though they had flash. type=Land [/card] @@ -126665,7 +126662,7 @@ toughness=2 [/card] [card] name=Yeva, Nature's Herald -auto=lord(creature[green]|myhand,mylibrary,mygraveyard,myexile) spellmastery +auto=lord(creature[green]|myhand,mylibrary,mygraveyard,myexile) asflash abilities=flash text=Flash (You may cast this spell any time you could cast an instant.) -- You may cast green creature cards as though they had flash. mana={2}{G}{G} diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index 0a5ba9a79..f3d8c5451 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -258,7 +258,8 @@ class Constants TEMPFLASHBACK = 136, NOLEGENDRULE =137, CANTTRANSFORM =138, - NB_BASIC_ABILITIES = 139, + ASFLASH =139, + NB_BASIC_ABILITIES = 140, RARITY_S = 'S', //Special Rarity RARITY_M = 'M', //Mythics diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 10c4ffac9..7474192c1 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -169,7 +169,8 @@ const char* Constants::MTGBasicAbilities[] = { "flyersonly", "tempflashback", "legendruleremove", - "canttransform" + "canttransform", + "asflash" }; map Constants::MTGBasicAbilitiesMap; diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index dba96f87f..d7c8acb38 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -334,7 +334,7 @@ int MTGPutInPlayRule::isReactingToClick(MTGCardInstance * card, ManaCost *) else return 0; } - else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || (card->StackIsEmptyandSorcerySpeed())) + else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::ASFLASH) || (card->StackIsEmptyandSorcerySpeed())) { if(card->controller()->epic) return 0; @@ -559,7 +559,7 @@ int MTGKickerRule::isReactingToClick(MTGCardInstance * card, ManaCost *) if(!card->getManaCost()->getKicker()) return 0; - if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || (card->StackIsEmptyandSorcerySpeed())) + if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::ASFLASH) || (card->StackIsEmptyandSorcerySpeed())) { if(card->controller()->epic) return 0; @@ -748,7 +748,7 @@ int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost * else return 0; } - else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::SPELLMASTERY) || card->has(Constants::OFFERING) || (card->StackIsEmptyandSorcerySpeed())) + else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::ASFLASH) || card->has(Constants::SPELLMASTERY) || card->has(Constants::OFFERING) || (card->StackIsEmptyandSorcerySpeed())) { if(card->controller()->epic) return 0; @@ -1313,7 +1313,7 @@ int MTGMorphCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *) if(card->controller()->epic)//zoetic cavern... morph is casted for a cost... return 0; //note lands can morph too, this is different from other cost types. - if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || (card->StackIsEmptyandSorcerySpeed())) + if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::ASFLASH) || (card->StackIsEmptyandSorcerySpeed())) { if (card->controller()->game->playRestrictions->canPutIntoZone(card, card->controller()->game->stack) == PlayRestriction::CANT_PLAY) return 0;