mirror of
https://github.com/correl/mage.git
synced 2024-11-22 03:00:11 +00:00
[LTR] Implement Landroval, Horizon Witness
This commit is contained in:
parent
d5f93ec8f4
commit
6d4c7cc67f
2 changed files with 87 additions and 0 deletions
86
Mage.Sets/src/mage/cards/l/LandrovalHorizonWitness.java
Normal file
86
Mage.Sets/src/mage/cards/l/LandrovalHorizonWitness.java
Normal file
|
@ -0,0 +1,86 @@
|
||||||
|
package mage.cards.l;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.TriggeredAbilityImpl;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.filter.FilterPermanent;
|
||||||
|
import mage.filter.common.FilterAttackingCreature;
|
||||||
|
import mage.filter.predicate.Predicates;
|
||||||
|
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.events.DefenderAttackedEvent;
|
||||||
|
import mage.game.events.GameEvent;
|
||||||
|
import mage.target.TargetPermanent;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class LandrovalHorizonWitness extends CardImpl {
|
||||||
|
|
||||||
|
public LandrovalHorizonWitness(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}");
|
||||||
|
|
||||||
|
this.supertype.add(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.BIRD);
|
||||||
|
this.subtype.add(SubType.NOBLE);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// Flying
|
||||||
|
this.addAbility(FlyingAbility.getInstance());
|
||||||
|
|
||||||
|
// Whenever two or more creatures you control attack a player, target attacking creature without flying gains flying until end of turn.
|
||||||
|
this.addAbility(new LandrovalHorizonWitnessTriggeredAbility());
|
||||||
|
}
|
||||||
|
|
||||||
|
private LandrovalHorizonWitness(final LandrovalHorizonWitness card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LandrovalHorizonWitness copy() {
|
||||||
|
return new LandrovalHorizonWitness(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class LandrovalHorizonWitnessTriggeredAbility extends TriggeredAbilityImpl {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter
|
||||||
|
= new FilterAttackingCreature("attacking creature without flying");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.not(new AbilityPredicate(FlyingAbility.class)));
|
||||||
|
}
|
||||||
|
|
||||||
|
LandrovalHorizonWitnessTriggeredAbility() {
|
||||||
|
super(Zone.BATTLEFIELD, new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn));
|
||||||
|
this.addTarget(new TargetPermanent(filter));
|
||||||
|
}
|
||||||
|
|
||||||
|
private LandrovalHorizonWitnessTriggeredAbility(final LandrovalHorizonWitnessTriggeredAbility ability) {
|
||||||
|
super(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LandrovalHorizonWitnessTriggeredAbility copy() {
|
||||||
|
return new LandrovalHorizonWitnessTriggeredAbility(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkEventType(GameEvent event, Game game) {
|
||||||
|
return event.getType() == GameEvent.EventType.DEFENDER_ATTACKED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
|
return isControlledBy(event.getPlayerId())
|
||||||
|
&& game.getPlayer(event.getTargetId()) != null
|
||||||
|
&& ((DefenderAttackedEvent) event).getAttackers(game).size() >= 2;
|
||||||
|
}
|
||||||
|
}
|
|
@ -116,6 +116,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Ithilien Kingfisher", 58, Rarity.COMMON, mage.cards.i.IthilienKingfisher.class));
|
cards.add(new SetCardInfo("Ithilien Kingfisher", 58, Rarity.COMMON, mage.cards.i.IthilienKingfisher.class));
|
||||||
cards.add(new SetCardInfo("Knight of the Keep", 291, Rarity.COMMON, mage.cards.k.KnightOfTheKeep.class));
|
cards.add(new SetCardInfo("Knight of the Keep", 291, Rarity.COMMON, mage.cards.k.KnightOfTheKeep.class));
|
||||||
cards.add(new SetCardInfo("Knights of Dol Amroth", 59, Rarity.COMMON, mage.cards.k.KnightsOfDolAmroth.class));
|
cards.add(new SetCardInfo("Knights of Dol Amroth", 59, Rarity.COMMON, mage.cards.k.KnightsOfDolAmroth.class));
|
||||||
|
cards.add(new SetCardInfo("Landroval, Horizon Witness", 21, Rarity.UNCOMMON, mage.cards.l.LandrovalHorizonWitness.class));
|
||||||
cards.add(new SetCardInfo("Lash of the Balrog", 92, Rarity.COMMON, mage.cards.l.LashOfTheBalrog.class));
|
cards.add(new SetCardInfo("Lash of the Balrog", 92, Rarity.COMMON, mage.cards.l.LashOfTheBalrog.class));
|
||||||
cards.add(new SetCardInfo("Last March of the Ents", 172, Rarity.MYTHIC, mage.cards.l.LastMarchOfTheEnts.class));
|
cards.add(new SetCardInfo("Last March of the Ents", 172, Rarity.MYTHIC, mage.cards.l.LastMarchOfTheEnts.class));
|
||||||
cards.add(new SetCardInfo("Legolas, Counter of Kills", 212, Rarity.UNCOMMON, mage.cards.l.LegolasCounterOfKills.class));
|
cards.add(new SetCardInfo("Legolas, Counter of Kills", 212, Rarity.UNCOMMON, mage.cards.l.LegolasCounterOfKills.class));
|
||||||
|
|
Loading…
Reference in a new issue