[BRO] Implement Trench Stalker

This commit is contained in:
Evan Kranzler 2022-11-05 10:19:53 -04:00
parent c3fce2a59d
commit e0cc1db4fe
8 changed files with 103 additions and 88 deletions

View file

@ -4,7 +4,7 @@ import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.DrewTwoOrMoreCardsCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.dynamicvalue.common.CardsDrawnThisTurnDynamicValue;
import mage.abilities.effects.common.DrawDiscardControllerEffect;
@ -16,8 +16,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.game.Game;
import mage.watchers.common.CardsDrawnThisTurnWatcher;
import java.util.UUID;
@ -43,12 +41,12 @@ public final class EvangelOfSynthesis extends CardImpl {
// As long as you've drawn two or more cards this turn, Evangel of Synthesis gets +1/+0 and has menace.
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
new BoostSourceEffect(1, 0, Duration.WhileOnBattlefield),
EvangelOfSynthesisCondition.instance, "as long as you've drawn " +
DrewTwoOrMoreCardsCondition.instance, "as long as you've drawn " +
"two or more cards this turn, {this} gets +1/+0"
));
ability.addEffect(new ConditionalContinuousEffect(new GainAbilitySourceEffect(
new MenaceAbility(false), Duration.WhileOnBattlefield
), EvangelOfSynthesisCondition.instance, "and has menace"));
), DrewTwoOrMoreCardsCondition.instance, "and has menace"));
this.addAbility(ability.addHint(CardsDrawnThisTurnDynamicValue.getHint()));
}
@ -61,13 +59,3 @@ public final class EvangelOfSynthesis extends CardImpl {
return new EvangelOfSynthesis(this);
}
}
enum EvangelOfSynthesisCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
CardsDrawnThisTurnWatcher watcher = game.getState().getWatcher(CardsDrawnThisTurnWatcher.class);
return watcher != null && watcher.getCardsDrawnThisTurn(source.getControllerId()) > 1;
}
}

View file

@ -1,9 +1,8 @@
package mage.cards.e;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.DrewTwoOrMoreCardsCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.dynamicvalue.common.CardsDrawnThisTurnDynamicValue;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
@ -13,8 +12,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.game.Game;
import mage.watchers.common.CardsDrawnThisTurnWatcher;
import java.util.UUID;
@ -36,7 +33,7 @@ public final class Eyekite extends CardImpl {
// Eyekite gets +2/+0 as long as you've drawn two or more cards this turn.
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new BoostSourceEffect(2, 0, Duration.WhileOnBattlefield),
EyekiteCondition.instance, "{this} gets +2/+0 as long as you've drawn two or more cards this turn."
DrewTwoOrMoreCardsCondition.instance, "{this} gets +2/+0 as long as you've drawn two or more cards this turn."
)).addHint(CardsDrawnThisTurnDynamicValue.getHint()));
}
@ -49,13 +46,3 @@ public final class Eyekite extends CardImpl {
return new Eyekite(this);
}
}
enum EyekiteCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
CardsDrawnThisTurnWatcher watcher = game.getState().getWatcher(CardsDrawnThisTurnWatcher.class);
return watcher != null && watcher.getCardsDrawnThisTurn(source.getControllerId()) > 1;
}
}

View file

@ -3,8 +3,9 @@ package mage.cards.g;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.DrewTwoOrMoreCardsCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.dynamicvalue.common.CardsDrawnThisTurnDynamicValue;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.ReachAbility;
@ -14,8 +15,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.game.Game;
import mage.watchers.common.CardsDrawnThisTurnWatcher;
import java.util.UUID;
@ -35,20 +34,16 @@ public final class GnarledSage extends CardImpl {
this.addAbility(ReachAbility.getInstance());
// As long as youve drawn two or more cards this turn, Gnarled Sage gets +0/+2 and has vigilance.
Ability ability = new SimpleStaticAbility(
new ConditionalContinuousEffect(
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
new BoostSourceEffect(0, 2, Duration.WhileOnBattlefield),
GnarledSageCondition.instance,
DrewTwoOrMoreCardsCondition.instance,
"As long as you've drawn two or more cards this turn, {this} gets +0/+2"
));
ability.addEffect(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(VigilanceAbility.getInstance(), Duration.WhileOnBattlefield),
GnarledSageCondition.instance,
"and has vigilance"
DrewTwoOrMoreCardsCondition.instance, "and has vigilance"
));
this.addAbility(ability);
this.addAbility(ability.addHint(CardsDrawnThisTurnDynamicValue.getHint()));
}
private GnarledSage(final GnarledSage card) {
@ -60,13 +55,3 @@ public final class GnarledSage extends CardImpl {
return new GnarledSage(this);
}
}
enum GnarledSageCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
CardsDrawnThisTurnWatcher watcher = game.getState().getWatcher(CardsDrawnThisTurnWatcher.class);
return watcher != null && watcher.getCardsDrawnThisTurn(source.getControllerId()) > 1;
}
}

View file

@ -1,10 +1,10 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.DrewTwoOrMoreCardsCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.dynamicvalue.common.CardsDrawnThisTurnDynamicValue;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.DoubleStrikeAbility;
import mage.cards.CardImpl;
@ -12,8 +12,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.game.Game;
import mage.watchers.common.CardsDrawnThisTurnWatcher;
import java.util.UUID;
@ -33,9 +31,9 @@ public final class SpinehornMinotaur extends CardImpl {
// As long as you've drawn two or more cards this turn, Spinehorn Minotaur has double strike.
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(DoubleStrikeAbility.getInstance(), Duration.WhileOnBattlefield),
SpinehornMinotaurCondition.instance, "As long as you've drawn two or more cards this turn, " +
DrewTwoOrMoreCardsCondition.instance, "As long as you've drawn two or more cards this turn, " +
"{this} has double strike"
)));
)).addHint(CardsDrawnThisTurnDynamicValue.getHint()));
}
private SpinehornMinotaur(final SpinehornMinotaur card) {
@ -47,13 +45,3 @@ public final class SpinehornMinotaur extends CardImpl {
return new SpinehornMinotaur(this);
}
}
enum SpinehornMinotaurCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
CardsDrawnThisTurnWatcher watcher = game.getState().getWatcher(CardsDrawnThisTurnWatcher.class);
return watcher != null && watcher.getCardsDrawnThisTurn(source.getControllerId()) > 1;
}
}

View file

@ -1,10 +1,10 @@
package mage.cards.t;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.DrewTwoOrMoreCardsCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.dynamicvalue.common.CardsDrawnThisTurnDynamicValue;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.CantBeBlockedSourceAbility;
import mage.cards.CardImpl;
@ -12,8 +12,6 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.game.Game;
import mage.watchers.common.CardsDrawnThisTurnWatcher;
import java.util.UUID;
@ -31,10 +29,11 @@ public final class TomeAnima extends CardImpl {
// Tome Anima cant be blocked as long as youve drawn two or more cards this turn.
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(new CantBeBlockedSourceAbility(), Duration.WhileOnBattlefield),
TomeAnimaCondition.instance,
"{this} can't be blocked as long as you've drawn two or more cards this turn"
)));
new GainAbilitySourceEffect(
new CantBeBlockedSourceAbility(), Duration.WhileOnBattlefield
), DrewTwoOrMoreCardsCondition.instance, "{this} can't be blocked " +
"as long as you've drawn two or more cards this turn"
)).addHint(CardsDrawnThisTurnDynamicValue.getHint()));
}
private TomeAnima(final TomeAnima card) {
@ -46,13 +45,3 @@ public final class TomeAnima extends CardImpl {
return new TomeAnima(this);
}
}
enum TomeAnimaCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
CardsDrawnThisTurnWatcher watcher = game.getState().getWatcher(CardsDrawnThisTurnWatcher.class);
return watcher != null && watcher.getCardsDrawnThisTurn(source.getControllerId()) > 1;
}
}

View file

@ -0,0 +1,53 @@
package mage.cards.t;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.DrewTwoOrMoreCardsCondition;
import mage.abilities.decorator.ConditionalContinuousEffect;
import mage.abilities.dynamicvalue.common.CardsDrawnThisTurnDynamicValue;
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
import mage.abilities.keyword.DeathtouchAbility;
import mage.abilities.keyword.LifelinkAbility;
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 TrenchStalker extends CardImpl {
public TrenchStalker(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}");
this.subtype.add(SubType.BEAST);
this.subtype.add(SubType.HORROR);
this.power = new MageInt(4);
this.toughness = new MageInt(5);
// As long as you've drawn two or more cards this turn, Trench Stalker has deathtouch and lifelink.
Ability ability = new SimpleStaticAbility(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(DeathtouchAbility.getInstance(), Duration.WhileOnBattlefield),
DrewTwoOrMoreCardsCondition.instance, "As long as you've drawn two or more cards this turn, {this} has deathtouch"
));
ability.addEffect(new ConditionalContinuousEffect(
new GainAbilitySourceEffect(LifelinkAbility.getInstance(), Duration.WhileOnBattlefield),
DrewTwoOrMoreCardsCondition.instance, "and lifelink"
));
this.addAbility(ability.addHint(CardsDrawnThisTurnDynamicValue.getHint()));
}
private TrenchStalker(final TrenchStalker card) {
super(card);
}
@Override
public TrenchStalker copy() {
return new TrenchStalker(this);
}
}

View file

@ -233,6 +233,7 @@ public final class TheBrothersWar extends ExpansionSet {
cards.add(new SetCardInfo("Tower Worker", 255, Rarity.COMMON, mage.cards.t.TowerWorker.class));
cards.add(new SetCardInfo("Transmogrant Altar", 124, Rarity.UNCOMMON, mage.cards.t.TransmograntAltar.class));
cards.add(new SetCardInfo("Transmogrant's Crown", 125, Rarity.RARE, mage.cards.t.TransmograntsCrown.class));
cards.add(new SetCardInfo("Trench Stalker", 116, Rarity.COMMON, mage.cards.t.TrenchStalker.class));
cards.add(new SetCardInfo("Tyrant of Kher Ridges", 154, Rarity.RARE, mage.cards.t.TyrantOfKherRidges.class));
cards.add(new SetCardInfo("Underground River", 267, Rarity.RARE, mage.cards.u.UndergroundRiver.class));
cards.add(new SetCardInfo("Union of the Third Path", 31, Rarity.COMMON, mage.cards.u.UnionOfTheThirdPath.class));

View file

@ -0,0 +1,24 @@
package mage.abilities.condition.common;
import mage.abilities.Ability;
import mage.abilities.condition.Condition;
import mage.game.Game;
import mage.watchers.common.CardsDrawnThisTurnWatcher;
/**
* @author TheElk801
*/
public enum DrewTwoOrMoreCardsCondition implements Condition {
instance;
@Override
public boolean apply(Game game, Ability source) {
CardsDrawnThisTurnWatcher watcher = game.getState().getWatcher(CardsDrawnThisTurnWatcher.class);
return watcher != null && watcher.getCardsDrawnThisTurn(source.getControllerId()) >= 2;
}
@Override
public String toString() {
return "you've drawn two or more cards this turn";
}
}