mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[SNC] Implemented Park Heights Pegasus
This commit is contained in:
parent
9493487d7f
commit
ca10df7299
2 changed files with 93 additions and 0 deletions
92
Mage.Sets/src/mage/cards/p/ParkHeightsPegasus.java
Normal file
92
Mage.Sets/src/mage/cards/p/ParkHeightsPegasus.java
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
package mage.cards.p;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.watchers.common.PermanentsEnteredBattlefieldWatcher;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class ParkHeightsPegasus extends CardImpl {
|
||||
|
||||
public ParkHeightsPegasus(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}{W}");
|
||||
|
||||
this.subtype.add(SubType.PEGASUS);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// Whenever Park Heights Pegasus deals combat damage to a player, draw a card if two or more creatures entered the battlefield under your control this turn.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new ParkHeightsPegasusEffect(), false), new PermanentsEnteredBattlefieldWatcher());
|
||||
}
|
||||
|
||||
private ParkHeightsPegasus(final ParkHeightsPegasus card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ParkHeightsPegasus copy() {
|
||||
return new ParkHeightsPegasus(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ParkHeightsPegasusEffect extends OneShotEffect {
|
||||
|
||||
public ParkHeightsPegasusEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "draw a card if two or more creatures entered the battlefield under your control this turn";
|
||||
}
|
||||
|
||||
private ParkHeightsPegasusEffect(final ParkHeightsPegasusEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ParkHeightsPegasusEffect copy() {
|
||||
return new ParkHeightsPegasusEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
PermanentsEnteredBattlefieldWatcher watcher = game.getState().getWatcher(PermanentsEnteredBattlefieldWatcher.class);
|
||||
UUID controllerId = source.getControllerId();
|
||||
Player controller = game.getPlayer(controllerId);
|
||||
if (watcher != null && controller != null) {
|
||||
List<Permanent> permanents = watcher.getThisTurnEnteringPermanents(controllerId);
|
||||
if (permanents != null) {
|
||||
int creatures = 0;
|
||||
for (Permanent permanent : permanents) {
|
||||
if (permanent.isCreature(game)) {
|
||||
creatures++;
|
||||
if (creatures >= 2) {
|
||||
controller.drawCards(1, source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -169,6 +169,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Ognis, the Dragon's Lash", 210, Rarity.RARE, mage.cards.o.OgnisTheDragonsLash.class));
|
||||
cards.add(new SetCardInfo("Ominous Parcel", 241, Rarity.COMMON, mage.cards.o.OminousParcel.class));
|
||||
cards.add(new SetCardInfo("Out of the Way", 52, Rarity.UNCOMMON, mage.cards.o.OutOfTheWay.class));
|
||||
cards.add(new SetCardInfo("Park Heights Pegasus", 211, Rarity.RARE, mage.cards.p.ParkHeightsPegasus.class));
|
||||
cards.add(new SetCardInfo("Patch Up", 23, Rarity.UNCOMMON, mage.cards.p.PatchUp.class));
|
||||
cards.add(new SetCardInfo("Plains", 262, Rarity.LAND, mage.cards.basiclands.Plains.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Plasma Jockey", 115, Rarity.COMMON, mage.cards.p.PlasmaJockey.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue