diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/SenseiGoldenTail.java b/Mage.Sets/src/mage/sets/championsofkamigawa/SenseiGoldenTail.java index cbbeca53ef..ba84c482d7 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/SenseiGoldenTail.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/SenseiGoldenTail.java @@ -59,9 +59,10 @@ public class SenseiGoldenTail extends CardImpl { this.expansionSetCode = "CHK"; this.subtype.add("Fox"); this.subtype.add("Samurai"); - this.color.setWhite(true); + this.color.setWhite(true); this.power = new MageInt(2); this.toughness = new MageInt(1); + // Bushido 1 (When this blocks or becomes blocked, it gets +1/+1 until end of turn.) this.addAbility(new BushidoAbility(1)); // {1}{W}, {T}: Put a training counter on target creature. @@ -69,8 +70,8 @@ public class SenseiGoldenTail extends CardImpl { ability.addCost(new TapSourceCost()); ability.addTarget(new TargetCreaturePermanent()); // That creature gains bushido 1 and becomes a Samurai in addition to its other creature types. Activate this ability only any time you could cast a sorcery. - ability.addEffect(new GainAbilityTargetEffect(new BushidoAbility(1),Duration.WhileOnBattlefield)); - ability.addEffect(new AddCardSubTypeTargetEffect("Samurai",Duration.WhileOnBattlefield)); + ability.addEffect(new GainAbilityTargetEffect(new BushidoAbility(1),Duration.Custom)); + ability.addEffect(new AddCardSubTypeTargetEffect("Samurai",Duration.Custom)); this.addAbility(ability); } diff --git a/Mage.Sets/src/mage/sets/championsofkamigawa/ThroughTheBreach.java b/Mage.Sets/src/mage/sets/championsofkamigawa/ThroughTheBreach.java index 3d10f07364..281508cd4d 100644 --- a/Mage.Sets/src/mage/sets/championsofkamigawa/ThroughTheBreach.java +++ b/Mage.Sets/src/mage/sets/championsofkamigawa/ThroughTheBreach.java @@ -110,7 +110,7 @@ class ThroughTheBreachEffect extends OneShotEffect { if (card != null) { if (card.putOntoBattlefield(game, Zone.HAND, source.getId(), source.getControllerId())) { Permanent permanent = game.getPermanent(card.getId()); - ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.WhileOnBattlefield); + ContinuousEffect effect = new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.Custom); effect.setTargetPointer(new FixedTarget(permanent.getId())); game.addEffect(effect, source); SacrificeTargetEffect sacrificeEffect = new SacrificeTargetEffect("sacrifice boosted " + card.getName()); diff --git a/Mage.Sets/src/mage/sets/magic2013/XathridGorgon.java b/Mage.Sets/src/mage/sets/magic2013/XathridGorgon.java index 725ac376ad..1c32ad6628 100644 --- a/Mage.Sets/src/mage/sets/magic2013/XathridGorgon.java +++ b/Mage.Sets/src/mage/sets/magic2013/XathridGorgon.java @@ -28,20 +28,26 @@ package mage.sets.magic2013; import java.util.UUID; - -import mage.constants.*; import mage.MageInt; +import mage.ObjectColor; import mage.abilities.Ability; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.common.TapSourceCost; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.Effect; import mage.abilities.effects.ReplacementEffectImpl; import mage.abilities.effects.common.continious.AddCardTypeTargetEffect; import mage.abilities.effects.common.continious.GainAbilityTargetEffect; +import mage.abilities.effects.common.continious.SetCardColorTargetEffect; import mage.abilities.effects.common.counter.AddCountersTargetEffect; import mage.abilities.keyword.DeathtouchAbility; import mage.abilities.keyword.DefenderAbility; import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.Zone; import mage.counters.CounterType; import mage.game.Game; import mage.game.events.GameEvent; @@ -69,9 +75,14 @@ public class XathridGorgon extends CardImpl { // {2}{B}, {tap}: Put a petrification counter on target creature. It gains defender and becomes a colorless artifact in addition to its other types. Its activated abilities can't be activated. Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.PETRIFICATION.createInstance()), new ManaCostsImpl("{2}{B}")); ability.addCost(new TapSourceCost()); - ability.addTarget(new TargetCreaturePermanent()); - ability.addEffect(new GainAbilityTargetEffect(DefenderAbility.getInstance(), Duration.EndOfGame)); - ability.addEffect(new AddCardTypeTargetEffect(CardType.ARTIFACT, Duration.EndOfGame)); + ability.addTarget(new TargetCreaturePermanent(true)); + Effect effect = new GainAbilityTargetEffect(DefenderAbility.getInstance(), Duration.Custom); + effect.setText("It gains defender"); + ability.addEffect(effect); + effect = new AddCardTypeTargetEffect(CardType.ARTIFACT, Duration.Custom); + effect.setText("and becomes a colorless artifact in addition to its other types"); + ability.addEffect(effect); + ability.addEffect(new SetCardColorTargetEffect(new ObjectColor(), Duration.Custom, "")); ability.addEffect(new XathridGorgonEffect()); this.addAbility(ability); @@ -90,7 +101,7 @@ public class XathridGorgon extends CardImpl { class XathridGorgonEffect extends ReplacementEffectImpl { public XathridGorgonEffect() { - super(Duration.WhileOnBattlefield, Outcome.Detriment); + super(Duration.Custom, Outcome.Detriment); staticText = "Its activated abilities can't be activated"; } @@ -115,12 +126,12 @@ class XathridGorgonEffect extends ReplacementEffectImpl { @Override public boolean applies(GameEvent event, Ability source, Game game) { - if (event.getType() == GameEvent.EventType.ACTIVATE_ABILITY) { + if (event.getType().equals(GameEvent.EventType.ACTIVATE_ABILITY) && event.getSourceId().equals(targetPointer.getFirst(game, source))) { Permanent target = game.getPermanent(targetPointer.getFirst(game, source)); if (target != null) { - if (event.getSourceId().equals(target.getId())) { return true; - } + } else { + this.discard(); } } return false; diff --git a/Mage/src/mage/abilities/effects/common/CipherEffect.java b/Mage/src/mage/abilities/effects/common/CipherEffect.java index cbed455466..a763c03490 100644 --- a/Mage/src/mage/abilities/effects/common/CipherEffect.java +++ b/Mage/src/mage/abilities/effects/common/CipherEffect.java @@ -87,7 +87,7 @@ public class CipherEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player controller = game.getPlayer(source.getControllerId()); TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(true); - if (controller != null && target != null) { + if (controller != null) { if (target.canChoose(source.getControllerId(), game) && controller.chooseUse(outcome, "Cipher this spell to a creature?", game)) { controller.chooseTarget(outcome, target, source, game); diff --git a/Mage/src/mage/abilities/effects/common/continious/AddCardTypeTargetEffect.java b/Mage/src/mage/abilities/effects/common/continious/AddCardTypeTargetEffect.java index 566cf82c7c..0b65cf9184 100644 --- a/Mage/src/mage/abilities/effects/common/continious/AddCardTypeTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/continious/AddCardTypeTargetEffect.java @@ -28,6 +28,7 @@ package mage.abilities.effects.common.continious; +import java.util.UUID; import mage.abilities.Ability; import mage.abilities.Mode; import mage.abilities.effects.ContinuousEffectImpl; @@ -53,12 +54,22 @@ public class AddCardTypeTargetEffect extends ContinuousEffectImpl 0; } diff --git a/Mage/src/mage/abilities/effects/common/continious/SetCardColorTargetEffect.java b/Mage/src/mage/abilities/effects/common/continious/SetCardColorTargetEffect.java index 768d9f797e..a205317ce8 100644 --- a/Mage/src/mage/abilities/effects/common/continious/SetCardColorTargetEffect.java +++ b/Mage/src/mage/abilities/effects/common/continious/SetCardColorTargetEffect.java @@ -29,6 +29,7 @@ */ package mage.abilities.effects.common.continious; +import java.util.UUID; import mage.MageObject; import mage.ObjectColor; import mage.abilities.Ability; @@ -67,14 +68,22 @@ public class SetCardColorTargetEffect extends ContinuousEffectImpl