From 23c49e0d16087360b45f9e4805a9296f63304af3 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 17:10:59 +0000 Subject: [PATCH] *Updated to triggers Highland Berserker Joraga Bard Ondu Cleric Seascape Aerialist Turntimber Ranger --- res/cardsfolder/highland_berserker.txt | 4 +- res/cardsfolder/joraga_bard.txt | 4 +- res/cardsfolder/ondu_cleric.txt | 5 +- res/cardsfolder/seascape_aerialist.txt | 4 +- res/cardsfolder/turntimber_ranger.txt | 5 +- src/forge/GameActionUtil.java | 118 ------------------------- 6 files changed, 17 insertions(+), 123 deletions(-) diff --git a/res/cardsfolder/highland_berserker.txt b/res/cardsfolder/highland_berserker.txt index fa54d16292e..d9073048f7b 100644 --- a/res/cardsfolder/highland_berserker.txt +++ b/res/cardsfolder/highland_berserker.txt @@ -1,8 +1,10 @@ Name:Highland Berserker ManaCost:1 R Types:Creature Human Berserker Ally -Text:Whenever Highland Berserker or another Ally enters the battlefield under your control, you may have Ally creatures you control gain first strike until end of turn. +Text:no text PT:2/1 +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self,Ally.YouCtrl | TriggerZones$ Battlefield | Optional$ True | Execute$ TrigPump | TriggerDescription$ Whenever CARDNAME or another Ally enters the battlefield under your control, you may have Ally creatures you control gain first strike until end of turn. +SVar:TrigPump:AB$PumpAll | Cost$ 0 | ValidCards$ Ally.YouCtrl | KW$ First Strike SVar:PlayMain1:TRUE SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/highland_berserker.jpg diff --git a/res/cardsfolder/joraga_bard.txt b/res/cardsfolder/joraga_bard.txt index 9dae7df93b7..f6a09eb3fb0 100644 --- a/res/cardsfolder/joraga_bard.txt +++ b/res/cardsfolder/joraga_bard.txt @@ -1,8 +1,10 @@ Name:Joraga Bard ManaCost:3 G Types:Creature Elf Rogue Ally -Text:Whenever Joraga Bard or another Ally enters the battlefield under your control, you may have Ally creatures you control gain vigilance until end of turn. +Text:no text PT:1/4 +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self,Ally.YouCtrl | TriggerZones$ Battlefield | Optional$ True | Execute$ TrigPump | TriggerDescription$ Whenever CARDNAME or another Ally enters the battlefield under your control, you may have Ally creatures you control gain vigilance until end of turn. +SVar:TrigPump:AB$PumpAll | Cost$ 0 | ValidCards$ Ally.YouCtrl | KW$ Vigilance SVar:PlayMain1:TRUE SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/joraga_bard.jpg diff --git a/res/cardsfolder/ondu_cleric.txt b/res/cardsfolder/ondu_cleric.txt index 84fd2e70bfa..1f794dfecd6 100644 --- a/res/cardsfolder/ondu_cleric.txt +++ b/res/cardsfolder/ondu_cleric.txt @@ -1,8 +1,11 @@ Name:Ondu Cleric ManaCost:1 W Types:Creature Kor Cleric Ally -Text:Whenever Ondu Cleric or another Ally enters the battlefield under your control, you may gain life equal to the number of Allies you control. +Text:no text PT:1/1 +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self,Ally.YouCtrl | TriggerZones$ Battlefield | Optional$ True | Execute$ TrigGainLife | TriggerDescription$ Whenever CARDNAME or another Ally enters the battlefield under your control, you may gain life equal to the number of Allies you control. +SVar:TrigGainLife:AB$GainLife | Cost$ 0 | Defined$ You | LifeAmount$ X +SVar:X:Count$Valid Ally.YouCtrl SVar:PlayMain1:TRUE SVar:Rarity:Common SVar:Picture:http://www.wizards.com/global/images/magic/general/ondu_cleric.jpg diff --git a/res/cardsfolder/seascape_aerialist.txt b/res/cardsfolder/seascape_aerialist.txt index 11cc0cbae89..408e19c0268 100644 --- a/res/cardsfolder/seascape_aerialist.txt +++ b/res/cardsfolder/seascape_aerialist.txt @@ -1,8 +1,10 @@ Name:Seascape Aerialist ManaCost:4 U Types:Creature Merfolk Wizard Ally -Text:Whenever Seascape Aerialist or another Ally enters the battlefield under your control, you may have Ally creatures you control gain flying until end of turn. +Text:no text PT:2/3 +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self,Ally.YouCtrl | TriggerZones$ Battlefield | Optional$ True | Execute$ TrigPump | TriggerDescription$ Whenever CARDNAME or another Ally enters the battlefield under your control, you may have Ally creatures you control gain flying until end of turn. +SVar:TrigPump:AB$PumpAll | Cost$ 0 | ValidCards$ Ally.YouCtrl | KW$ Flying SVar:PlayMain1:TRUE SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/seascape_aerialist.jpg diff --git a/res/cardsfolder/turntimber_ranger.txt b/res/cardsfolder/turntimber_ranger.txt index 3df38740a17..acb81f9ae61 100644 --- a/res/cardsfolder/turntimber_ranger.txt +++ b/res/cardsfolder/turntimber_ranger.txt @@ -1,8 +1,11 @@ Name:Turntimber Ranger ManaCost:3 G G Types:Creature Elf Scout Ally -Text:Whenever Turntimber Ranger or another Ally enters the battlefield under your control, you may put a 2/2 green Wolf creature token onto the battlefield. If you do, put a +1/+1 counter on Turntimber Ranger. +Text:no text PT:2/2 +T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self,Ally.YouCtrl | TriggerZones$ Battlefield | Optional$ True | Execute$ TrigToken | TriggerDescription$ Whenever CARDNAME or another Ally enters the battlefield under your control, you may put a 2/2 green Wolf creature token onto the battlefield. If you do, put a +1/+1 counter on CARDNAME. +SVar:TrigToken:AB$Token | Cost$ 0 | TokenAmount$ 1 | TokenName$ Wolf | TokenTypes$ Creature,Wolf | TokenOwner$ Controller | TokenColors$ Green | TokenPower$ 2 | TokenToughness$ 2 | SubAbility$SVar=DBPutCounter +SVar:DBPutCounter:DB$PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1 SVar:PlayMain1:TRUE SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/turntimber_ranger.jpg diff --git a/src/forge/GameActionUtil.java b/src/forge/GameActionUtil.java index a8c12a61020..1ba028fd76f 100644 --- a/src/forge/GameActionUtil.java +++ b/src/forge/GameActionUtil.java @@ -3332,12 +3332,6 @@ public class GameActionUtil { || c.getName().equals("Tuktuk Grunts") || c.getName().equals("Umara Raptor") || c.getName().equals("Hada Freeblade") || c.getName().equals("Bojuka Brigand") || c.getName().equals("Graypelt Hunter")) ally_Generic_P1P1(c); - else if(c.getName().equals("Turntimber Ranger")) ally_Turntimber_Ranger(c); - else if(c.getName().equals("Highland Berserker")) ally_BoostUntilEOT(c, "First Strike"); - else if(c.getName().equals("Joraga Bard")) ally_BoostUntilEOT(c, "Vigilance"); - else if(c.getName().equals("Seascape Aerialist")) ally_BoostUntilEOT(c, "Flying"); - else if(c.getName().equals("Ondu Cleric")) ally_Ondu_Cleric(c); - } private static boolean showAllyDialog(Card c) { @@ -3373,118 +3367,6 @@ public class GameActionUtil { else if(c.getController().equals(AllZone.ComputerPlayer)) AllZone.Stack.add(ability); } - private static void ally_Turntimber_Ranger(Card c) { - final Card crd = c; - Ability ability = new Ability(c, "0") { - @Override - public void resolve() { - CardFactoryUtil.makeToken("Wolf", "G 2 2 Wolf", crd.getController(), "G", new String[] {"Creature", "Wolf"}, 2, 2, - new String[] {""}); - crd.addCounter(Counters.P1P1, 1); - } - }; - - StringBuilder sb = new StringBuilder(); - sb.append(c.getName()).append(" - Ally: ").append(c.getController()); - sb.append(" puts a 2/2 green Wolf creature token onto the battlefield, and adds a +1/+1 on "); - sb.append(c.getName()).append("."); - ability.setStackDescription(sb.toString()); - - if(c.getController().equals(AllZone.HumanPlayer)) { - if(showAllyDialog(c)) AllZone.Stack.add(ability); - } - - else if(c.getController().equals(AllZone.ComputerPlayer)) { - - PlayerZone cPlay = AllZone.Computer_Battlefield; - CardList list = new CardList(); - list.addAll(cPlay.getCards()); - - CardList cl = list.filter(new CardListFilter() { - public boolean addCard(Card crd) { - return crd.getName().equals("Conspiracy") && crd.getChosenType().equals("Ally"); - } - }); - - list = list.getName("Wolf"); - - if((list.size() > 15 && cl.size() > 0)) ; - else AllZone.Stack.add(ability); - } - } - - private static void ally_BoostUntilEOT(Card c, String k) { - final Card crd = c; - final String keyword = k; - - Ability ability = new Ability(c, "0") { - @Override - public void resolve() { - PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, crd.getController()); - CardList list = new CardList(play.getCards()); - list = list.getType("Ally"); - - final CardList allies = list; - - final Command untilEOT = new Command() { - - private static final long serialVersionUID = -8434529949884582940L; - - public void execute() { - for(Card creat:allies) { - if(AllZone.GameAction.isCardInPlay(creat)) { - creat.removeExtrinsicKeyword(keyword); - } - } - } - };//Command - - for(Card creat:allies) { - if(AllZone.GameAction.isCardInPlay(creat)) { - creat.addExtrinsicKeyword(keyword); - } - } - AllZone.EndOfTurn.addUntil(untilEOT); - - } - }; - - StringBuilder sb = new StringBuilder(); - sb.append(c.getName()).append(" - Ally: Ally creatures you control gain "); - sb.append(keyword).append(" until end of turn."); - ability.setStackDescription(sb.toString()); - - if(c.getController().equals(AllZone.HumanPlayer)) { - if(showAllyDialog(c)) AllZone.Stack.add(ability); - } - - else if(c.getController().equals(AllZone.ComputerPlayer)) AllZone.Stack.add(ability); - } - - private static void ally_Ondu_Cleric(final Card c) { - final Card crd = c; - - Ability ability = new Ability(c, "0") { - @Override - public void resolve() { - PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, crd.getController()); - CardList allies = new CardList(play.getCards()); - allies = allies.getType("Ally"); - crd.getController().gainLife(allies.size(), c); - } - }; - - StringBuilder sb = new StringBuilder(); - sb.append(c.getName()).append(" - Ally: gain life equal to the number of allies you control."); - ability.setStackDescription(sb.toString()); - - if(c.getController().equals(AllZone.HumanPlayer)) { - if(showAllyDialog(c)) AllZone.Stack.add(ability); - } - - else if(c.getController().equals(AllZone.ComputerPlayer)) AllZone.Stack.add(ability); - } - public static void executeDestroyCardEffects(Card c, Card destroyed) { if(destroyed.isCreature()) executeDestroyCreatureCardEffects(c, destroyed); if(destroyed.isLand()) executeDestroyLandCardEffects(c, destroyed);