From 90376992813a424b3a54fb211af18bb5acc6dfe5 Mon Sep 17 00:00:00 2001 From: Dmitry Panin Date: Tue, 29 Oct 2013 16:12:08 +0400 Subject: [PATCH] Added missing test for syncopate + 2 tests for spell_rupture --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 2 +- projects/mtg/bin/Res/test/_tests.txt | 4 ++- .../mtg/bin/Res/test/counter_unless_pay_x.txt | 27 +++++++++++++++++ projects/mtg/bin/Res/test/spell_rupture.txt | 29 +++++++++++++++++++ projects/mtg/bin/Res/test/spell_rupture_2.txt | 25 ++++++++++++++++ 5 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 projects/mtg/bin/Res/test/counter_unless_pay_x.txt create mode 100644 projects/mtg/bin/Res/test/spell_rupture.txt create mode 100644 projects/mtg/bin/Res/test/spell_rupture_2.txt diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 97adaf357..a35932502 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -83704,7 +83704,7 @@ type=Instant [card] name=Spell Rupture target=*|stack -auto=if cantargetcard(*|opponentstack) then transforms((,newability[pay[[{value:power:highest:creature:opponentbattlefield}]] name(pay {value} mana) donothing?fizzle])) forever else transforms((,newability[pay[[{value:power:highest:creature:mybattlefield.}]] name(pay {value} mana) donothing?fizzle])) forever +auto=if cantargetcard(*|opponentstack) then transforms((,newability[pay[[{value:power:highest:creature:opponentbattlefield}]] name(pay {value} mana) donothing?fizzle])) forever else transforms((,newability[pay[[{value:power:highest:creature:mybattlefield}]] name(pay {value} mana) donothing?fizzle])) forever text=Counter target spell unless its controller pays {X}, where X is the greatest power among creatures you control. mana={1}{U} type=Instant diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 75676ef73..32841bb5a 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -238,7 +238,7 @@ counterspell.txt counterspell2.txt counterspell3.txt counterspell4.txt -counter_unless_pay.txt +counter_unless_pay_x.txt Covetous_Dragon_ASLONGAS_3.txt Covetous_Dragon_ASLONGAS_4.txt cranial_plating.txt @@ -614,6 +614,8 @@ souls_attendant_i489.txt soul's grace_POWERLIFEGAIN.txt spark_elemental.txt spectral_shield_CANTBETARGETOF.txt +spell_rupture.txt +spell_rupture_2.txt sphinx_summoner.txt spirit_link.txt spirit_link_i173.txt diff --git a/projects/mtg/bin/Res/test/counter_unless_pay_x.txt b/projects/mtg/bin/Res/test/counter_unless_pay_x.txt new file mode 100644 index 000000000..8c156d14f --- /dev/null +++ b/projects/mtg/bin/Res/test/counter_unless_pay_x.txt @@ -0,0 +1,27 @@ +#Testing Counter unless pay {X} mechanic +#P1 casts Think Twice with {4} left in his mana pool and P2 counters with Syncopate using X = 3. P1 chooses to pay {3} and Think Twice resolves with {1} left in his mana pool. +[INIT] +firstmain +[PLAYER1] +hand:think twice +manapool:{5}{U} +library:counterspell +[PLAYER2] +hand:syncopate +manapool:{3}{U} +[DO] +think twice +no +yes +syncopate +think twice +choice 0 +[ASSERT] +firstmain +[PLAYER1] +hand:counterspell +graveyard:think twice +manapool:{1} +[PLAYER2] +graveyard:syncopate +[END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/spell_rupture.txt b/projects/mtg/bin/Res/test/spell_rupture.txt new file mode 100644 index 000000000..ace0dc060 --- /dev/null +++ b/projects/mtg/bin/Res/test/spell_rupture.txt @@ -0,0 +1,29 @@ +# Testing spell rupture (expression: "pay[[{value:WParsedInt}]]") +# counter opponent spell +[INIT] +firstmain +[PLAYER1] +hand:bad moon +manapool:{1}{B}{4} +inplay:raging goblin +[PLAYER2] +inplay:grizzly bears +hand:spell rupture +manapool:{1}{U} +[DO] +bad moon +no +yes +spell rupture +bad moon +choice 0 +[ASSERT] +firstmain +[PLAYER1] +manapool:{2} +inplay:raging goblin,bad moon +[PLAYER2] +graveyard:spell rupture +manapool:{0} +inplay:grizzly bears +[END] \ No newline at end of file diff --git a/projects/mtg/bin/Res/test/spell_rupture_2.txt b/projects/mtg/bin/Res/test/spell_rupture_2.txt new file mode 100644 index 000000000..68fcd8649 --- /dev/null +++ b/projects/mtg/bin/Res/test/spell_rupture_2.txt @@ -0,0 +1,25 @@ +# Testing spell rupture (expression: "pay[[{value:WParsedInt}]]") +# counter own spell +[INIT] +firstmain +[PLAYER1] +hand:bad moon,spell rupture +manapool:{1}{B}{1}{U}{4} +inplay:raging goblin +[PLAYER2] +inplay:grizzly bears +[DO] +bad moon +yes +spell rupture +bad moon +choice 0 +[ASSERT] +firstmain +[PLAYER1] +graveyard:spell rupture +manapool:{3} +inplay:raging goblin,bad moon +[PLAYER2] +inplay:grizzly bears +[END] \ No newline at end of file