mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
refactor: SimpleActivatedAbility default zone (separate line)
This commit is contained in:
parent
762edb2048
commit
140361223d
18 changed files with 18 additions and 20 deletions
|
|
@ -41,7 +41,7 @@ public final class FlaringFlameKin extends CardImpl {
|
||||||
ability.addEffect(new ConditionalContinuousEffect(
|
ability.addEffect(new ConditionalContinuousEffect(
|
||||||
new GainAbilitySourceEffect(TrampleAbility.getInstance()), enchanted,
|
new GainAbilitySourceEffect(TrampleAbility.getInstance()), enchanted,
|
||||||
", has trample"));
|
", has trample"));
|
||||||
Ability grantedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
Ability grantedAbility = new SimpleActivatedAbility(
|
||||||
new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl<>("{R}"));
|
new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl<>("{R}"));
|
||||||
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(grantedAbility),
|
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(grantedAbility),
|
||||||
enchanted, ", and has \"{R}: {this} gets +1/+0 until end of turn.\""));
|
enchanted, ", and has \"{R}: {this} gets +1/+0 until end of turn.\""));
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public final class FlowstoneCrusher extends CardImpl {
|
||||||
this.toughness = new MageInt(4);
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
// {R}: Flowstone Crusher gets +1/-1 until end of turn.
|
// {R}: Flowstone Crusher gets +1/-1 until end of turn.
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
this.addAbility(new SimpleActivatedAbility(
|
||||||
new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl<>("{R}")));
|
new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl<>("{R}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public final class FlowstoneShambler extends CardImpl {
|
||||||
this.toughness = new MageInt(2);
|
this.toughness = new MageInt(2);
|
||||||
|
|
||||||
// {R}: Flowstone Shambler gets +1/-1 until end of turn.
|
// {R}: Flowstone Shambler gets +1/-1 until end of turn.
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
this.addAbility(new SimpleActivatedAbility(
|
||||||
new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl<>("{R}")));
|
new BoostSourceEffect(1, -1, Duration.EndOfTurn), new ManaCostsImpl<>("{R}")));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ public final class FoulPresence extends CardImpl {
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
// Enchanted creature gets -1/-1 and has "{T}: Target creature gets -1/-1 until end of turn."
|
// Enchanted creature gets -1/-1 and has "{T}: Target creature gets -1/-1 until end of turn."
|
||||||
ability = new SimpleStaticAbility(new BoostEnchantedEffect(-1, -1, Duration.WhileOnBattlefield));
|
ability = new SimpleStaticAbility(new BoostEnchantedEffect(-1, -1, Duration.WhileOnBattlefield));
|
||||||
Ability gainedAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
Ability gainedAbility = new SimpleActivatedAbility(
|
||||||
new BoostTargetEffect(-1, -1, Duration.EndOfTurn), new TapSourceCost());
|
new BoostTargetEffect(-1, -1, Duration.EndOfTurn), new TapSourceCost());
|
||||||
gainedAbility.addTarget(new TargetCreaturePermanent());
|
gainedAbility.addTarget(new TargetCreaturePermanent());
|
||||||
Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield);
|
Effect effect = new GainAbilityAttachedEffect(gainedAbility, AttachmentType.AURA, Duration.WhileOnBattlefield);
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public final class GhostTactician extends CardImpl {
|
||||||
this.toughness = new MageInt(5);
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
// {W}, {T}, Discard a card: Creatures you control get +1/+0 until end of turn.
|
// {W}, {T}, Discard a card: Creatures you control get +1/+0 until end of turn.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
Ability ability = new SimpleActivatedAbility(
|
||||||
new BoostControlledEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl<>("{W}"));
|
new BoostControlledEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl<>("{W}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addCost(new DiscardCardCost());
|
ability.addCost(new DiscardCardCost());
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ public final class GoblinDynamo extends CardImpl {
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
||||||
//{X}{R}, {T}, Sacrifice Goblin Dynamo: Goblin Dynamo deals X damage to any target.
|
//{X}{R}, {T}, Sacrifice Goblin Dynamo: Goblin Dynamo deals X damage to any target.
|
||||||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,new DamageTargetEffect(GetXValue.instance, "it"), new ManaCostsImpl<>("{X}{R}"));
|
ability = new SimpleActivatedAbility(new DamageTargetEffect(GetXValue.instance, "it"), new ManaCostsImpl<>("{X}{R}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addCost(new SacrificeSourceCost());
|
ability.addCost(new SacrificeSourceCost());
|
||||||
ability.addTarget(new TargetAnyTarget());
|
ability.addTarget(new TargetAnyTarget());
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public final class LlanowarVanguard extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// {T}: Llanowar Vanguard gets +0/+4 until end of turn.
|
// {T}: Llanowar Vanguard gets +0/+4 until end of turn.
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
this.addAbility(new SimpleActivatedAbility(
|
||||||
new BoostSourceEffect(0, 4, Duration.EndOfTurn), new TapSourceCost()));
|
new BoostSourceEffect(0, 4, Duration.EndOfTurn), new TapSourceCost()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ public final class ObsidianAcolyte extends CardImpl {
|
||||||
// Protection from black
|
// Protection from black
|
||||||
this.addAbility(ProtectionAbility.from(ObjectColor.BLACK));
|
this.addAbility(ProtectionAbility.from(ObjectColor.BLACK));
|
||||||
// {W}: Target creature gains protection from black until end of turn.
|
// {W}: Target creature gains protection from black until end of turn.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
Ability ability = new SimpleActivatedAbility(
|
||||||
new GainAbilityTargetEffect(ProtectionAbility.from(ObjectColor.BLACK), Duration.EndOfTurn), new ManaCostsImpl<>("{W}"));
|
new GainAbilityTargetEffect(ProtectionAbility.from(ObjectColor.BLACK), Duration.EndOfTurn), new ManaCostsImpl<>("{W}"));
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ public final class ParallaxInhibitor extends CardImpl {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
|
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{2}");
|
||||||
|
|
||||||
// {1}, {tap}, Sacrifice Parallax Inhibitor: Put a fade counter on each permanent with fading you control.
|
// {1}, {tap}, Sacrifice Parallax Inhibitor: Put a fade counter on each permanent with fading you control.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
Ability ability = new SimpleActivatedAbility(
|
||||||
new AddCountersAllEffect(CounterType.FADE.createInstance(), filter), new ManaCostsImpl<>("{1}"));
|
new AddCountersAllEffect(CounterType.FADE.createInstance(), filter), new ManaCostsImpl<>("{1}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addCost(new SacrificeSourceCost());
|
ability.addCost(new SacrificeSourceCost());
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public final class QuicksilverWall extends CardImpl {
|
||||||
// Defender
|
// Defender
|
||||||
this.addAbility(DefenderAbility.getInstance());
|
this.addAbility(DefenderAbility.getInstance());
|
||||||
// {4}: Return Quicksilver Wall to its owner's hand. Any player may activate this ability.
|
// {4}: Return Quicksilver Wall to its owner's hand. Any player may activate this ability.
|
||||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
SimpleActivatedAbility ability = new SimpleActivatedAbility(
|
||||||
new ReturnToHandSourceEffect(true), new ManaCostsImpl<>("{4}"));
|
new ReturnToHandSourceEffect(true), new ManaCostsImpl<>("{4}"));
|
||||||
ability.setMayActivate(TargetController.ANY);
|
ability.setMayActivate(TargetController.ANY);
|
||||||
ability.addEffect(new InfoEffect("Any player may activate this ability"));
|
ability.addEffect(new InfoEffect("Any player may activate this ability"));
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ public final class SilvergladePathfinder extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// {1}{G}, {tap}, Discard a card: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library.
|
// {1}{G}, {tap}, Discard a card: Search your library for a basic land card and put that card onto the battlefield tapped. Then shuffle your library.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
Ability ability = new SimpleActivatedAbility(
|
||||||
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true, true),
|
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(StaticFilters.FILTER_CARD_BASIC_LAND), true, true),
|
||||||
new ManaCostsImpl<>("{1}{G}"));
|
new ManaCostsImpl<>("{1}{G}"));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public final class SkywingAven extends CardImpl {
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// Discard a card: Return Skywing Aven to its owner's hand.
|
// Discard a card: Return Skywing Aven to its owner's hand.
|
||||||
this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
this.addAbility(new SimpleActivatedAbility(
|
||||||
new ReturnToHandSourceEffect(),
|
new ReturnToHandSourceEffect(),
|
||||||
new DiscardCardCost()));
|
new DiscardCardCost()));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public final class SoratamiMindsweeper extends CardImpl {
|
||||||
this.addAbility(FlyingAbility.getInstance());
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
// {2}, Return a land you control to its owner's hand: Target player puts the top two cards of their library into their graveyard.
|
// {2}, Return a land you control to its owner's hand: Target player puts the top two cards of their library into their graveyard.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,new MillCardsTargetEffect(2), new ManaCostsImpl<>("{2}"));
|
Ability ability = new SimpleActivatedAbility(new MillCardsTargetEffect(2), new ManaCostsImpl<>("{2}"));
|
||||||
ability.addTarget(new TargetPlayer());
|
ability.addTarget(new TargetPlayer());
|
||||||
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
|
ability.addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter)));
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ public final class TeardropKami extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// Sacrifice Teardrop Kami: You may tap or untap target creature.
|
// Sacrifice Teardrop Kami: You may tap or untap target creature.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,new MayTapOrUntapTargetEffect(), new SacrificeSourceCost());
|
Ability ability = new SimpleActivatedAbility(new MayTapOrUntapTargetEffect(), new SacrificeSourceCost());
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
@ -42,5 +42,3 @@ public final class TeardropKami extends CardImpl {
|
||||||
return new TeardropKami(this);
|
return new TeardropKami(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ public final class TriangleOfWar extends CardImpl {
|
||||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}");
|
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}");
|
||||||
|
|
||||||
// {2}, Sacrifice Triangle of War: Target creature you control fights target creature an opponent controls.
|
// {2}, Sacrifice Triangle of War: Target creature you control fights target creature an opponent controls.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
Ability ability = new SimpleActivatedAbility(
|
||||||
new FightTargetsEffect(),
|
new FightTargetsEffect(),
|
||||||
new ManaCostsImpl<>("{2}"));
|
new ManaCostsImpl<>("{2}"));
|
||||||
ability.addCost(new SacrificeSourceCost());
|
ability.addCost(new SacrificeSourceCost());
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ public final class Trollhide extends CardImpl {
|
||||||
|
|
||||||
// Enchanted creature gets +2/+2 and has "{1}{G}: Regenerate this creature."
|
// Enchanted creature gets +2/+2 and has "{1}{G}: Regenerate this creature."
|
||||||
ability = new SimpleStaticAbility(new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield));
|
ability = new SimpleStaticAbility(new BoostEnchantedEffect(2, 2, Duration.WhileOnBattlefield));
|
||||||
Effect effect = new GainAbilityAttachedEffect(new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
Effect effect = new GainAbilityAttachedEffect(new SimpleActivatedAbility(
|
||||||
new RegenerateSourceEffect(), new ManaCostsImpl<>("{1}{G}")), AttachmentType.AURA);
|
new RegenerateSourceEffect(), new ManaCostsImpl<>("{1}{G}")), AttachmentType.AURA);
|
||||||
effect.setText("and has \"{1}{G}: Regenerate this creature.\"");
|
effect.setText("and has \"{1}{G}: Regenerate this creature.\"");
|
||||||
ability.addEffect(effect);
|
ability.addEffect(effect);
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public final class TsabosAssassin extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// {tap}: Destroy target creature if it shares a color with the most common color among all permanents or a color tied for most common. A creature destroyed this way can't be regenerated.
|
// {tap}: Destroy target creature if it shares a color with the most common color among all permanents or a color tied for most common. A creature destroyed this way can't be regenerated.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,new TsabosAssasinEffect(),new TapSourceCost());
|
Ability ability = new SimpleActivatedAbility(new TsabosAssasinEffect(),new TapSourceCost());
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public final class WhipSergeant extends CardImpl {
|
||||||
this.toughness = new MageInt(1);
|
this.toughness = new MageInt(1);
|
||||||
|
|
||||||
// {R}: Target creature gains haste until end of turn.
|
// {R}: Target creature gains haste until end of turn.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
Ability ability = new SimpleActivatedAbility(
|
||||||
new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl<>("{R}"));
|
new GainAbilityTargetEffect(HasteAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl<>("{R}"));
|
||||||
ability.addTarget(new TargetCreaturePermanent());
|
ability.addTarget(new TargetCreaturePermanent());
|
||||||
this.addAbility(ability);
|
this.addAbility(ability);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue