mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[STX] Implemented Waterfall Aerialist
This commit is contained in:
parent
2a4b157ab6
commit
7dc8133eec
4 changed files with 98 additions and 0 deletions
42
Mage.Sets/src/mage/cards/w/WaterfallAerialist.java
Normal file
42
Mage.Sets/src/mage/cards/w/WaterfallAerialist.java
Normal file
|
@ -0,0 +1,42 @@
|
|||
package mage.cards.w;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
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.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class WaterfallAerialist extends CardImpl {
|
||||
|
||||
public WaterfallAerialist(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||
|
||||
this.subtype.add(SubType.DJINN);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Ward {2}
|
||||
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
|
||||
}
|
||||
|
||||
private WaterfallAerialist(final WaterfallAerialist card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WaterfallAerialist copy() {
|
||||
return new WaterfallAerialist(this);
|
||||
}
|
||||
}
|
|
@ -46,6 +46,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Silverquill Command", 232, Rarity.RARE, mage.cards.s.SilverquillCommand.class));
|
||||
cards.add(new SetCardInfo("Storm-Kiln Artist", 115, Rarity.UNCOMMON, mage.cards.s.StormKilnArtist.class));
|
||||
cards.add(new SetCardInfo("Vineglimmer Snarl", 274, Rarity.RARE, mage.cards.v.VineglimmerSnarl.class));
|
||||
cards.add(new SetCardInfo("Waterfall Aerialist", 61, Rarity.COMMON, mage.cards.w.WaterfallAerialist.class));
|
||||
cards.add(new SetCardInfo("Witherbloom Command", 248, Rarity.RARE, mage.cards.w.WitherbloomCommand.class));
|
||||
}
|
||||
}
|
||||
|
|
54
Mage/src/main/java/mage/abilities/keyword/WardAbility.java
Normal file
54
Mage/src/main/java/mage/abilities/keyword/WardAbility.java
Normal file
|
@ -0,0 +1,54 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.effects.common.CounterUnlessPaysEffect;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class WardAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public WardAbility(Cost cost) {
|
||||
super(Zone.BATTLEFIELD, new CounterUnlessPaysEffect(cost), false);
|
||||
}
|
||||
|
||||
private WardAbility(final WardAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.TARGETED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (!getSourceId().equals(event.getTargetId())) {
|
||||
return false;
|
||||
}
|
||||
StackObject stackObject = game.getStack().getStackObject(event.getSourceId());
|
||||
if (stackObject == null || !game.getOpponents(getControllerId()).contains(stackObject.getControllerId())) {
|
||||
return false;
|
||||
}
|
||||
getEffects().setTargetPointer(new FixedTarget(event.getSourceId(), game));
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public WardAbility copy() {
|
||||
return new WardAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Ward " + this.getCosts().getText()
|
||||
+ " <i>(Whenever {this} becomes the target of a spell or ability an opponent controls, " +
|
||||
"counter that spell or ability unless its controller pays " + this.getCosts().getText() + ")</i>";
|
||||
}
|
||||
}
|
|
@ -104,4 +104,5 @@ Undying|new|
|
|||
Unearth|cost|
|
||||
Unleash|new|
|
||||
Vigilance|instance|
|
||||
Ward|cost|
|
||||
Wither|instance|
|
||||
|
|
Loading…
Reference in a new issue