diff --git a/projects/mtg/bin/Res/sets/ALA/todo.dat b/projects/mtg/bin/Res/sets/ALA/todo.dat index 60ec112fe..3ef5328f2 100644 --- a/projects/mtg/bin/Res/sets/ALA/todo.dat +++ b/projects/mtg/bin/Res/sets/ALA/todo.dat @@ -1364,17 +1364,7 @@ power=3 subtype=Lizard toughness=3 [/card] -[card] -text=Steelclad Serpent can't attack unless you control another artifact. -id=175009 -name=Steelclad Serpent -rarity=C -type=Artifact Creature -mana={5}{U} -power=4 -subtype=Serpent -toughness=5 -[/card] + [card] text=Flying, vigilance Players can't untap more than one creature during their untap steps. id=175396 diff --git a/projects/mtg/bin/Res/test/Nevinyrrals_Disk.txt b/projects/mtg/bin/Res/test/Nevinyrrals_Disk.txt new file mode 100644 index 000000000..9f033079b --- /dev/null +++ b/projects/mtg/bin/Res/test/Nevinyrrals_Disk.txt @@ -0,0 +1,16 @@ +#Bug: Nevinyrralfs Disk: Destroys creatures, enchantments and artifacts as soon as it comes into play +[INIT] +FIRSTMAIN +[PLAYER1] +hand:Nevinyrral's Disk +inplay:black vise +manapool:{4} +[PLAYER2] +[DO] +Nevinyrral's Disk +[ASSERT] +FIRSTMAIN +[PLAYER1] +inplay:black vise,Nevinyrral's Disk +[PLAYER2] +[END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/Nevinyrrals_Disk2.txt b/projects/mtg/bin/Res/test/Nevinyrrals_Disk2.txt new file mode 100644 index 000000000..e95638ff4 --- /dev/null +++ b/projects/mtg/bin/Res/test/Nevinyrrals_Disk2.txt @@ -0,0 +1,29 @@ +# +[INIT] +FIRSTMAIN +[PLAYER1] +hand:Nevinyrral's Disk +inplay:black vise,swamp +manapool:{4} +[PLAYER2] +inplay:obsianus golem +[DO] +Nevinyrral's Disk +eot +eot +next +#upkeep +next +#draw +next +#firstmain +swamp +Nevinyrral's Disk +[ASSERT] +FIRSTMAIN +[PLAYER1] +graveyard:black vise,Nevinyrral's Disk +inplay:swamp +[PLAYER2] +graveyard:obsianus golem +[END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 6028e23ed..941161c2e 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -76,6 +76,8 @@ living_lands.txt lord_of_the_pit.txt lord_of_the_pit2.txt nantuko_husk.txt +Nevinyrrals_Disk.txt +Nevinyrrals_Disk2.txt nightmare.txt Nyxathid.txt orcish_lumberjack.txt diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 74508a4c5..448d481c5 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -292,6 +292,28 @@ class ACopier:public TargetAbility{ }; + +//All Destroyer. TargetAbility +class AAllDestroyer:public ActivatedAbility{ + public: + int bury; + AAllDestroyer(int _id, MTGCardInstance * _source, TargetChooser * _tc, int _bury = 0, ManaCost * _cost=NULL,int doTap =1):ActivatedAbility(_id,_source,_cost,0,doTap),bury(_bury){ + tc = _tc; + + } + + int resolve(){ + AbilityFactory af; + af.destroyAllInPlay(tc,bury); + return 1; + } + + const char * getMenuText(){ + return "Destroy All..."; + } + +}; + //Destroyer. TargetAbility class ADestroyer:public TargetAbility{ public: diff --git a/projects/mtg/include/MTGAbility.h b/projects/mtg/include/MTGAbility.h index 852aa04ba..fc9f1ced6 100644 --- a/projects/mtg/include/MTGAbility.h +++ b/projects/mtg/include/MTGAbility.h @@ -220,13 +220,13 @@ class GenericTriggeredAbility:public TriggeredAbility{ class AbilityFactory{ private: int countCards(TargetChooser * tc, Player * player = NULL, int option = 0); - int destroyAllInPlay(TargetChooser * tc, int bury = 0); int putInPlayFromZone(MTGCardInstance * card, MTGGameZone * zone, Player * p); int parsePowerToughness(string s, int *power, int *toughness); Trigger * parseTrigger(string magicText); Damageable * parseCollateralTarget(MTGCardInstance * card, string s); public: int magicText(int id, Spell * spell, MTGCardInstance * card = NULL); + int destroyAllInPlay(TargetChooser * tc, int bury = 0); void addAbilities(int _id, Spell * spell); }; diff --git a/projects/mtg/src/GameStateMenu.cpp b/projects/mtg/src/GameStateMenu.cpp index 58f715e19..26b24ccc3 100644 --- a/projects/mtg/src/GameStateMenu.cpp +++ b/projects/mtg/src/GameStateMenu.cpp @@ -5,7 +5,7 @@ #include "../include/GameOptions.h" #include "../include/GameApp.h" -static const char* GAME_VERSION = "WTH?! 0.5.1 - by WilLoW"; +static const char* GAME_VERSION = "WTH?! 0.6.0 - by WilLoW"; #define ALPHA_WARNING 0 #define DEFAULT_ANGLE_MULTIPLIER 0.4 diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 0b3510336..39bd3cfb7 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -375,8 +375,12 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){ if (myNbCards < opponentNbCards || myCardsPower < opponentCardsPower) return BAKA_EFFECT_GOOD; return BAKA_EFFECT_BAD; }else{ - this->destroyAllInPlay(targetAll,1); - delete targetAll; + if (cost){ + game->addObserver(NEW AAllDestroyer(id, card,targetAll,1,cost,doTap)); + }else{ + this->destroyAllInPlay(targetAll,1); + delete targetAll; + } } }else{ if (dryMode) return BAKA_EFFECT_BAD; @@ -410,8 +414,12 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){ if (myNbCards < opponentNbCards || myCardsPower < opponentCardsPower) return BAKA_EFFECT_GOOD; return BAKA_EFFECT_BAD; }else{ - this->destroyAllInPlay(targetAll); - delete targetAll; + if (cost){ + game->addObserver(NEW AAllDestroyer(id, card,targetAll,0,cost,doTap)); + }else{ + this->destroyAllInPlay(targetAll); + delete targetAll; + } } }else{ if (dryMode) return BAKA_EFFECT_BAD;