mirror of
https://github.com/correl/mage.git
synced 2025-01-13 11:01:58 +00:00
[AFR] Implemented Westgate Regent
This commit is contained in:
parent
8addbb8146
commit
9d1b84102f
2 changed files with 84 additions and 0 deletions
83
Mage.Sets/src/mage/cards/w/WestgateRegent.java
Normal file
83
Mage.Sets/src/mage/cards/w/WestgateRegent.java
Normal file
|
@ -0,0 +1,83 @@
|
|||
package mage.cards.w;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.costs.common.DiscardCardCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.WardAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class WestgateRegent extends CardImpl {
|
||||
|
||||
public WestgateRegent(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{B}");
|
||||
|
||||
this.subtype.add(SubType.VAMPIRE);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Ward — Discard a card.
|
||||
this.addAbility(new WardAbility(new DiscardCardCost()));
|
||||
|
||||
// Whenever Westgate Regent deals combat damage to a player, put that many +1/+1 counters on it.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
|
||||
new WestgateRegentEffect(), false, true
|
||||
));
|
||||
}
|
||||
|
||||
private WestgateRegent(final WestgateRegent card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WestgateRegent copy() {
|
||||
return new WestgateRegent(this);
|
||||
}
|
||||
}
|
||||
|
||||
class WestgateRegentEffect extends OneShotEffect {
|
||||
|
||||
WestgateRegentEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "put that many +1/+1 counters on it";
|
||||
}
|
||||
|
||||
private WestgateRegentEffect(final WestgateRegentEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WestgateRegentEffect copy() {
|
||||
return new WestgateRegentEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||
int damage = (Integer) getValue("damage");
|
||||
if (permanent == null || damage < 1) {
|
||||
return false;
|
||||
}
|
||||
return permanent.addCounters(
|
||||
CounterType.P1P1.createInstance(damage),
|
||||
source.getControllerId(), source, game
|
||||
);
|
||||
}
|
||||
}
|
|
@ -209,6 +209,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Vorpal Sword", 124, Rarity.RARE, mage.cards.v.VorpalSword.class));
|
||||
cards.add(new SetCardInfo("Wandering Troubadour", 210, Rarity.UNCOMMON, mage.cards.w.WanderingTroubadour.class));
|
||||
cards.add(new SetCardInfo("Werewolf Pack Leader", 211, Rarity.RARE, mage.cards.w.WerewolfPackLeader.class));
|
||||
cards.add(new SetCardInfo("Westgate Regent", 126, Rarity.RARE, mage.cards.w.WestgateRegent.class));
|
||||
cards.add(new SetCardInfo("White Dragon", 41, Rarity.UNCOMMON, mage.cards.w.WhiteDragon.class));
|
||||
cards.add(new SetCardInfo("Wight", 127, Rarity.RARE, mage.cards.w.Wight.class));
|
||||
cards.add(new SetCardInfo("Wild Shape", 212, Rarity.UNCOMMON, mage.cards.w.WildShape.class));
|
||||
|
|
Loading…
Reference in a new issue