From bc667c7b086f8456e5b92b601329428f4d0ed5b8 Mon Sep 17 00:00:00 2001 From: melvin Date: Fri, 21 Sep 2012 17:58:31 +0800 Subject: [PATCH] replace player with PN and permanent with SN --- src/magic/card/Avenger_of_Zendikar.java | 22 ++++++++----------- src/magic/card/Creakwood_Liege.java | 24 +++++++++------------ src/magic/card/Flame_Kin_Zealot.java | 2 +- src/magic/card/Gustcloak_Savior.java | 18 ++++++---------- src/magic/card/Lighthouse_Chronologist.java | 8 +++---- src/magic/card/Maul_Splicer.java | 2 +- src/magic/card/Seraph_Sanctuary.java | 10 ++++----- src/magic/card/Stonybrook_Schoolmaster.java | 4 +--- src/magic/card/Timberland_Guide.java | 2 +- src/magic/card/Wren_s_Run_Packmaster.java | 4 +--- 10 files changed, 38 insertions(+), 58 deletions(-) diff --git a/src/magic/card/Avenger_of_Zendikar.java b/src/magic/card/Avenger_of_Zendikar.java index e707709e88..e50e4dbc7a 100644 --- a/src/magic/card/Avenger_of_Zendikar.java +++ b/src/magic/card/Avenger_of_Zendikar.java @@ -29,7 +29,7 @@ public class Avenger_of_Zendikar { permanent, player, this, - player + " puts a 0/1 green Plant creature token onto " + + "PN puts a 0/1 green Plant creature token onto " + "the battlefield for each land he or she controls."); } @Override @@ -51,19 +51,15 @@ public class Avenger_of_Zendikar { public static final MagicLandfallTrigger T2 = new MagicLandfallTrigger() { @Override public MagicEvent getEvent(final MagicPermanent permanent) { - final MagicPlayer player = permanent.getController(); return new MagicEvent( - permanent, - player, - new MagicSimpleMayChoice( - player + " may put a +1/+1 counter on each " + - "Plant creature he or she controls.", - MagicSimpleMayChoice.ADD_CHARGE_COUNTER, - 1, - MagicSimpleMayChoice.DEFAULT_YES), - this, - player + " may$ put a +1/+1 counter on each " + - "Plant creature he or she controls."); + permanent, + new MagicSimpleMayChoice( + MagicSimpleMayChoice.ADD_CHARGE_COUNTER, + 1, + MagicSimpleMayChoice.DEFAULT_YES), + this, + "PN may$ put a +1/+1 counter on each " + + "Plant creature he or she controls."); } @Override public void executeEvent( diff --git a/src/magic/card/Creakwood_Liege.java b/src/magic/card/Creakwood_Liege.java index 781dea123f..3481abeb06 100644 --- a/src/magic/card/Creakwood_Liege.java +++ b/src/magic/card/Creakwood_Liege.java @@ -42,21 +42,17 @@ public class Creakwood_Liege { }; public static final MagicAtUpkeepTrigger T = new MagicAtUpkeepTrigger() { @Override - public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer data) { - final MagicPlayer player = permanent.getController(); - return (player == data) ? + public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer upkeepPlayer) { + return permanent.isController(upkeepPlayer) ? new MagicEvent( - permanent, - player, - new MagicSimpleMayChoice( - player + " may put a 1/1 black and green " + - "Worm creature token onto the battlefield.", - MagicSimpleMayChoice.PLAY_TOKEN, - 1, - MagicSimpleMayChoice.DEFAULT_YES), - this, - player + " may$ put a 1/1 black and green " + - "Worm creature token onto the battlefield."): + permanent, + new MagicSimpleMayChoice( + MagicSimpleMayChoice.PLAY_TOKEN, + 1, + MagicSimpleMayChoice.DEFAULT_YES), + this, + "PN may$ put a 1/1 black and green " + + "Worm creature token onto the battlefield."): MagicEvent.NONE; } @Override diff --git a/src/magic/card/Flame_Kin_Zealot.java b/src/magic/card/Flame_Kin_Zealot.java index 6974c6aeb9..ac4dffdeac 100644 --- a/src/magic/card/Flame_Kin_Zealot.java +++ b/src/magic/card/Flame_Kin_Zealot.java @@ -25,7 +25,7 @@ public class Flame_Kin_Zealot { permanent, player, this, - "Creatures " + player + " controls get " + + "Creatures PN controls get " + "+1/+1 and gain haste until end of turn."); } @Override diff --git a/src/magic/card/Gustcloak_Savior.java b/src/magic/card/Gustcloak_Savior.java index 935d3162dc..842de9a1d3 100644 --- a/src/magic/card/Gustcloak_Savior.java +++ b/src/magic/card/Gustcloak_Savior.java @@ -13,17 +13,13 @@ public class Gustcloak_Savior { public static final MagicWhenBecomesBlockedTrigger T = new MagicWhenBecomesBlockedTrigger() { @Override public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent creature) { - final MagicPlayer player = permanent.getController(); - return (creature.getController() == player) ? - new MagicEvent( - permanent, - player, - new MagicMayChoice(player + " may untap " + creature + - " and remove it from combat."), - new Object[]{creature}, - this, - player + " may$ untap " + creature + - " and remove it from combat.") : + return permanent.hasSameController(creature) ? + new MagicEvent( + permanent, + new MagicMayChoice(), + new Object[]{creature}, + this, + "PN may$ untap " + creature + " and remove it from combat.") : MagicEvent.NONE; } diff --git a/src/magic/card/Lighthouse_Chronologist.java b/src/magic/card/Lighthouse_Chronologist.java index 144e8c9fb3..68acc91d47 100644 --- a/src/magic/card/Lighthouse_Chronologist.java +++ b/src/magic/card/Lighthouse_Chronologist.java @@ -26,15 +26,13 @@ public class Lighthouse_Chronologist { public static final MagicAtEndOfTurnTrigger T = new MagicAtEndOfTurnTrigger() { @Override - public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer data) { - final MagicPlayer player = permanent.getController(); + public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPlayer eotPlayer) { return (permanent.getCounters(MagicCounterType.Charge) >= 7 && - player != data) ? + permanent.isOpponent(eotPlayer)) ? new MagicEvent( permanent, - player, this, - player + " takes an extra turn after this one.") : + "PN takes an extra turn after this one.") : MagicEvent.NONE; } @Override diff --git a/src/magic/card/Maul_Splicer.java b/src/magic/card/Maul_Splicer.java index 3a65577c8e..86632c3f80 100644 --- a/src/magic/card/Maul_Splicer.java +++ b/src/magic/card/Maul_Splicer.java @@ -29,7 +29,7 @@ public class Maul_Splicer { permanent, player, this, - player + " puts two 3/3 colorless Golem artifact creature tokens onto the battlefield."); + "PN puts two 3/3 colorless Golem artifact creature tokens onto the battlefield."); } @Override diff --git a/src/magic/card/Seraph_Sanctuary.java b/src/magic/card/Seraph_Sanctuary.java index 8fadde8b8b..39bee8fbc1 100644 --- a/src/magic/card/Seraph_Sanctuary.java +++ b/src/magic/card/Seraph_Sanctuary.java @@ -15,14 +15,12 @@ public class Seraph_Sanctuary { final MagicGame game, final MagicPermanent permanent, final MagicPermanent otherPermanent) { - final MagicPlayer player = permanent.getController(); - return (otherPermanent.getController() == player && + return (otherPermanent.hasSameController(permanent) && otherPermanent.hasSubType(MagicSubType.Angel)) ? new MagicEvent( - permanent, - player, - this, - player + " gains 1 life.") : + permanent, + this, + "PN gains 1 life.") : MagicEvent.NONE; } diff --git a/src/magic/card/Stonybrook_Schoolmaster.java b/src/magic/card/Stonybrook_Schoolmaster.java index 1c7d611241..ae22f2bbad 100644 --- a/src/magic/card/Stonybrook_Schoolmaster.java +++ b/src/magic/card/Stonybrook_Schoolmaster.java @@ -12,13 +12,11 @@ public class Stonybrook_Schoolmaster { public static final MagicWhenBecomesTappedTrigger T = new MagicWhenBecomesTappedTrigger() { @Override public MagicEvent executeTrigger(final MagicGame game,final MagicPermanent permanent,final MagicPermanent data) { - final MagicPlayer player = permanent.getController(); return (permanent == data) ? new MagicEvent( permanent, - player, this, - player + " puts a 1/1 blue Merfolk Wizard creature token onto the battlefield.") : + "PN puts a 1/1 blue Merfolk Wizard creature token onto the battlefield.") : MagicEvent.NONE; } @Override diff --git a/src/magic/card/Timberland_Guide.java b/src/magic/card/Timberland_Guide.java index 424cf44dcb..471087ce8f 100644 --- a/src/magic/card/Timberland_Guide.java +++ b/src/magic/card/Timberland_Guide.java @@ -24,7 +24,7 @@ public class Timberland_Guide { MagicTargetChoice.TARGET_CREATURE, MagicPumpTargetPicker.create(), this, - player + " puts a +1/+1 counter on target creature$."); + "PN puts a +1/+1 counter on target creature$."); } @Override public void executeEvent( diff --git a/src/magic/card/Wren_s_Run_Packmaster.java b/src/magic/card/Wren_s_Run_Packmaster.java index 4fbf671fd1..f9d87bedb9 100644 --- a/src/magic/card/Wren_s_Run_Packmaster.java +++ b/src/magic/card/Wren_s_Run_Packmaster.java @@ -42,12 +42,10 @@ public class Wren_s_Run_Packmaster { @Override public MagicEvent getPermanentEvent(final MagicPermanent source,final MagicPayedCost payedCost) { - final MagicPlayer player = source.getController(); return new MagicEvent( source, - player, this, - player + " puts a 2/2 green Wolf creature token onto the battlefield."); + "PN puts a 2/2 green Wolf creature token onto the battlefield."); } @Override