diff --git a/projects/mtg/bin/Res/sets/ICE/_cards.dat b/projects/mtg/bin/Res/sets/ICE/_cards.dat index 1eb5847c4..9a31485e7 100644 --- a/projects/mtg/bin/Res/sets/ICE/_cards.dat +++ b/projects/mtg/bin/Res/sets/ICE/_cards.dat @@ -1151,7 +1151,7 @@ text=Flare deals 1 damage to target creature or player. Draw a card at the begin id=2621 target=creature,player auto=damage:1 -auto=draw:1 +auto=@next upkeep:draw:1 name=Flare rarity=C type=Instant @@ -1162,7 +1162,7 @@ text=Target creature gains banding until end of turn. Draw a card at the beginni id=2685 target=creature auto=:banding -auto=draw:1 +auto=@next upkeep:draw:1 name=Formation rarity=R type=Instant @@ -1172,7 +1172,7 @@ mana={1}{W} text=Target creature gains first strike until end of turn. Draw a card at the beginning of the next turn's upkeep. id=2702 auto=:first strike -auto=draw:1 +auto=@next upkeep:draw:1 name=Lightning Blow rarity=R type=Instant @@ -1182,7 +1182,7 @@ mana={1}{W} text=Target creature gains flying until end of turn. Draw a card at the beginning of the next turn's upkeep. id=2541 auto=:flying -auto=draw:1 +auto=@next upkeep:draw:1 name=Updraft rarity=U type=Instant diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 1a8868ec7..9739e7292 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -23,6 +23,7 @@ counsel_of_the_soratami.txt counterspell.txt counterspell2.txt drain_life.txt +flare.txt force_of_nature.txt force_of_nature2.txt force_of_nature3.txt @@ -30,6 +31,7 @@ ghost_warden.txt giant_growth.txt goblin_balloon_brigade.txt goblin_balloon_brigade2.txt +goblin_king.txt keldon_warlord.txt kudzu.txt kudzu2.txt diff --git a/projects/mtg/bin/Res/test/flare.txt b/projects/mtg/bin/Res/test/flare.txt new file mode 100644 index 000000000..933a59230 --- /dev/null +++ b/projects/mtg/bin/Res/test/flare.txt @@ -0,0 +1,29 @@ +#Testing flare effects. does it kill a 2/1 goblin piker ? Does player draw a card at next upkeep ? +[INIT] +FIRSTMAIN +[PLAYER1] +hand:2621 +library:2772,2773 +manapool:{2}{R} +[PLAYER2] +inplay:129580 +[DO] +2621 +129580 +eot +#untap +next +#upkeep +next +#draw +next +#firstmain +[ASSERT] +FIRSTMAIN +[PLAYER1] +graveyard:2621 +hand:2773 +library:2772 +[PLAYER2] +graveyard:129580 +[END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/goblin_king.txt b/projects/mtg/bin/Res/test/goblin_king.txt new file mode 100644 index 000000000..ce8625de3 --- /dev/null +++ b/projects/mtg/bin/Res/test/goblin_king.txt @@ -0,0 +1,21 @@ +#does goblin king (10E) give +1/+1 to goblins ? (Goblin piker 2/1 VS canopy spider 1/3) +[INIT] +COMBATATTACKERS +[PLAYER1] +inplay:129578,129580 +[PLAYER2] +inplay:135185 +[DO] +129580 +next +135185 +next +next +135185 +[ASSERT] +COMBATEND +[PLAYER1] +inplay:129578,129580 +[PLAYER2] +graveyard:135185 +[END] \ No newline at end of file diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index e4e565e61..a3a4a712d 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -318,7 +318,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){ found = s.find("/"); if (found != string::npos){ unsigned int start = s.find(":"); - if (start == string::npos) start = -1; + if (start == string::npos) start = found-2; int power = atoi(s.substr(start+1,size-found).c_str()); unsigned int end = s.find(" ",start); int toughness; @@ -1654,9 +1654,6 @@ void TriggeredAbility::Update(float dt){ } } if (doDelete || !canBeInList(card)){ -#if defined (WIN32) || defined (LINUX) -OutputDebugString("DELETE FRO LISTMAINTAINER\n"); -#endif cards.erase(card); removed(card); } @@ -1709,7 +1706,7 @@ OutputDebugString("DELETE FRO LISTMAINTAINER\n"); TriggerAtPhase::TriggerAtPhase(int _phaseId):Trigger(),phaseId(_phaseId){ currentPhase = game->getCurrentGamePhase(); - newPhase = -1; + newPhase = game->getCurrentGamePhase(); } int TriggerAtPhase::trigger(){