From 667a7f6a8e8caedfcb4b258a12816ada506a3fbb Mon Sep 17 00:00:00 2001 From: Psyyringe Date: Sun, 27 Dec 2009 19:43:36 +0000 Subject: [PATCH] Psyringe - reverted Urza's lands to abrasax' original way of coding them, plus minor adjustments. The previously used code made themwork only once. Added a test script for that condition. Also removed test script for Thought Courier (which would fail now, since the card was removed in a recent revision). Thanks to TheDark for the bug report on Urza's lands. Note that the lands still don't work entirely correct, they give you the option to tap them for one mana even when they shouldn't anymore. This can be fixed when aslongas(cards) <1 is working. --- projects/mtg/bin/Res/sets/ATQ/_cards.dat | 45 ++++++++++++------- projects/mtg/bin/Res/test/_tests.txt | 2 +- projects/mtg/bin/Res/test/thought_courier.txt | 23 ---------- projects/mtg/bin/Res/test/urzas_lands.txt | 2 + projects/mtg/bin/Res/test/urzas_lands2.txt | 25 +++++++++++ 5 files changed, 56 insertions(+), 41 deletions(-) delete mode 100644 projects/mtg/bin/Res/test/thought_courier.txt create mode 100644 projects/mtg/bin/Res/test/urzas_lands2.txt diff --git a/projects/mtg/bin/Res/sets/ATQ/_cards.dat b/projects/mtg/bin/Res/sets/ATQ/_cards.dat index 8506e9bd4..5db0c053e 100644 --- a/projects/mtg/bin/Res/sets/ATQ/_cards.dat +++ b/projects/mtg/bin/Res/sets/ATQ/_cards.dat @@ -367,7 +367,8 @@ id=1080 name=Urza's Mine rarity=C type=Land -auto={T}:add {1} && aslongas(Urza's Tower|myinplay)aslongas(Urza's Power Plant|myinplay):add{1} +auto={T}:add {1} +auto=aslongas(Urza's Power-Plant|myinplay)aslongas(Urza's Tower|myinplay){T}:add{2} subtype=Urza's Mine [/card] [card] @@ -376,7 +377,8 @@ id=1081 name=Urza's Mine rarity=U type=Land -auto={T}:add {1} && aslongas(Urza's Tower|myinplay)aslongas(Urza's Power Plant|myinplay):add{1} +auto={T}:add {1} +auto=aslongas(Urza's Power-Plant|myinplay)aslongas(Urza's Tower|myinplay){T}:add{2} subtype=Urza's Mine [/card] [card] @@ -385,7 +387,8 @@ id=1082 name=Urza's Mine rarity=C type=Land -auto={T}:add {1} && aslongas(Urza's Tower|myinplay)aslongas(Urza's Power Plant|myinplay):add{1} +auto={T}:add {1} +auto=aslongas(Urza's Power-Plant|myinplay)aslongas(Urza's Tower|myinplay){T}:add{2} subtype=Urza's Mine [/card] [card] @@ -394,7 +397,8 @@ id=1083 name=Urza's Mine rarity=U type=Land -auto={T}:add {1} && aslongas(Urza's Tower|myinplay)aslongas(Urza's Power Plant|myinplay):add{1} +auto={T}:add {1} +auto=aslongas(Urza's Power-Plant|myinplay)aslongas(Urza's Tower|myinplay){T}:add{2} subtype=Urza's Mine [/card] [card] @@ -403,8 +407,9 @@ id=1084 name=Urza's Power Plant rarity=U type=Land -auto={T}:add {1} && aslongas(Urza's Mine|myinplay)aslongas(Urza's Tower|myinplay):add{1} -subtype=Urza's Power Plant +auto={T}:add {1} +auto=aslongas(Urza's Mine|myinplay)aslongas(Urza's Tower|myinplay){T}:add{2} +subtype=Urza's Power-Plant [/card] [card] text={T} Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Tower, add {2} to your mana pool instead. @@ -412,8 +417,9 @@ id=1085 name=Urza's Power Plant rarity=C type=Land -auto={T}:add {1} && aslongas(Urza's Mine|myinplay)aslongas(Urza's Tower|myinplay):add{1} -subtype=Urza's Power Plant +auto={T}:add {1} +auto=aslongas(Urza's Mine|myinplay)aslongas(Urza's Tower|myinplay){T}:add{2} +subtype=Urza's Power-Plant [/card] [card] text={T} Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Tower, add {2} to your mana pool instead. @@ -421,8 +427,9 @@ id=1086 name=Urza's Power Plant rarity=C type=Land -auto={T}:add {1} && aslongas(Urza's Mine|myinplay)aslongas(Urza's Tower|myinplay):add{1} -subtype=Urza's Power Plant +auto={T}:add {1} +auto=aslongas(Urza's Mine|myinplay)aslongas(Urza's Tower|myinplay){T}:add{2} +subtype=Urza's Power-Plant [/card] [card] text={T} Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Tower, add {2} to your mana pool instead. @@ -430,8 +437,9 @@ id=1087 name=Urza's Power Plant rarity=U type=Land -auto={T}:add {1} && aslongas(Urza's Mine|myinplay)aslongas(Urza's Tower|myinplay):add{1} -subtype=Urza's Power Plant +auto={T}:add {1} +auto=aslongas(Urza's Mine|myinplay)aslongas(Urza's Tower|myinplay){T}:add{2} +subtype=Urza's Power-Plant [/card] [card] text={T} Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Power-Plant, add {3} to your mana pool instead. @@ -439,8 +447,8 @@ id=1088 name=Urza's Tower rarity=U type=Land -auto={T}:add {1} && aslongas(Urza's Power Plant|myinplay)aslongas(Urza's Mine|myinplay):add{2} -subtype=Urza's Tower +auto={T}:add {1} +auto=aslongas(Urza's Power Plant|myinplay)aslongas(Urza's Mine|myinplay){T}:add{3} [/card] [card] text={T} Add {1} to your mana pool. If you control an Urza's Mine and an Urza's Power-Plant, add {3} to your mana pool instead. @@ -448,7 +456,8 @@ id=1089 name=Urza's Tower rarity=U type=Land -auto={T}:add {1} && aslongas(Urza's Power Plant|myinplay)aslongas(Urza's Mine|myinplay):add{2} +auto={T}:add {1} +auto=aslongas(Urza's Power Plant|myinplay)aslongas(Urza's Mine|myinplay){T}:add{3} subtype=Urza's Tower [/card] [card] @@ -457,7 +466,8 @@ id=1090 name=Urza's Tower rarity=C type=Land -auto={T}:add {1} && aslongas(Urza's Power Plant|myinplay)aslongas(Urza's Mine|myinplay):add{2} +auto={T}:add {1} +auto=aslongas(Urza's Power Plant|myinplay)aslongas(Urza's Mine|myinplay){T}:add{3} subtype=Urza's Tower [/card] [card] @@ -466,7 +476,8 @@ id=1091 name=Urza's Tower rarity=U type=Land -auto={T}:add {1} && aslongas(Urza's Power Plant|myinplay)aslongas(Urza's Mine|myinplay):add{2} +auto={T}:add {1} +auto=aslongas(Urza's Power Plant|myinplay)aslongas(Urza's Mine|myinplay){T}:add{3} subtype=Urza's Tower [/card] [card] diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index 67180fd95..caebbcc33 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -367,7 +367,6 @@ terror.txt terror2.txt threaten.txt throne_of_bone.txt -thought_courier.txt titanic_ultimatum.txt torture.txt tranquil_domain.txt @@ -376,6 +375,7 @@ unstable_mutation.txt unstable_mutation2.txt unwilling_recruit.txt urzas_lands.txt +urzas_lands2.txt vampire_bats.txt vampiric_link.txt volcanic_eruption.txt diff --git a/projects/mtg/bin/Res/test/thought_courier.txt b/projects/mtg/bin/Res/test/thought_courier.txt deleted file mode 100644 index 9935e7568..000000000 --- a/projects/mtg/bin/Res/test/thought_courier.txt +++ /dev/null @@ -1,23 +0,0 @@ -#NAME: Thought Courier -#DESC: Verifies that Thought Courier -#DESC: can draw and discard a card. -#DESC: Does not check whether it can -#DESC: discard the card it just drew. -[INIT] -firstmain -[PLAYER1] -inplay:Thought Courier -hand:Island -library:Plains -[PLAYER2] -[DO] -Thought Courier -Island -[ASSERT] -firstmain -[PLAYER1] -inplay:Thought Courier -hand:Plains -graveyard:Island -[PLAYER2] -[END] diff --git a/projects/mtg/bin/Res/test/urzas_lands.txt b/projects/mtg/bin/Res/test/urzas_lands.txt index a1c2d9387..aa7544589 100644 --- a/projects/mtg/bin/Res/test/urzas_lands.txt +++ b/projects/mtg/bin/Res/test/urzas_lands.txt @@ -11,8 +11,10 @@ hand:Urza's Tower [PLAYER2] [DO] Urza's Mine +choice 0 Urza's Tower Urza's Tower +choice 1 [ASSERT] firstmain [PLAYER1] diff --git a/projects/mtg/bin/Res/test/urzas_lands2.txt b/projects/mtg/bin/Res/test/urzas_lands2.txt new file mode 100644 index 000000000..be3931e28 --- /dev/null +++ b/projects/mtg/bin/Res/test/urzas_lands2.txt @@ -0,0 +1,25 @@ +#NAME: Urza's Lands 2 +#DESC: Verifies that Urza's lands *keep* +#DESC: giving more mana if you have all +#DESC: three in play (a bug caused them +#DESC: to do this only once). +[INIT] +firstmain +[PLAYER1] +inplay:Urza's Mine,Urza's Power Plant,Urza's Tower,Deserted Temple +[PLAYER2] +[DO] +Urza's Tower +choice 1 +Deserted Temple +choice 1 +Urza's Tower +Urza's Tower +choice 1 +[ASSERT] +firstmain +[PLAYER1] +inplay:Urza's Mine,Urza's Power Plant,Urza's Tower,Deserted Temple +manapool:{5} +[PLAYER2] +[END]