mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 14:32:06 -08:00
[LTR] Implement Mordor Trebuchet (#10496)
Along with its unique token Ballistic Boulder.
This commit is contained in:
parent
6e2b35e6a3
commit
06cce0ce22
3 changed files with 137 additions and 0 deletions
102
Mage.Sets/src/mage/cards/m/MordorTrebuchet.java
Normal file
102
Mage.Sets/src/mage/cards/m/MordorTrebuchet.java
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksWithCreaturesTriggeredAbility;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.BallisticBoulder;
|
||||
import mage.game.permanent.token.PhyrexianHorrorRedToken;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.targetpointer.FixedTargets;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class MordorTrebuchet extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter
|
||||
= new FilterCreaturePermanent("Goblins and/or Orcs");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
SubType.GOBLIN.getPredicate(),
|
||||
SubType.ORC.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
public MordorTrebuchet(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{B}");
|
||||
|
||||
this.subtype.add(SubType.WALL);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Defender
|
||||
this.addAbility(DefenderAbility.getInstance());
|
||||
|
||||
// Whenever you attack with one or more Goblins and/or Orcs,
|
||||
// create a 2/1 colorless Construct artifact creature token
|
||||
// with flying named Ballistic Boulder that's tapped and attacking.
|
||||
// Sacrifice that token at end of combat.
|
||||
this.addAbility(new AttacksWithCreaturesTriggeredAbility(
|
||||
new MordorTrebuchetEffect(), 1, filter
|
||||
).setTriggerPhrase("Whenever you attack with one or more Goblins and/or Orcs, "));
|
||||
}
|
||||
|
||||
private MordorTrebuchet(final MordorTrebuchet card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MordorTrebuchet copy() {
|
||||
return new MordorTrebuchet(this);
|
||||
}
|
||||
}
|
||||
|
||||
class MordorTrebuchetEffect extends OneShotEffect {
|
||||
|
||||
MordorTrebuchetEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "create a 2/1 colorless Construct artifact creature token " +
|
||||
"with flying named Ballistic Boulder that's tapped and attacking. " +
|
||||
"Sacrifice that token at end of combat.";
|
||||
}
|
||||
|
||||
private MordorTrebuchetEffect(final MordorTrebuchetEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MordorTrebuchetEffect copy() {
|
||||
return new MordorTrebuchetEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Token token = new BallisticBoulder();
|
||||
token.putOntoBattlefield(1, game, source, source.getControllerId(), true, true);
|
||||
game.addDelayedTriggeredAbility(new AtTheEndOfCombatDelayedTriggeredAbility(
|
||||
new SacrificeTargetEffect().setText("sacrifice it")
|
||||
.setTargetPointer(new FixedTargets(token, game))
|
||||
), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -168,6 +168,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Mirrormere Guardian", 179, Rarity.COMMON, mage.cards.m.MirrormereGuardian.class));
|
||||
cards.add(new SetCardInfo("Mithril Coat", 245, Rarity.RARE, mage.cards.m.MithrilCoat.class));
|
||||
cards.add(new SetCardInfo("Mordor Muster", 96, Rarity.COMMON, mage.cards.m.MordorMuster.class));
|
||||
cards.add(new SetCardInfo("Mordor Trebuchet", 97, Rarity.COMMON, mage.cards.m.MordorTrebuchet.class));
|
||||
cards.add(new SetCardInfo("Morgul-Knife Wound", 98, Rarity.COMMON, mage.cards.m.MorgulKnifeWound.class));
|
||||
cards.add(new SetCardInfo("Moria Marauder", 138, Rarity.RARE, mage.cards.m.MoriaMarauder.class));
|
||||
cards.add(new SetCardInfo("Mount Doom", 258, Rarity.MYTHIC, mage.cards.m.MountDoom.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
|
||||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class BallisticBoulder extends TokenImpl {
|
||||
|
||||
public BallisticBoulder() {
|
||||
super("Ballistic Boulder", "2/1 colorless Construct artifact creature token with flying named Ballistic Boulder");
|
||||
cardType.add(CardType.CREATURE);
|
||||
cardType.add(CardType.ARTIFACT);
|
||||
subtype.add(SubType.CONSTRUCT);
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
}
|
||||
|
||||
public BallisticBoulder(final BallisticBoulder token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public BallisticBoulder copy() {
|
||||
return new BallisticBoulder(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue