forked from External/mage
[BLB] Implement Wax-Wane Witness
This commit is contained in:
parent
cc730d6115
commit
0f33ac298c
3 changed files with 89 additions and 0 deletions
49
Mage.Sets/src/mage/cards/w/WaxWaneWitness.java
Normal file
49
Mage.Sets/src/mage/cards/w/WaxWaneWitness.java
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
package mage.cards.w;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.GainLoseLifeYourTurnTriggeredAbility;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class WaxWaneWitness extends CardImpl {
|
||||
|
||||
public WaxWaneWitness(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
|
||||
this.subtype.add(SubType.BAT);
|
||||
this.subtype.add(SubType.CLERIC);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// Whenever you gain or lose life during your turn, Wax-Wane Witness gets +1/+0 until end of turn.
|
||||
this.addAbility(new GainLoseLifeYourTurnTriggeredAbility(
|
||||
new BoostSourceEffect(1, 0, Duration.EndOfTurn)
|
||||
));
|
||||
}
|
||||
|
||||
private WaxWaneWitness(final WaxWaneWitness card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WaxWaneWitness copy() {
|
||||
return new WaxWaneWitness(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -224,6 +224,7 @@ public final class Bloomburrow extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("War Squeak", 160, Rarity.COMMON, mage.cards.w.WarSqueak.class));
|
||||
cards.add(new SetCardInfo("Warren Elder", 37, Rarity.COMMON, mage.cards.w.WarrenElder.class));
|
||||
cards.add(new SetCardInfo("Warren Warleader", 38, Rarity.MYTHIC, mage.cards.w.WarrenWarleader.class));
|
||||
cards.add(new SetCardInfo("Wax-Wane Witness", 39, Rarity.COMMON, mage.cards.w.WaxWaneWitness.class));
|
||||
cards.add(new SetCardInfo("Wear Down", 203, Rarity.UNCOMMON, mage.cards.w.WearDown.class));
|
||||
cards.add(new SetCardInfo("Whiskerquill Scribe", 161, Rarity.COMMON, mage.cards.w.WhiskerquillScribe.class));
|
||||
cards.add(new SetCardInfo("Whiskervale Forerunner", 40, Rarity.RARE, mage.cards.w.WhiskervaleForerunner.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
package mage.abilities.common;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class GainLoseLifeYourTurnTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public GainLoseLifeYourTurnTriggeredAbility(Effect effect) {
|
||||
super(Zone.BATTLEFIELD, effect, false);
|
||||
setTriggerPhrase("Whenever you gain or lose life during your turn, ");
|
||||
}
|
||||
|
||||
private GainLoseLifeYourTurnTriggeredAbility(final GainLoseLifeYourTurnTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GainLoseLifeYourTurnTriggeredAbility copy() {
|
||||
return new GainLoseLifeYourTurnTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.GAINED_LIFE
|
||||
|| event.getType() == GameEvent.EventType.LOST_LIFE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return isControlledBy(game.getActivePlayerId())
|
||||
&& isControlledBy(event.getPlayerId());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue