From 2175359378196b0e8547d3090929cc8cf0279f04 Mon Sep 17 00:00:00 2001 From: Psyyringe Date: Thu, 26 Nov 2009 07:16:17 +0000 Subject: [PATCH] Psyringe - fix for issue 217. Curiosity now works correctly by means of the new mytgt keyword. Test scripts which check the behavior of Curiosity when cast an one's own creature, and when cast on an opponent's creature, have been added. --- projects/mtg/bin/Res/sets/EXO/_cards.dat | 2 +- projects/mtg/bin/Res/test/_tests.txt | 2 + projects/mtg/bin/Res/test/curiosity1_i217.txt | 30 +++++++++++++++ projects/mtg/bin/Res/test/curiosity2_i217.txt | 38 +++++++++++++++++++ 4 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 projects/mtg/bin/Res/test/curiosity1_i217.txt create mode 100644 projects/mtg/bin/Res/test/curiosity2_i217.txt diff --git a/projects/mtg/bin/Res/sets/EXO/_cards.dat b/projects/mtg/bin/Res/sets/EXO/_cards.dat index dc104d0da..6f39fbc33 100644 --- a/projects/mtg/bin/Res/sets/EXO/_cards.dat +++ b/projects/mtg/bin/Res/sets/EXO/_cards.dat @@ -69,7 +69,7 @@ type=Land text=Enchant creature Whenever enchanted creature deals damage to an opponent, you may draw a card. id=6060 target=creature -auto=@damaged(player) from(this):draw:1 controller +auto=@damaged(player) from(mytgt):may draw:1 controller name=Curiosity rarity=U mana={U} diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index b2bd45d2f..441316d01 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -115,6 +115,8 @@ counterspell2.txt counterspell3.txt counterspell4.txt creature_bond.txt +curiosity1_i217.txt +curiosity2_i217.txt crimson_kobolds.txt crumble.txt crystal_rod_i172.txt diff --git a/projects/mtg/bin/Res/test/curiosity1_i217.txt b/projects/mtg/bin/Res/test/curiosity1_i217.txt new file mode 100644 index 000000000..0b51be9d2 --- /dev/null +++ b/projects/mtg/bin/Res/test/curiosity1_i217.txt @@ -0,0 +1,30 @@ +#NAME: Curiosity 1 +#DESC: Bug: does not make the player draw +#DESC: a card when it damages the opponent +#DESC: See http://code.google.com/p/wagic/issues/detail?id=217 +[INIT] +firstmain +[PLAYER1] +inplay:Craw Wurm +hand:Curiosity +library:Forest +manapool:{U} +[PLAYER2] +[DO] +Curiosity +Craw Wurm +next +next +Craw Wurm +next +next +choice 0 +next +[ASSERT] +combatend +[PLAYER1] +inplay:Craw Wurm,Curiosity +hand:Forest +[PLAYER2] +life:14 +[END] diff --git a/projects/mtg/bin/Res/test/curiosity2_i217.txt b/projects/mtg/bin/Res/test/curiosity2_i217.txt new file mode 100644 index 000000000..efc1f4a99 --- /dev/null +++ b/projects/mtg/bin/Res/test/curiosity2_i217.txt @@ -0,0 +1,38 @@ +#NAME: Curiosity 2 +#DESC: Tests whether Curiosity works correctly +#DESC: when cast on an opponent's creature +#DESC: http://code.google.com/p/wagic/issues/detail?id=217 +[INIT] +firstmain +[PLAYER1] +hand:Curiosity +library:Island +manapool:{U} +[PLAYER2] +inplay:Craw Wurm +library:Forest,Plains +[DO] +Curiosity +Craw Wurm +eot +next +next +next +next +next +Craw Wurm +next +next +choice 0 +next +[ASSERT] +combatend +[PLAYER1] +inplay:Curiosity +hand:Island +life:14 +[PLAYER2] +inplay:Craw Wurm +hand:Plains +library:Forest +[END]