From 8caa3087bdae2fea19391ea1b935debb7f1c6686 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Thu, 18 Jun 2015 17:00:21 +0200 Subject: [PATCH] * Some minor changes, some fixes to Dideon Battle-Forged. --- .../src/mage/sets/magicorigins/GideonBattleForged.java | 10 ++++++++++ .../src/mage/sets/zendikar/PyromancerAscension.java | 2 +- .../effects/common/CopyTargetSpellEffect.java | 5 +++-- Mage/src/mage/abilities/keyword/StormAbility.java | 6 +++--- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Mage.Sets/src/mage/sets/magicorigins/GideonBattleForged.java b/Mage.Sets/src/mage/sets/magicorigins/GideonBattleForged.java index 5c291b6c299..729c7ca129d 100644 --- a/Mage.Sets/src/mage/sets/magicorigins/GideonBattleForged.java +++ b/Mage.Sets/src/mage/sets/magicorigins/GideonBattleForged.java @@ -88,6 +88,7 @@ public class GideonBattleForged extends CardImpl { Effect effect = new GainAbilityTargetEffect(IndestructibleAbility.getInstance(), Duration.UntilYourNextTurn); effect.setText("Until your next turn, target creature gains indestructible"); loyaltyAbility = new LoyaltyAbility(effect, 1); + loyaltyAbility.addTarget(new TargetCreaturePermanent()); effect = new UntapTargetEffect(); effect.setText("Untap that creature"); loyaltyAbility.addEffect(effect); @@ -149,6 +150,9 @@ class GideonBattleForgedAttacksIfAbleTargetEffect extends RequirementEffect { @Override public boolean isInactive(Ability source, Game game) { + if (targetPermanentReference == null) { + return true; + } Permanent targetPermanent = targetPermanentReference.getPermanent(game); if (targetPermanent == null) { return false; @@ -158,6 +162,12 @@ class GideonBattleForgedAttacksIfAbleTargetEffect extends RequirementEffect { } return game.getPhase().getType() == TurnPhase.END && game.getTurnNum() > nextTurnTargetController; } + + @Override + public void init(Ability source, Game game) { + targetPermanentReference = new MageObjectReference(getTargetPointer().getFirst(game, source), game); + super.init(source, game); + } @Override public boolean applies(Permanent permanent, Ability source, Game game) { diff --git a/Mage.Sets/src/mage/sets/zendikar/PyromancerAscension.java b/Mage.Sets/src/mage/sets/zendikar/PyromancerAscension.java index 5eb3676dc2a..55898b1d78c 100644 --- a/Mage.Sets/src/mage/sets/zendikar/PyromancerAscension.java +++ b/Mage.Sets/src/mage/sets/zendikar/PyromancerAscension.java @@ -54,9 +54,9 @@ public class PyromancerAscension extends CardImpl { super(ownerId, 143, "Pyromancer Ascension", Rarity.RARE, new CardType[] { CardType.ENCHANTMENT }, "{1}{R}"); this.expansionSetCode = "ZEN"; - // Whenever you cast an instant or sorcery spell that has the same name as a card in your graveyard, you may put a quest counter on Pyromancer Ascension. this.addAbility(new PyromancerAscensionQuestTriggeredAbility()); + // Whenever you cast an instant or sorcery spell while Pyromancer Ascension has two or more quest counters on it, you may copy that spell. You may choose new targets for the copy. this.addAbility(new PyromancerAscensionCopyTriggeredAbility()); } diff --git a/Mage/src/mage/abilities/effects/common/CopyTargetSpellEffect.java b/Mage/src/mage/abilities/effects/common/CopyTargetSpellEffect.java index 2037ef3833e..6d02c2cb8e0 100644 --- a/Mage/src/mage/abilities/effects/common/CopyTargetSpellEffect.java +++ b/Mage/src/mage/abilities/effects/common/CopyTargetSpellEffect.java @@ -69,8 +69,9 @@ public class CopyTargetSpellEffect extends OneShotEffect { if (activateMessage.startsWith(" casts ")) { activateMessage = activateMessage.substring(6); } - if (!game.isSimulation()) - game.informPlayers(player.getLogName() + " copies " + activateMessage); + if (!game.isSimulation()) { + game.informPlayers(player.getLogName() + activateMessage); + } return true; } return false; diff --git a/Mage/src/mage/abilities/keyword/StormAbility.java b/Mage/src/mage/abilities/keyword/StormAbility.java index 10377a0b1f9..df0352dece5 100644 --- a/Mage/src/mage/abilities/keyword/StormAbility.java +++ b/Mage/src/mage/abilities/keyword/StormAbility.java @@ -69,8 +69,8 @@ public class StormAbility extends TriggeredAbilityImpl { @Override public boolean checkTrigger(GameEvent event, Game game) { - if (event.getSourceId().equals(this.sourceId)) { - StackObject spell = game.getStack().getStackObject(this.sourceId); + if (event.getSourceId().equals(getSourceId())) { + StackObject spell = game.getStack().getStackObject(getSourceId()); if (spell instanceof Spell) { for (Effect effect : this.getEffects()) { effect.setValue("StormSpell", spell); @@ -108,7 +108,7 @@ class StormEffect extends OneShotEffect { Spell spell = (Spell) this.getValue("StormSpell"); if (spell != null) { if (!game.isSimulation()) { - game.informPlayers("Storm: " + spell.getName() + " will be copied " + stormCount + " time" + (stormCount > 1 ?"s":"")); + game.informPlayers("Storm: " + spell.getLogName() + " will be copied " + stormCount + " time" + (stormCount > 1 ?"s":"")); } for (int i = 0; i < stormCount; i++) { Spell copy = spell.copySpell();