mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
[CMR] Implemented Lathiel, the Bounteous Dawn
This commit is contained in:
parent
9dba89f37d
commit
fff12f0381
2 changed files with 96 additions and 0 deletions
95
Mage.Sets/src/mage/cards/l/LathielTheBounteousDawn.java
Normal file
95
Mage.Sets/src/mage/cards/l/LathielTheBounteousDawn.java
Normal file
|
@ -0,0 +1,95 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.counter.DistributeCountersEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.target.TargetAmount;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
import mage.watchers.common.PlayerGainedLifeWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class LathielTheBounteousDawn extends CardImpl {
|
||||
|
||||
private static final Condition condition = new YouGainedLifeCondition(ComparisonType.MORE_THAN, 0);
|
||||
|
||||
public LathielTheBounteousDawn(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{W}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.UNICORN);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Lifelink
|
||||
this.addAbility(LifelinkAbility.getInstance());
|
||||
|
||||
// At the beginning of each end step, if you gained life this turn, distribute up to that many +1/+1 counters among any number of other target creatures.
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfEndStepTriggeredAbility(new DistributeCountersEffect(
|
||||
CounterType.P1P1, 1, false, ""
|
||||
), TargetController.ANY, false),
|
||||
condition, "At the beginning of each end step, if you gained life this turn, " +
|
||||
"distribute up to that many +1/+1 counters among any number of other target creatures."
|
||||
);
|
||||
TargetAmount target = new TargetCreaturePermanentAmount(
|
||||
LathielTheBounteousDawnValue.instance,
|
||||
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE
|
||||
);
|
||||
target.setMinNumberOfTargets(0);
|
||||
ability.addTarget(target);
|
||||
this.addAbility(ability.addHint(LathielTheBounteousDawnValue.getHint()), new PlayerGainedLifeWatcher());
|
||||
}
|
||||
|
||||
private LathielTheBounteousDawn(final LathielTheBounteousDawn card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LathielTheBounteousDawn copy() {
|
||||
return new LathielTheBounteousDawn(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum LathielTheBounteousDawnValue implements DynamicValue {
|
||||
instance;
|
||||
private static final Hint hint = new ValueHint("Life gained this turn", instance);
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
PlayerGainedLifeWatcher watcher = game.getState().getWatcher(PlayerGainedLifeWatcher.class);
|
||||
return watcher == null ? 0 : watcher.getLifeGained(sourceAbility.getControllerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public LathielTheBounteousDawnValue copy() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "";
|
||||
}
|
||||
|
||||
public static Hint getHint() {
|
||||
return hint;
|
||||
}
|
||||
}
|
|
@ -130,6 +130,7 @@ public final class CommanderLegends extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Krark, the Thumbless", 189, Rarity.RARE, mage.cards.k.KrarkTheThumbless.class));
|
||||
cards.add(new SetCardInfo("Kydele, Chosen of Kruphix", 524, Rarity.MYTHIC, mage.cards.k.KydeleChosenOfKruphix.class));
|
||||
cards.add(new SetCardInfo("Laboratory Drudge", 78, Rarity.RARE, mage.cards.l.LaboratoryDrudge.class));
|
||||
cards.add(new SetCardInfo("Lathiel, the Bounteous Dawn", 295, Rarity.RARE, mage.cards.l.LathielTheBounteousDawn.class));
|
||||
cards.add(new SetCardInfo("Livio, Oathsworn Sentinel", 31, Rarity.RARE, mage.cards.l.LivioOathswornSentinel.class));
|
||||
cards.add(new SetCardInfo("Ludevic, Necro-Alchemist", 525, Rarity.MYTHIC, mage.cards.l.LudevicNecroAlchemist.class));
|
||||
cards.add(new SetCardInfo("Maelstrom Colossus", 322, Rarity.COMMON, mage.cards.m.MaelstromColossus.class));
|
||||
|
|
Loading…
Reference in a new issue