mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 04:39:18 -08:00
* Xathrid Gorgon - Fixed that the targeted creatures didn't get colorless.
This commit is contained in:
parent
e8d4fd1ead
commit
9d56514085
7 changed files with 67 additions and 26 deletions
|
|
@ -59,9 +59,10 @@ public class SenseiGoldenTail extends CardImpl<SenseiGoldenTail> {
|
|||
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<SenseiGoldenTail> {
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ class ThroughTheBreachEffect extends OneShotEffect<ThroughTheBreachEffect> {
|
|||
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());
|
||||
|
|
|
|||
|
|
@ -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<XathridGorgon> {
|
|||
// {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<XathridGorgon> {
|
|||
class XathridGorgonEffect extends ReplacementEffectImpl<XathridGorgonEffect> {
|
||||
|
||||
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<XathridGorgonEffect> {
|
|||
|
||||
@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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue