mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Implemented Wingfold Pteron
This commit is contained in:
parent
b94afc3d00
commit
1e43371470
3 changed files with 88 additions and 4 deletions
80
Mage.Sets/src/mage/cards/w/WingfoldPteron.java
Normal file
80
Mage.Sets/src/mage/cards/w/WingfoldPteron.java
Normal file
|
@ -0,0 +1,80 @@
|
|||
package mage.cards.w;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.Counter;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class WingfoldPteron extends CardImpl {
|
||||
|
||||
public WingfoldPteron(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}");
|
||||
|
||||
this.subtype.add(SubType.DINOSAUR);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
// Wingfold Pteron enters the battlefield with your choice of a flying counter or a hexproof counter on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(new WingfoldPteronEffect()));
|
||||
}
|
||||
|
||||
private WingfoldPteron(final WingfoldPteron card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WingfoldPteron copy() {
|
||||
return new WingfoldPteron(this);
|
||||
}
|
||||
}
|
||||
|
||||
class WingfoldPteronEffect extends OneShotEffect {
|
||||
|
||||
WingfoldPteronEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "with your choice of a flying counter or a hexproof counter on it";
|
||||
}
|
||||
|
||||
private WingfoldPteronEffect(final WingfoldPteronEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WingfoldPteronEffect copy() {
|
||||
return new WingfoldPteronEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanentEntering(source.getSourceId());
|
||||
if (player == null || permanent == null) {
|
||||
return false;
|
||||
}
|
||||
Counter counter;
|
||||
if (player.chooseUse(
|
||||
Outcome.Neutral, "Choose flying or hexproof", null,
|
||||
"Flying", "Hexproof", source, game
|
||||
)) {
|
||||
counter = CounterType.FLYING.createInstance();
|
||||
} else {
|
||||
counter = CounterType.HEXPROOF.createInstance();
|
||||
}
|
||||
return permanent.addCounters(counter, source, game);
|
||||
}
|
||||
}
|
|
@ -62,6 +62,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Trumpeting Gnarr", 213, Rarity.UNCOMMON, mage.cards.t.TrumpetingGnarr.class));
|
||||
cards.add(new SetCardInfo("Void Beckoner", 104, Rarity.UNCOMMON, mage.cards.v.VoidBeckoner.class));
|
||||
cards.add(new SetCardInfo("Voracious Greatshark", 70, Rarity.RARE, mage.cards.v.VoraciousGreatshark.class));
|
||||
cards.add(new SetCardInfo("Wingfold Pteron", 71, Rarity.COMMON, mage.cards.w.WingfoldPteron.class));
|
||||
cards.add(new SetCardInfo("Zagoth Crystal", 242, Rarity.UNCOMMON, mage.cards.z.ZagothCrystal.class));
|
||||
cards.add(new SetCardInfo("Zagoth Mamba", 106, Rarity.UNCOMMON, mage.cards.z.ZagothMamba.class));
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package mage.counters;
|
||||
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.abilities.keyword.*;
|
||||
|
||||
/**
|
||||
* Enum for counters, names and instances.
|
||||
|
@ -53,6 +50,7 @@ public enum CounterType {
|
|||
FEATHER("feather"),
|
||||
FILIBUSTER("filibuster"),
|
||||
FLOOD("flood"),
|
||||
FLYING("flying"),
|
||||
FUNK("funk"),
|
||||
FURY("fury"),
|
||||
FUNGUS("fungus"),
|
||||
|
@ -64,6 +62,7 @@ public enum CounterType {
|
|||
GROWTH("growth"),
|
||||
HATCHLING("hatchling"),
|
||||
HEALING("healing"),
|
||||
HEXPROOF("hexproof"),
|
||||
HIT("hit"),
|
||||
HOOFPRINT("hoofprint"),
|
||||
HOUR("hour"),
|
||||
|
@ -203,6 +202,10 @@ public enum CounterType {
|
|||
return new BoostCounter(-2, -2, amount);
|
||||
case DEATHTOUCH:
|
||||
return new AbilityCounter(DeathtouchAbility.getInstance());
|
||||
case FLYING:
|
||||
return new AbilityCounter(FlyingAbility.getInstance());
|
||||
case HEXPROOF:
|
||||
return new AbilityCounter(HexproofAbility.getInstance());
|
||||
case LIFELINK:
|
||||
return new AbilityCounter(LifelinkAbility.getInstance());
|
||||
case MENACE:
|
||||
|
|
Loading…
Reference in a new issue