From 473e4b830813d433b18b2a652a78ab3fc2cf9db9 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 17:26:01 +0000 Subject: [PATCH] - Converting existing Spore Counter Fungi to Triggers --- res/cardsfolder/deathspore_thallid.txt | 4 +++- res/cardsfolder/elvish_farmer.txt | 4 +++- res/cardsfolder/mycologist.txt | 4 +++- res/cardsfolder/pallid_mycoderm.txt | 4 +++- res/cardsfolder/psychotrope_thallid.txt | 4 +++- res/cardsfolder/thallid.txt | 4 +++- res/cardsfolder/thallid_devourer.txt | 4 +++- res/cardsfolder/thallid_germinator.txt | 4 +++- res/cardsfolder/thallid_shell_dweller.txt | 4 +++- res/cardsfolder/thorn_thallid.txt | 4 +++- res/cardsfolder/utopia_mycon.txt | 4 +++- res/cardsfolder/vitaspore_thallid.txt | 4 +++- src/forge/GameAction.java | 4 ---- src/forge/GameActionUtil.java | 22 ---------------------- 14 files changed, 36 insertions(+), 38 deletions(-) diff --git a/res/cardsfolder/deathspore_thallid.txt b/res/cardsfolder/deathspore_thallid.txt index 499283d8cd9..b49cace5e23 100644 --- a/res/cardsfolder/deathspore_thallid.txt +++ b/res/cardsfolder/deathspore_thallid.txt @@ -1,8 +1,10 @@ Name:Deathspore Thallid ManaCost:1 B Types:Creature Zombie Fungus -Text:At the beginning of your upkeep, put a spore counter on Deathspore Thallid. +Text:no text PT:1/1 +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a spore counter on CARDNAME. +SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ SPORE | CounterNum$ 1 | SpellDescription$ Put a spore counter on CARDNAME. A:AB$Token | Cost$ SubCounter<3/SPORE> | TokenAmount$ 1 | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 green Saproling creature token onto the battlefield. A:AB$Pump | Cost$ Sac<1/Saproling> | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ -1 | NumDef$ -1 | IsCurse$ True | SpellDescription$ Target creature gets -1/-1 until end of turn. SVar:Rarity:Common diff --git a/res/cardsfolder/elvish_farmer.txt b/res/cardsfolder/elvish_farmer.txt index dcd060d041d..620b0387871 100644 --- a/res/cardsfolder/elvish_farmer.txt +++ b/res/cardsfolder/elvish_farmer.txt @@ -1,8 +1,10 @@ Name:Elvish Farmer ManaCost:1 G Types:Creature Elf -Text:At the beginning of your upkeep, put a spore counter on CARDNAME. +Text:no text PT:0/2 +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a spore counter on CARDNAME. +SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ SPORE | CounterNum$ 1 | SpellDescription$ Put a spore counter on CARDNAME. A:AB$ Token | Cost$ SubCounter<3/SPORE> | TokenAmount$ 1 | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 green Saproling creature token onto the battlefield. A:AB$ GainLife | Cost$ Sac<1/Saproling> | LifeAmount$ 2 | SpellDescription$ You gain 2 life. SVar:Rarity:Rare diff --git a/res/cardsfolder/mycologist.txt b/res/cardsfolder/mycologist.txt index d3bcfc19ecc..b0715227aae 100644 --- a/res/cardsfolder/mycologist.txt +++ b/res/cardsfolder/mycologist.txt @@ -1,8 +1,10 @@ Name:Mycologist ManaCost:1 W Types:Creature Human Druid -Text:At the beginning of your upkeep, put a spore counter on CARDNAME. +Text:no text PT:0/2 +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a spore counter on CARDNAME. +SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ SPORE | CounterNum$ 1 | SpellDescription$ Put a spore counter on CARDNAME. A:AB$ Token | Cost$ SubCounter<3/SPORE> | TokenAmount$ 1 | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 green Saproling creature token onto the battlefield. A:AB$ GainLife | Cost$ Sac<1/Saproling> | LifeAmount$ 2 | SpellDescription$ You gain 2 life. SVar:Rarity:Uncommon diff --git a/res/cardsfolder/pallid_mycoderm.txt b/res/cardsfolder/pallid_mycoderm.txt index ff320a96474..245ef1d38ef 100644 --- a/res/cardsfolder/pallid_mycoderm.txt +++ b/res/cardsfolder/pallid_mycoderm.txt @@ -1,8 +1,10 @@ Name:Pallid Mycoderm ManaCost:3 W Types:Creature Fungus -Text:At the beginning of your upkeep, put a spore counter on Pallid Mycoderm. +Text:no text PT:2/4 +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a spore counter on CARDNAME. +SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ SPORE | CounterNum$ 1 | SpellDescription$ Put a spore counter on CARDNAME. A:AB$Token | Cost$ SubCounter<3/SPORE> | TokenAmount$ 1 | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 green Saproling creature token onto the battlefield. SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/pallid_mycoderm.jpg diff --git a/res/cardsfolder/psychotrope_thallid.txt b/res/cardsfolder/psychotrope_thallid.txt index ad1b9682b89..595f330850b 100644 --- a/res/cardsfolder/psychotrope_thallid.txt +++ b/res/cardsfolder/psychotrope_thallid.txt @@ -1,8 +1,10 @@ Name:Psychotrope Thallid ManaCost:2 G Types:Creature Fungus -Text:At the beginning of your upkeep, put a spore counter on CARDNAME. +Text:no text PT:1/1 +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a spore counter on CARDNAME. +SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ SPORE | CounterNum$ 1 | SpellDescription$ Put a spore counter on CARDNAME. A:AB$Token | Cost$ SubCounter<3/SPORE> | TokenAmount$ 1 | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 green Saproling creature token onto the battlefield. A:AB$Draw | Cost$ 1 Sac<1/Saproling> | NumCards$ 1 | SpellDescription$ Draw a card. SVar:Rarity:Uncommon diff --git a/res/cardsfolder/thallid.txt b/res/cardsfolder/thallid.txt index ef03d1b590b..bb98acdecc8 100644 --- a/res/cardsfolder/thallid.txt +++ b/res/cardsfolder/thallid.txt @@ -1,8 +1,10 @@ Name:Thallid ManaCost:G Types:Creature Fungus -Text:At the beginning of your upkeep, put a spore counter on Thallid. +Text:no text PT:1/1 +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a spore counter on CARDNAME. +SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ SPORE | CounterNum$ 1 | SpellDescription$ Put a spore counter on CARDNAME. A:AB$Token | Cost$ SubCounter<3/SPORE> | TokenAmount$ 1 | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 green Saproling creature token onto the battlefield. SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/thallid.jpg diff --git a/res/cardsfolder/thallid_devourer.txt b/res/cardsfolder/thallid_devourer.txt index 97344947aeb..44ef78ea38a 100644 --- a/res/cardsfolder/thallid_devourer.txt +++ b/res/cardsfolder/thallid_devourer.txt @@ -1,8 +1,10 @@ Name:Thallid Devourer ManaCost:1 G G Types:Creature Fungus -Text:At the beginning of your upkeep, put a spore counter on Thallid Devourer. +Text:no text PT:2/2 +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a spore counter on CARDNAME. +SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ SPORE | CounterNum$ 1 | SpellDescription$ Put a spore counter on CARDNAME. A:AB$Token | Cost$ SubCounter<3/SPORE> | TokenAmount$ 1 | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 green Saproling creature token onto the battlefield. A:AB$Pump | Cost$ Sac<1/Saproling> | NumAtt$ +1 | NumDef$ +2 | SpellDescription$ Thallid Devourer gets +1/+2 until end of turn. SVar:Rarity:Common diff --git a/res/cardsfolder/thallid_germinator.txt b/res/cardsfolder/thallid_germinator.txt index 570041e3b51..ce524b3df15 100644 --- a/res/cardsfolder/thallid_germinator.txt +++ b/res/cardsfolder/thallid_germinator.txt @@ -1,8 +1,10 @@ Name:Thallid Germinator ManaCost:2 G Types:Creature Fungus -Text:At the beginning of your upkeep, put a spore counter on Thallid Germinator. +Text:no text PT:2/2 +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a spore counter on CARDNAME. +SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ SPORE | CounterNum$ 1 | SpellDescription$ Put a spore counter on CARDNAME. A:AB$Token | Cost$ SubCounter<3/SPORE> | TokenAmount$ 1 | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 green Saproling creature token onto the battlefield. A:AB$Pump | Cost$ Sac<1/Saproling> | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ +1 | NumDef$ +1 | SpellDescription$ Target creature gets +1/+1 until end of turn. SVar:Rarity:Common diff --git a/res/cardsfolder/thallid_shell_dweller.txt b/res/cardsfolder/thallid_shell_dweller.txt index dfa095bc1de..3ed1c7b83dd 100644 --- a/res/cardsfolder/thallid_shell_dweller.txt +++ b/res/cardsfolder/thallid_shell_dweller.txt @@ -1,8 +1,10 @@ Name:Thallid Shell-Dweller ManaCost:1 G Types:Creature Fungus -Text:At the beginning of your upkeep, put a spore counter on Thallid Shell-Dweller. +Text:no text PT:0/5 +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a spore counter on CARDNAME. +SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ SPORE | CounterNum$ 1 | SpellDescription$ Put a spore counter on CARDNAME. A:AB$Token | Cost$ SubCounter<3/SPORE> | TokenAmount$ 1 | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 green Saproling creature token onto the battlefield. K:Defender SVar:Rarity:Common diff --git a/res/cardsfolder/thorn_thallid.txt b/res/cardsfolder/thorn_thallid.txt index 53c821715ad..b7a63450484 100644 --- a/res/cardsfolder/thorn_thallid.txt +++ b/res/cardsfolder/thorn_thallid.txt @@ -1,8 +1,10 @@ Name:Thorn Thallid ManaCost:1 G G Types:Creature Fungus -Text:At the beginning of your upkeep, put a spore counter on Thorn Thallid. +Text:no text PT:2/2 +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a spore counter on CARDNAME. +SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ SPORE | CounterNum$ 1 | SpellDescription$ Put a spore counter on CARDNAME. A:AB$DealDamage | Cost$ SubCounter<3/SPORE> | Tgt$ TgtCP | NumDmg$ 1 | SpellDescription$ CARDNAME deals 1 damage to target creature or player. SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/thorn_thallid.jpg diff --git a/res/cardsfolder/utopia_mycon.txt b/res/cardsfolder/utopia_mycon.txt index 482ba3e37b4..1681def0d70 100644 --- a/res/cardsfolder/utopia_mycon.txt +++ b/res/cardsfolder/utopia_mycon.txt @@ -1,8 +1,10 @@ Name:Utopia Mycon ManaCost:G Types:Creature Fungus -Text:At the beginning of your upkeep, put a spore counter on CARDNAME. +Text:no text PT:0/2 +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a spore counter on CARDNAME. +SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ SPORE | CounterNum$ 1 | SpellDescription$ Put a spore counter on CARDNAME. A:AB$Token | Cost$ SubCounter<3/SPORE> | TokenAmount$ 1 | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 green Saproling creature token onto the battlefield. A:AB$Mana | Cost$ Sac<1/Saproling> | Produced$ W | SpellDescription$ Add W to your mana pool. A:AB$Mana | Cost$ Sac<1/Saproling> | Produced$ B | SpellDescription$ Add B to your mana pool. diff --git a/res/cardsfolder/vitaspore_thallid.txt b/res/cardsfolder/vitaspore_thallid.txt index 659e3375f23..0017829c1cd 100644 --- a/res/cardsfolder/vitaspore_thallid.txt +++ b/res/cardsfolder/vitaspore_thallid.txt @@ -1,8 +1,10 @@ Name:Vitaspore Thallid ManaCost:1 G Types:Creature Fungus -Text:At the beginning of your upkeep, put a spore counter on Vitaspore Thallid. +Text:no text PT:1/1 +T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of your upkeep, put a spore counter on CARDNAME. +SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ SPORE | CounterNum$ 1 | SpellDescription$ Put a spore counter on CARDNAME. A:AB$Token | Cost$ SubCounter<3/SPORE> | TokenAmount$ 1 | TokenName$ Saproling | TokenTypes$ Creature,Saproling | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 1 | TokenToughness$ 1 | SpellDescription$ Put a 1/1 green Saproling creature token onto the battlefield. A:AB$Pump | Cost$ Sac<1/Saproling> | ValidTgts$ Creature | TgtPrompt$ Select target creature | KW$ Haste | SpellDescription$ Target creature gains haste until end of turn. SVar:Rarity:Common diff --git a/src/forge/GameAction.java b/src/forge/GameAction.java index 168752ac28e..ac8a2338445 100644 --- a/src/forge/GameAction.java +++ b/src/forge/GameAction.java @@ -2071,10 +2071,6 @@ public class GameAction { throw new RuntimeException("GameAction : destroy() invalid card.getOwner() - " + c + " " + owner); boolean persist = (c.getKeyword().contains("Persist") && c.getCounters(Counters.M1M1) == 0); - - //tokens don't go into the graveyard - //TODO: must change this if any cards have effects that trigger "when creatures go to the graveyard" - //resets the card, untaps the card, removes anything "extra", resets attack and defense Card newCard = moveToGraveyard(c); diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index 623f7ba8c23..7e1df01941f 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -132,7 +132,6 @@ public class GameActionUtil { upkeep_Oath_of_Druids(); upkeep_Oath_of_Ghouls(); upkeep_Mycoloth(); - upkeep_Spore_Counters(); upkeep_Suspend(); upkeep_Vanishing(); upkeep_Fading(); @@ -7304,27 +7303,6 @@ public class GameActionUtil { } //if }//nether spirit - private static void upkeep_Spore_Counters() { - final Player player = AllZone.Phase.getPlayerTurn(); - PlayerZone playZone = AllZone.getZone(Constant.Zone.Battlefield, player); - - CardList list = new CardList(playZone.getCards()); - list = list.getType("Creature"); - - for(int i = 0; i < list.size(); i++) { - Card c = list.get(i); - if(c.getName().equals("Deathspore Thallid") || c.getName().equals("Elvish Farmer") - || c.getName().equals("Feral Thallid") || c.getName().equals("Mycologist") - || c.getName().equals("Pallid Mycoderm") || c.getName().equals("Psychotrope Thallid") - || c.getName().equals("Savage Thallid") || c.getName().equals("Thallid") - || c.getName().equals("Thallid Devourer") || c.getName().equals("Thallid Germinator") - || c.getName().equals("Thallid Shell-Dweller") || c.getName().equals("Thorn Thallid") - || c.getName().equals("Utopia Mycon") || c.getName().equals("Vitaspore Thallid")) { - c.addCounter(Counters.SPORE, 1); - } - } - } - public static void upkeep_Suspend() { Player player = AllZone.Phase.getPlayerTurn();