mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 19:11:59 -08:00
[LTC] Implement Assemble the Entmoot (#10711)
* [LTC] Implement Assemble the Entmoot * rename ControllerGotLifeCount -> ControllerGainedLifeCount
This commit is contained in:
parent
8d938926b6
commit
63d9061f6a
32 changed files with 183 additions and 72 deletions
|
|
@ -3,7 +3,7 @@ package mage.cards.a;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.Mana;
|
import mage.Mana;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.mana.AnyColorManaAbility;
|
import mage.abilities.mana.AnyColorManaAbility;
|
||||||
import mage.abilities.mana.DynamicManaAbility;
|
import mage.abilities.mana.DynamicManaAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -32,9 +32,9 @@ public final class AccomplishedAlchemist extends CardImpl {
|
||||||
|
|
||||||
// {T}: Add X mana of any one color, where X is the amount of life you gained this turn.
|
// {T}: Add X mana of any one color, where X is the amount of life you gained this turn.
|
||||||
this.addAbility(new DynamicManaAbility(
|
this.addAbility(new DynamicManaAbility(
|
||||||
Mana.AnyMana(1), ControllerGotLifeCount.instance, new TapSourceCost(), "Add X mana " +
|
Mana.AnyMana(1), ControllerGainedLifeCount.instance, new TapSourceCost(), "Add X mana " +
|
||||||
"of any one color, where X is the amount of life you gained this turn", true
|
"of any one color, where X is the amount of life you gained this turn", true
|
||||||
).addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
).addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
private AccomplishedAlchemist(final AccomplishedAlchemist card) {
|
private AccomplishedAlchemist(final AccomplishedAlchemist card) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ package mage.cards.a;
|
||||||
|
|
||||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
|
@ -27,7 +27,7 @@ public final class AngelicAccord extends CardImpl {
|
||||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||||
Zone.BATTLEFIELD, new CreateTokenEffect(new AngelToken()), TargetController.ANY,
|
Zone.BATTLEFIELD, new CreateTokenEffect(new AngelToken()), TargetController.ANY,
|
||||||
new YouGainedLifeCondition(ComparisonType.MORE_THAN, 3), false
|
new YouGainedLifeCondition(ComparisonType.MORE_THAN, 3), false
|
||||||
).addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
).addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
private AngelicAccord(final AngelicAccord card) {
|
private AngelicAccord(final AngelicAccord card) {
|
||||||
|
|
|
||||||
110
Mage.Sets/src/mage/cards/a/AssembleTheEntmoot.java
Normal file
110
Mage.Sets/src/mage/cards/a/AssembleTheEntmoot.java
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
package mage.cards.a;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||||
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
|
import mage.abilities.keyword.ReachAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.game.permanent.token.SylvanOfferingTreefolkToken;
|
||||||
|
import mage.watchers.common.PlayerGainedLifeWatcher;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Susucr
|
||||||
|
*/
|
||||||
|
public final class AssembleTheEntmoot extends CardImpl {
|
||||||
|
|
||||||
|
public AssembleTheEntmoot(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{G}");
|
||||||
|
|
||||||
|
|
||||||
|
// Creatures you control have reach.
|
||||||
|
this.addAbility(new SimpleStaticAbility(
|
||||||
|
new GainAbilityControlledEffect(
|
||||||
|
ReachAbility.getInstance(),
|
||||||
|
Duration.WhileOnBattlefield,
|
||||||
|
StaticFilters.FILTER_PERMANENT_CREATURES
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
// Sacrifice Assemble the Entmoot: Create three tapped X/X green Treefolk creature tokens, where X is the amount of life you gained this turn. Put a reach counter on each of them.
|
||||||
|
Ability ability = new SimpleActivatedAbility(
|
||||||
|
new AssembleTheEntmootEffect(),
|
||||||
|
new SacrificeSourceCost()
|
||||||
|
);
|
||||||
|
ability.addHint(ControllerGainedLifeCount.getHint());
|
||||||
|
ability.addWatcher(new PlayerGainedLifeWatcher());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private AssembleTheEntmoot(final AssembleTheEntmoot card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AssembleTheEntmoot copy() {
|
||||||
|
return new AssembleTheEntmoot(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class AssembleTheEntmootEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
AssembleTheEntmootEffect() {
|
||||||
|
super(Outcome.PutCreatureInPlay);
|
||||||
|
staticText = "Create three tapped X/X green Treefolk creature tokens, where X is the "
|
||||||
|
+ "amount of life you gained this turn. Put a reach counter on each of them.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private AssembleTheEntmootEffect(final AssembleTheEntmootEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AssembleTheEntmootEffect copy() {
|
||||||
|
return new AssembleTheEntmootEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
UUID controllerId = source.getControllerId();
|
||||||
|
PlayerGainedLifeWatcher watcher = game.getState().getWatcher(PlayerGainedLifeWatcher.class);
|
||||||
|
if (controllerId == null || watcher == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int xValue = watcher.getLifeGained(controllerId);
|
||||||
|
|
||||||
|
CreateTokenEffect effect = new CreateTokenEffect(
|
||||||
|
new SylvanOfferingTreefolkToken(xValue),
|
||||||
|
3, true
|
||||||
|
);
|
||||||
|
effect.apply(game, source);
|
||||||
|
|
||||||
|
for (UUID addedTokenId : effect.getLastAddedTokenIds()) {
|
||||||
|
Permanent token = game.getPermanent(addedTokenId);
|
||||||
|
if (token != null) {
|
||||||
|
token.addCounters(
|
||||||
|
CounterType.REACH.createInstance(),
|
||||||
|
controllerId, source, game
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,7 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.Mode;
|
import mage.abilities.Mode;
|
||||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||||
|
|
@ -55,10 +55,10 @@ public final class AstarionTheDecadent extends CardImpl {
|
||||||
);
|
);
|
||||||
ability.addTarget(new TargetOpponent());
|
ability.addTarget(new TargetOpponent());
|
||||||
ability.withFirstModeFlavorWord("Feed");
|
ability.withFirstModeFlavorWord("Feed");
|
||||||
ability.addHint(ControllerGotLifeCount.getHint());
|
ability.addHint(ControllerGainedLifeCount.getHint());
|
||||||
|
|
||||||
// • Friends — You gain life equal to the amount of life you gained this turn.
|
// • Friends — You gain life equal to the amount of life you gained this turn.
|
||||||
ability.addMode(new Mode(new GainLifeEffect(ControllerGotLifeCount.instance)).withFlavorWord("Friends"));
|
ability.addMode(new Mode(new GainLifeEffect(ControllerGainedLifeCount.instance)).withFlavorWord("Friends"));
|
||||||
this.addAbility(ability.addHint(AstarionTheDecadentHint.instance), new PlayerGainedLifeWatcher());
|
this.addAbility(ability.addHint(AstarionTheDecadentHint.instance), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package mage.cards.b;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||||
|
|
@ -37,10 +37,10 @@ public final class BlossomingBogbeast extends CardImpl {
|
||||||
StaticFilters.FILTER_CONTROLLED_CREATURE
|
StaticFilters.FILTER_CONTROLLED_CREATURE
|
||||||
).setText("Then creatures you control gain trample"));
|
).setText("Then creatures you control gain trample"));
|
||||||
ability.addEffect(new BoostControlledEffect(
|
ability.addEffect(new BoostControlledEffect(
|
||||||
ControllerGotLifeCount.instance, ControllerGotLifeCount.instance, Duration.EndOfTurn,
|
ControllerGainedLifeCount.instance, ControllerGainedLifeCount.instance, Duration.EndOfTurn,
|
||||||
StaticFilters.FILTER_PERMANENT_CREATURES, false, true
|
StaticFilters.FILTER_PERMANENT_CREATURES, false, true
|
||||||
).setText("and get +X/+X until end of turn, where X is the amount of life you gained this turn"));
|
).setText("and get +X/+X until end of turn, where X is the amount of life you gained this turn"));
|
||||||
this.addAbility(ability.addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
this.addAbility(ability.addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
private BlossomingBogbeast(final BlossomingBogbeast card) {
|
private BlossomingBogbeast(final BlossomingBogbeast card) {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package mage.cards.c;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.LifelinkAbility;
|
import mage.abilities.keyword.LifelinkAbility;
|
||||||
|
|
@ -59,7 +59,7 @@ public final class CelestineTheLivingSaint extends CardImpl {
|
||||||
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
||||||
this.addAbility(
|
this.addAbility(
|
||||||
ability.withFlavorWord("Healing Tears")
|
ability.withFlavorWord("Healing Tears")
|
||||||
.addHint(ControllerGotLifeCount.getHint()),
|
.addHint(ControllerGainedLifeCount.getHint()),
|
||||||
new PlayerGainedLifeWatcher()
|
new PlayerGainedLifeWatcher()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||||
import mage.abilities.keyword.IndestructibleAbility;
|
import mage.abilities.keyword.IndestructibleAbility;
|
||||||
|
|
@ -49,7 +49,7 @@ public final class CrestedSunmare extends CardImpl {
|
||||||
), new YouGainedLifeCondition(ComparisonType.MORE_THAN, 0),
|
), new YouGainedLifeCondition(ComparisonType.MORE_THAN, 0),
|
||||||
"At the beginning of each end step, if you gained life this turn, " +
|
"At the beginning of each end step, if you gained life this turn, " +
|
||||||
"create a 5/5 white Horse creature token."
|
"create a 5/5 white Horse creature token."
|
||||||
).addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
).addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
private CrestedSunmare(final CrestedSunmare card) {
|
private CrestedSunmare(final CrestedSunmare card) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package mage.cards.e;
|
package mage.cards.e;
|
||||||
|
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.dynamicvalue.common.SignInversionDynamicValue;
|
import mage.abilities.dynamicvalue.common.SignInversionDynamicValue;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||||
|
|
@ -18,7 +18,7 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class EssencePulse extends CardImpl {
|
public final class EssencePulse extends CardImpl {
|
||||||
|
|
||||||
private static final DynamicValue xValue = new SignInversionDynamicValue(ControllerGotLifeCount.instance);
|
private static final DynamicValue xValue = new SignInversionDynamicValue(ControllerGainedLifeCount.instance);
|
||||||
|
|
||||||
public EssencePulse(UUID ownerId, CardSetInfo setInfo) {
|
public EssencePulse(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{B}");
|
||||||
|
|
@ -29,7 +29,7 @@ public final class EssencePulse extends CardImpl {
|
||||||
xValue, xValue, Duration.EndOfTurn
|
xValue, xValue, Duration.EndOfTurn
|
||||||
).setText("Each creature gets -X/-X until end of turn, where X is the amount of life you gained this turn"));
|
).setText("Each creature gets -X/-X until end of turn, where X is the amount of life you gained this turn"));
|
||||||
this.getSpellAbility().addWatcher(new PlayerGainedLifeWatcher());
|
this.getSpellAbility().addWatcher(new PlayerGainedLifeWatcher());
|
||||||
this.getSpellAbility().addHint(ControllerGotLifeCount.getHint());
|
this.getSpellAbility().addHint(ControllerGainedLifeCount.getHint());
|
||||||
}
|
}
|
||||||
|
|
||||||
private EssencePulse(final EssencePulse card) {
|
private EssencePulse(final EssencePulse card) {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import mage.abilities.SpellAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||||
import mage.abilities.keyword.ReachAbility;
|
import mage.abilities.keyword.ReachAbility;
|
||||||
|
|
@ -38,7 +38,7 @@ public final class EzzarootChanneler extends CardImpl {
|
||||||
// Creature spells you cast cost {X} less to cast, where X is the amount of life you gained this turn.
|
// Creature spells you cast cost {X} less to cast, where X is the amount of life you gained this turn.
|
||||||
this.addAbility(
|
this.addAbility(
|
||||||
new SimpleStaticAbility(new EzzarootChannelerEffect())
|
new SimpleStaticAbility(new EzzarootChannelerEffect())
|
||||||
.addHint(ControllerGotLifeCount.getHint()),
|
.addHint(ControllerGainedLifeCount.getHint()),
|
||||||
new PlayerGainedLifeWatcher()
|
new PlayerGainedLifeWatcher()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -70,7 +70,7 @@ class EzzarootChannelerEffect extends CostModificationEffectImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
||||||
CardUtil.reduceCost(abilityToModify, Math.max(0, ControllerGotLifeCount.instance.calculate(game, source, this)));
|
CardUtil.reduceCost(abilityToModify, Math.max(0, ControllerGainedLifeCount.instance.calculate(game, source, this)));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -23,12 +23,12 @@ public final class FortifyingDraught extends CardImpl {
|
||||||
// You gain 2 life. Target creature gets +X/+X until end of turn, where X is the amount of life you gained this turn.
|
// You gain 2 life. Target creature gets +X/+X until end of turn, where X is the amount of life you gained this turn.
|
||||||
this.getSpellAbility().addEffect(new GainLifeEffect(2));
|
this.getSpellAbility().addEffect(new GainLifeEffect(2));
|
||||||
this.getSpellAbility().addEffect(new BoostTargetEffect(
|
this.getSpellAbility().addEffect(new BoostTargetEffect(
|
||||||
ControllerGotLifeCount.instance,
|
ControllerGainedLifeCount.instance,
|
||||||
ControllerGotLifeCount.instance,
|
ControllerGainedLifeCount.instance,
|
||||||
Duration.EndOfTurn));
|
Duration.EndOfTurn));
|
||||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
this.getSpellAbility().addWatcher(new PlayerGainedLifeWatcher());
|
this.getSpellAbility().addWatcher(new PlayerGainedLifeWatcher());
|
||||||
this.getSpellAbility().addHint(ControllerGotLifeCount.getHint());
|
this.getSpellAbility().addHint(ControllerGainedLifeCount.getHint());
|
||||||
}
|
}
|
||||||
|
|
||||||
private FortifyingDraught(final FortifyingDraught card) {
|
private FortifyingDraught(final FortifyingDraught card) {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import mage.abilities.condition.common.SourceIsRingBearerCondition;
|
||||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.abilities.effects.keyword.TheRingTemptsYouEffect;
|
import mage.abilities.effects.keyword.TheRingTemptsYouEffect;
|
||||||
import mage.abilities.keyword.PartnerWithAbility;
|
import mage.abilities.keyword.PartnerWithAbility;
|
||||||
|
|
@ -58,7 +58,7 @@ public final class FrodoAdventurousHobbit extends CardImpl {
|
||||||
new DrawCardSourceControllerEffect(1),
|
new DrawCardSourceControllerEffect(1),
|
||||||
FrodoAdventurousHobbitCondition.instance
|
FrodoAdventurousHobbitCondition.instance
|
||||||
));
|
));
|
||||||
this.addAbility(ability.addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
this.addAbility(ability.addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
private FrodoAdventurousHobbit(final FrodoAdventurousHobbit card) {
|
private FrodoAdventurousHobbit(final FrodoAdventurousHobbit card) {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.common.AttacksTriggeredAbility;
|
import mage.abilities.common.AttacksTriggeredAbility;
|
||||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
|
|
@ -43,7 +43,7 @@ public final class GwaihirGreatestOfTheEagles extends CardImpl {
|
||||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||||
Zone.BATTLEFIELD, new CreateTokenEffect(new GwaihirBirdToken()), TargetController.ANY,
|
Zone.BATTLEFIELD, new CreateTokenEffect(new GwaihirBirdToken()), TargetController.ANY,
|
||||||
new YouGainedLifeCondition(ComparisonType.MORE_THAN, 2), false
|
new YouGainedLifeCondition(ComparisonType.MORE_THAN, 2), false
|
||||||
).addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
).addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
private GwaihirGreatestOfTheEagles(final GwaihirGreatestOfTheEagles card) {
|
private GwaihirGreatestOfTheEagles(final GwaihirGreatestOfTheEagles card) {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import mage.abilities.common.LimitedTimesPerTurnActivatedAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.condition.common.MyTurnCondition;
|
import mage.abilities.condition.common.MyTurnCondition;
|
||||||
import mage.abilities.costs.common.PayLifeCost;
|
import mage.abilities.costs.common.PayLifeCost;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
import mage.abilities.effects.common.cost.CostModificationEffectImpl;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.abilities.hint.common.MyTurnHint;
|
import mage.abilities.hint.common.MyTurnHint;
|
||||||
|
|
@ -41,7 +41,7 @@ public final class LiciaSanguineTribune extends CardImpl {
|
||||||
// Licia, Sanguine Tribune costs 1 less to cast for each 1 life you gained this turn.
|
// Licia, Sanguine Tribune costs 1 less to cast for each 1 life you gained this turn.
|
||||||
this.addAbility(new SimpleStaticAbility(
|
this.addAbility(new SimpleStaticAbility(
|
||||||
Zone.ALL, new LiciaSanguineTribuneCostReductionEffect()
|
Zone.ALL, new LiciaSanguineTribuneCostReductionEffect()
|
||||||
).addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
).addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
|
|
||||||
// First strike
|
// First strike
|
||||||
this.addAbility(FirstStrikeAbility.getInstance());
|
this.addAbility(FirstStrikeAbility.getInstance());
|
||||||
|
|
@ -82,7 +82,7 @@ class LiciaSanguineTribuneCostReductionEffect extends CostModificationEffectImpl
|
||||||
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
public boolean apply(Game game, Ability source, Ability abilityToModify) {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
CardUtil.reduceCost(abilityToModify, ControllerGotLifeCount.instance.calculate(game, source, this));
|
CardUtil.reduceCost(abilityToModify, ControllerGainedLifeCount.instance.calculate(game, source, this));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package mage.cards.m;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||||
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
|
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -29,7 +29,7 @@ public final class MortalitySpear extends CardImpl {
|
||||||
// This spell costs {2} less to cast if you gained life this turn.
|
// This spell costs {2} less to cast if you gained life this turn.
|
||||||
this.addAbility(new SimpleStaticAbility(
|
this.addAbility(new SimpleStaticAbility(
|
||||||
Zone.ALL, new SpellCostReductionSourceEffect(2, condition).setCanWorksOnStackOnly(true)
|
Zone.ALL, new SpellCostReductionSourceEffect(2, condition).setCanWorksOnStackOnly(true)
|
||||||
).setRuleAtTheTop(true).addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
).setRuleAtTheTop(true).addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
|
|
||||||
// Destroy target nonland permanent.
|
// Destroy target nonland permanent.
|
||||||
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
this.getSpellAbility().addEffect(new DestroyTargetEffect());
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package mage.cards.n;
|
package mage.cards.n;
|
||||||
|
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.dynamicvalue.common.SignInversionDynamicValue;
|
import mage.abilities.dynamicvalue.common.SignInversionDynamicValue;
|
||||||
import mage.abilities.effects.common.GainLifeEffect;
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
|
|
@ -19,7 +19,7 @@ import java.util.UUID;
|
||||||
*/
|
*/
|
||||||
public final class NightmaresThirst extends CardImpl {
|
public final class NightmaresThirst extends CardImpl {
|
||||||
|
|
||||||
private static final DynamicValue xValue = new SignInversionDynamicValue(ControllerGotLifeCount.instance);
|
private static final DynamicValue xValue = new SignInversionDynamicValue(ControllerGainedLifeCount.instance);
|
||||||
|
|
||||||
public NightmaresThirst(UUID ownerId, CardSetInfo setInfo) {
|
public NightmaresThirst(UUID ownerId, CardSetInfo setInfo) {
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}");
|
||||||
|
|
@ -29,7 +29,7 @@ public final class NightmaresThirst extends CardImpl {
|
||||||
this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn));
|
this.getSpellAbility().addEffect(new BoostTargetEffect(xValue, xValue, Duration.EndOfTurn));
|
||||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||||
this.getSpellAbility().addWatcher(new PlayerGainedLifeWatcher());
|
this.getSpellAbility().addWatcher(new PlayerGainedLifeWatcher());
|
||||||
this.getSpellAbility().addHint(ControllerGotLifeCount.getHint());
|
this.getSpellAbility().addHint(ControllerGainedLifeCount.getHint());
|
||||||
}
|
}
|
||||||
|
|
||||||
private NightmaresThirst(final NightmaresThirst card) {
|
private NightmaresThirst(final NightmaresThirst card) {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.AsThoughEffectImpl;
|
import mage.abilities.effects.AsThoughEffectImpl;
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -34,7 +34,7 @@ public final class OathswornVampire extends CardImpl {
|
||||||
// You may cast Oathsworn Vampire from your graveyard if you gained life this turn.
|
// You may cast Oathsworn Vampire from your graveyard if you gained life this turn.
|
||||||
this.addAbility(new SimpleStaticAbility(
|
this.addAbility(new SimpleStaticAbility(
|
||||||
Zone.ALL, new OathswornVampirePlayEffect()
|
Zone.ALL, new OathswornVampirePlayEffect()
|
||||||
).addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
).addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
private OathswornVampire(final OathswornVampire card) {
|
private OathswornVampire(final OathswornVampire card) {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.costs.common.DiscardCardCost;
|
import mage.abilities.costs.common.DiscardCardCost;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.*;
|
import mage.abilities.effects.common.*;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
|
@ -62,11 +62,11 @@ public final class PestilentCauldron extends ModalDoubleFacedCard {
|
||||||
|
|
||||||
// {1}, {T}: Each opponent mills cards equal to the amount of life you gained this turn.
|
// {1}, {T}: Each opponent mills cards equal to the amount of life you gained this turn.
|
||||||
ability = new SimpleActivatedAbility(new MillCardsEachPlayerEffect(
|
ability = new SimpleActivatedAbility(new MillCardsEachPlayerEffect(
|
||||||
ControllerGotLifeCount.instance, TargetController.OPPONENT
|
ControllerGainedLifeCount.instance, TargetController.OPPONENT
|
||||||
).setText("each opponent mills cards equal to the amount of life you gained this turn"), new GenericManaCost(1));
|
).setText("each opponent mills cards equal to the amount of life you gained this turn"), new GenericManaCost(1));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addWatcher(new PlayerGainedLifeWatcher());
|
ability.addWatcher(new PlayerGainedLifeWatcher());
|
||||||
this.getLeftHalfCard().addAbility(ability.addHint(ControllerGotLifeCount.getHint()));
|
this.getLeftHalfCard().addAbility(ability.addHint(ControllerGainedLifeCount.getHint()));
|
||||||
|
|
||||||
// {4}, {T}: Exile four target cards from a single graveyard. Draw a card.
|
// {4}, {T}: Exile four target cards from a single graveyard. Draw a card.
|
||||||
ability = new SimpleActivatedAbility(new ExileTargetEffect(), new GenericManaCost(4));
|
ability = new SimpleActivatedAbility(new ExileTargetEffect(), new GenericManaCost(4));
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import mage.MageInt;
|
||||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -44,7 +44,7 @@ public final class RegalBloodlord extends CardImpl {
|
||||||
"At the beginning of each end step, "
|
"At the beginning of each end step, "
|
||||||
+ "if you gained life this turn, "
|
+ "if you gained life this turn, "
|
||||||
+ "create a 1/1 black Bat creature token with flying."
|
+ "create a 1/1 black Bat creature token with flying."
|
||||||
).addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
).addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
private RegalBloodlord(final RegalBloodlord card) {
|
private RegalBloodlord(final RegalBloodlord card) {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||||
|
|
@ -39,7 +39,7 @@ public final class ResplendentAngel extends CardImpl {
|
||||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||||
Zone.BATTLEFIELD, new CreateTokenEffect(new AngelVigilanceToken()),
|
Zone.BATTLEFIELD, new CreateTokenEffect(new AngelVigilanceToken()),
|
||||||
TargetController.ANY, new YouGainedLifeCondition(ComparisonType.MORE_THAN, 4), false
|
TargetController.ANY, new YouGainedLifeCondition(ComparisonType.MORE_THAN, 4), false
|
||||||
).addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
).addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
|
|
||||||
// {3}{W}{W}{W}: Until end of turn, Resplendent Angel gets +2/+2 and gains lifelink.
|
// {3}{W}{W}{W}: Until end of turn, Resplendent Angel gets +2/+2 and gains lifelink.
|
||||||
Ability ability = new SimpleActivatedAbility(new BoostSourceEffect(
|
Ability ability = new SimpleActivatedAbility(new BoostSourceEffect(
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.common.GainLifeControllerTriggeredAbility;
|
import mage.abilities.common.GainLifeControllerTriggeredAbility;
|
||||||
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
|
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.DoWhenCostPaid;
|
import mage.abilities.effects.common.DoWhenCostPaid;
|
||||||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||||
|
|
@ -71,7 +71,7 @@ public final class RodolfDuskbringer extends CardImpl {
|
||||||
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
||||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(new DoWhenCostPaid(
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(new DoWhenCostPaid(
|
||||||
ability, new ManaCostsImpl<>("{1}{W/B}"), "Pay {1}{W/B}?"
|
ability, new ManaCostsImpl<>("{1}{W/B}"), "Pay {1}{W/B}?"
|
||||||
), TargetController.YOU, false).addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
), TargetController.YOU, false).addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
private RodolfDuskbringer(final RodolfDuskbringer card) {
|
private RodolfDuskbringer(final RodolfDuskbringer card) {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package mage.cards.s;
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.keyword.LifelinkAbility;
|
import mage.abilities.keyword.LifelinkAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -36,7 +36,7 @@ public final class ShannaPurifyingBlade extends CardImpl {
|
||||||
// At the beginning of your end step, you may pay {X}. If you do, draw X cards. X can't be greater than the amount of life you gained this turn.
|
// At the beginning of your end step, you may pay {X}. If you do, draw X cards. X can't be greater than the amount of life you gained this turn.
|
||||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||||
new ShannaPurifyingBladeEffect(), TargetController.YOU, false
|
new ShannaPurifyingBladeEffect(), TargetController.YOU, false
|
||||||
).addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
).addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
private ShannaPurifyingBlade(final ShannaPurifyingBlade card) {
|
private ShannaPurifyingBlade(final ShannaPurifyingBlade card) {
|
||||||
|
|
@ -72,7 +72,7 @@ class ShannaPurifyingBladeEffect extends OneShotEffect {
|
||||||
if (player == null) {
|
if (player == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
int lifeGained = ControllerGotLifeCount.instance.calculate(game, source, this);
|
int lifeGained = ControllerGainedLifeCount.instance.calculate(game, source, this);
|
||||||
if (lifeGained < 1) {
|
if (lifeGained < 1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
|
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
|
||||||
import mage.abilities.keyword.TrampleAbility;
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
|
|
@ -39,8 +39,8 @@ public final class SproutbackTrudge extends CardImpl {
|
||||||
|
|
||||||
// This spell costs {X} less to cast, where X is the amount of life you gained this turn.
|
// This spell costs {X} less to cast, where X is the amount of life you gained this turn.
|
||||||
this.addAbility(new SimpleStaticAbility(
|
this.addAbility(new SimpleStaticAbility(
|
||||||
Zone.ALL, new SpellCostReductionSourceEffect(ControllerGotLifeCount.instance)
|
Zone.ALL, new SpellCostReductionSourceEffect(ControllerGainedLifeCount.instance)
|
||||||
).addHint(ControllerGotLifeCount.getHint()).setRuleAtTheTop(true), new PlayerGainedLifeWatcher());
|
).addHint(ControllerGainedLifeCount.getHint()).setRuleAtTheTop(true), new PlayerGainedLifeWatcher());
|
||||||
|
|
||||||
// Trample
|
// Trample
|
||||||
this.addAbility(TrampleAbility.getInstance());
|
this.addAbility(TrampleAbility.getInstance());
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import mage.MageInt;
|
||||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
|
@ -32,7 +32,7 @@ public final class TheGaffer extends CardImpl {
|
||||||
// At the beginning of each end step, if you gained 3 or more life this turn, draw a card.
|
// At the beginning of each end step, if you gained 3 or more life this turn, draw a card.
|
||||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||||
new DrawCardSourceControllerEffect(1), TargetController.ANY, condition, false
|
new DrawCardSourceControllerEffect(1), TargetController.ANY, condition, false
|
||||||
).addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
).addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
private TheGaffer(final TheGaffer card) {
|
private TheGaffer(final TheGaffer card) {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||||
import mage.abilities.costs.Cost;
|
import mage.abilities.costs.Cost;
|
||||||
import mage.abilities.costs.common.PayLifeCost;
|
import mage.abilities.costs.common.PayLifeCost;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.OneShotEffect;
|
import mage.abilities.effects.OneShotEffect;
|
||||||
import mage.abilities.keyword.LifelinkAbility;
|
import mage.abilities.keyword.LifelinkAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
|
@ -43,7 +43,7 @@ public final class TivashGloomSummoner extends CardImpl {
|
||||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||||
Zone.BATTLEFIELD, new TivashGloomSummonerEffect(),
|
Zone.BATTLEFIELD, new TivashGloomSummonerEffect(),
|
||||||
TargetController.YOU, condition, false
|
TargetController.YOU, condition, false
|
||||||
).addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
).addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
private TivashGloomSummoner(final TivashGloomSummoner card) {
|
private TivashGloomSummoner(final TivashGloomSummoner card) {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.keyword.FlyingAbility;
|
import mage.abilities.keyword.FlyingAbility;
|
||||||
import mage.abilities.keyword.LifelinkAbility;
|
import mage.abilities.keyword.LifelinkAbility;
|
||||||
|
|
@ -48,7 +48,7 @@ public final class ValkyrieHarbinger extends CardImpl {
|
||||||
TargetController.ANY, false
|
TargetController.ANY, false
|
||||||
), condition, "At the beginning of each end step, if you gained 4 or more life this turn, " +
|
), condition, "At the beginning of each end step, if you gained 4 or more life this turn, " +
|
||||||
"create a 4/4 white Angel creature token with flying and vigilance."
|
"create a 4/4 white Angel creature token with flying and vigilance."
|
||||||
).addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
).addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
private ValkyrieHarbinger(final ValkyrieHarbinger card) {
|
private ValkyrieHarbinger(final ValkyrieHarbinger card) {
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ package mage.cards.v;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.common.EntersBattlefieldAbility;
|
import mage.abilities.common.EntersBattlefieldAbility;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
|
|
@ -27,9 +27,9 @@ public final class VoraciousWurm extends CardImpl {
|
||||||
|
|
||||||
// Voracious Wurm enters the battlefield with X +1/+1 counters on it, where X is the amount of life you've gained this turn.
|
// Voracious Wurm enters the battlefield with X +1/+1 counters on it, where X is the amount of life you've gained this turn.
|
||||||
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(
|
this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(
|
||||||
CounterType.P1P1.createInstance(0), ControllerGotLifeCount.instance, true
|
CounterType.P1P1.createInstance(0), ControllerGainedLifeCount.instance, true
|
||||||
), "with X +1/+1 counters on it, where X is the amount of life you've gained this turn")
|
), "with X +1/+1 counters on it, where X is the amount of life you've gained this turn")
|
||||||
.addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
.addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
private VoraciousWurm(final VoraciousWurm card) {
|
private VoraciousWurm(final VoraciousWurm card) {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||||
import mage.abilities.costs.common.TapSourceCost;
|
import mage.abilities.costs.common.TapSourceCost;
|
||||||
import mage.abilities.costs.mana.GenericManaCost;
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
import mage.abilities.dynamicvalue.DynamicValue;
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||||
import mage.abilities.hint.Hint;
|
import mage.abilities.hint.Hint;
|
||||||
|
|
@ -46,7 +46,7 @@ public final class WillowduskEssenceSeer extends CardImpl {
|
||||||
"life you lost this turn, whichever is greater"), new GenericManaCost(1));
|
"life you lost this turn, whichever is greater"), new GenericManaCost(1));
|
||||||
ability.addCost(new TapSourceCost());
|
ability.addCost(new TapSourceCost());
|
||||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE));
|
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE));
|
||||||
ability.addHint(ControllerGotLifeCount.getHint());
|
ability.addHint(ControllerGainedLifeCount.getHint());
|
||||||
ability.addHint(WillowduskEssenceSeerHint.instance);
|
ability.addHint(WillowduskEssenceSeerHint.instance);
|
||||||
this.addAbility(ability, new PlayerGainedLifeWatcher());
|
this.addAbility(ability, new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.Condition;
|
||||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||||
import mage.abilities.dynamicvalue.common.ControllerGotLifeCount;
|
import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
||||||
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
||||||
import mage.abilities.effects.common.SacrificeOpponentsEffect;
|
import mage.abilities.effects.common.SacrificeOpponentsEffect;
|
||||||
import mage.abilities.keyword.DeathtouchAbility;
|
import mage.abilities.keyword.DeathtouchAbility;
|
||||||
|
|
@ -54,7 +54,7 @@ public final class WitchOfTheMoors extends CardImpl {
|
||||||
ability.addTarget(new TargetCardInYourGraveyard(
|
ability.addTarget(new TargetCardInYourGraveyard(
|
||||||
0, 1, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD
|
0, 1, StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD
|
||||||
));
|
));
|
||||||
this.addAbility(ability.addHint(ControllerGotLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
this.addAbility(ability.addHint(ControllerGainedLifeCount.getHint()), new PlayerGainedLifeWatcher());
|
||||||
}
|
}
|
||||||
|
|
||||||
private WitchOfTheMoors(final WitchOfTheMoors card) {
|
private WitchOfTheMoors(final WitchOfTheMoors card) {
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ public final class TalesOfMiddleEarthCommander extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Arwen, Weaver of Hope", 35, Rarity.RARE, mage.cards.a.ArwenWeaverOfHope.class));
|
cards.add(new SetCardInfo("Arwen, Weaver of Hope", 35, Rarity.RARE, mage.cards.a.ArwenWeaverOfHope.class));
|
||||||
cards.add(new SetCardInfo("Asceticism", 233, Rarity.RARE, mage.cards.a.Asceticism.class));
|
cards.add(new SetCardInfo("Asceticism", 233, Rarity.RARE, mage.cards.a.Asceticism.class));
|
||||||
cards.add(new SetCardInfo("Ash Barrens", 295, Rarity.UNCOMMON, mage.cards.a.AshBarrens.class));
|
cards.add(new SetCardInfo("Ash Barrens", 295, Rarity.UNCOMMON, mage.cards.a.AshBarrens.class));
|
||||||
|
cards.add(new SetCardInfo("Assemble the Entmoot", 36, Rarity.RARE, mage.cards.a.AssembleTheEntmoot.class));
|
||||||
cards.add(new SetCardInfo("Banishing Light", 161, Rarity.UNCOMMON, mage.cards.b.BanishingLight.class));
|
cards.add(new SetCardInfo("Banishing Light", 161, Rarity.UNCOMMON, mage.cards.b.BanishingLight.class));
|
||||||
cards.add(new SetCardInfo("Banquet Guests", 47, Rarity.RARE, mage.cards.b.BanquetGuests.class));
|
cards.add(new SetCardInfo("Banquet Guests", 47, Rarity.RARE, mage.cards.b.BanquetGuests.class));
|
||||||
cards.add(new SetCardInfo("Basalt Monolith", 274, Rarity.UNCOMMON, mage.cards.b.BasaltMonolith.class));
|
cards.add(new SetCardInfo("Basalt Monolith", 274, Rarity.UNCOMMON, mage.cards.b.BasaltMonolith.class));
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ public class SimpleActivatedAbility extends ActivatedAbilityImpl {
|
||||||
super(zone, effect, cost);
|
super(zone, effect, cost);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SimpleActivatedAbility(SimpleActivatedAbility ability) {
|
protected SimpleActivatedAbility(SimpleActivatedAbility ability) {
|
||||||
super(ability);
|
super(ability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,11 @@ import mage.game.Game;
|
||||||
import mage.watchers.common.PlayerGainedLifeWatcher;
|
import mage.watchers.common.PlayerGainedLifeWatcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Amount of life the controller got this turn.
|
* Amount of life the controller gained this turn.
|
||||||
*
|
*
|
||||||
* @author LevelX2
|
* @author LevelX2
|
||||||
*/
|
*/
|
||||||
public enum ControllerGotLifeCount implements DynamicValue {
|
public enum ControllerGainedLifeCount implements DynamicValue {
|
||||||
instance;
|
instance;
|
||||||
|
|
||||||
private static final Hint hint = new ValueHint("Life gained this turn", instance);
|
private static final Hint hint = new ValueHint("Life gained this turn", instance);
|
||||||
|
|
@ -28,7 +28,7 @@ public enum ControllerGotLifeCount implements DynamicValue {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ControllerGotLifeCount copy() {
|
public ControllerGainedLifeCount copy() {
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -22,7 +22,7 @@ public final class SylvanOfferingTreefolkToken extends TokenImpl {
|
||||||
toughness = new MageInt(xValue);
|
toughness = new MageInt(xValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public SylvanOfferingTreefolkToken(final SylvanOfferingTreefolkToken token) {
|
private SylvanOfferingTreefolkToken(final SylvanOfferingTreefolkToken token) {
|
||||||
super(token);
|
super(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue