mirror of
https://github.com/correl/mage.git
synced 2024-11-29 03:00:12 +00:00
[LTR] Implement Denethor, Ruling Steward
This commit is contained in:
parent
b09111a8e5
commit
38b7f9e5f5
5 changed files with 107 additions and 25 deletions
|
@ -4,6 +4,7 @@ import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.SimpleActivatedAbility;
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
import mage.abilities.common.SimpleStaticAbility;
|
import mage.abilities.common.SimpleStaticAbility;
|
||||||
|
import mage.abilities.condition.common.CreatureDiedControlledCondition;
|
||||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
|
@ -15,7 +16,10 @@ import mage.abilities.keyword.IndestructibleAbility;
|
||||||
import mage.abilities.keyword.MenaceAbility;
|
import mage.abilities.keyword.MenaceAbility;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.*;
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Duration;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
import mage.filter.StaticFilters;
|
import mage.filter.StaticFilters;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
|
@ -44,10 +48,12 @@ public final class BontuTheGlorified extends CardImpl {
|
||||||
this.addAbility(IndestructibleAbility.getInstance());
|
this.addAbility(IndestructibleAbility.getInstance());
|
||||||
|
|
||||||
// Bontu the Glorified can't attack or block unless a creature died under your control this turn.
|
// Bontu the Glorified can't attack or block unless a creature died under your control this turn.
|
||||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BontuTheGlorifiedRestrictionEffect()));
|
this.addAbility(new SimpleStaticAbility(new BontuTheGlorifiedRestrictionEffect()).addHint(CreatureDiedControlledCondition.getHint()));
|
||||||
|
|
||||||
// {1}{B}, Sacrifice another creature: Scry 1. Each opponent loses 1 life and you gain 1 life.
|
// {1}{B}, Sacrifice another creature: Scry 1. Each opponent loses 1 life and you gain 1 life.
|
||||||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ScryEffect(1, false), new ManaCostsImpl<>("{1}{B}"));
|
Ability ability = new SimpleActivatedAbility(
|
||||||
|
new ScryEffect(1, false), new ManaCostsImpl<>("{1}{B}")
|
||||||
|
);
|
||||||
ability.addEffect(new LoseLifeOpponentsEffect(1));
|
ability.addEffect(new LoseLifeOpponentsEffect(1));
|
||||||
Effect effect = new GainLifeEffect(1);
|
Effect effect = new GainLifeEffect(1);
|
||||||
effect.setText("and you gain 1 life");
|
effect.setText("and you gain 1 life");
|
||||||
|
|
59
Mage.Sets/src/mage/cards/d/DenethorRulingSteward.java
Normal file
59
Mage.Sets/src/mage/cards/d/DenethorRulingSteward.java
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
package mage.cards.d;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
|
import mage.abilities.common.SimpleActivatedAbility;
|
||||||
|
import mage.abilities.condition.common.CreatureDiedControlledCondition;
|
||||||
|
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||||
|
import mage.abilities.costs.mana.GenericManaCost;
|
||||||
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
|
import mage.abilities.effects.common.GainLifeEffect;
|
||||||
|
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.constants.SuperType;
|
||||||
|
import mage.constants.TargetController;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
import mage.game.permanent.token.HumanSoldierToken;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class DenethorRulingSteward extends CardImpl {
|
||||||
|
|
||||||
|
public DenethorRulingSteward(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}{B}");
|
||||||
|
|
||||||
|
this.supertype.add(SuperType.LEGENDARY);
|
||||||
|
this.subtype.add(SubType.HUMAN);
|
||||||
|
this.subtype.add(SubType.NOBLE);
|
||||||
|
this.power = new MageInt(2);
|
||||||
|
this.toughness = new MageInt(4);
|
||||||
|
|
||||||
|
// At the beginning of your end step, if a creature died under your control this turn, create a 1/1 white Human Soldier creature token.
|
||||||
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||||
|
new CreateTokenEffect(new HumanSoldierToken()), TargetController.YOU,
|
||||||
|
CreatureDiedControlledCondition.instance, false
|
||||||
|
).addHint(CreatureDiedControlledCondition.getHint()));
|
||||||
|
|
||||||
|
// {2}, Sacrifice another creature: Each opponent loses 1 life and you gain 1 life.
|
||||||
|
Ability ability = new SimpleActivatedAbility(new LoseLifeOpponentsEffect(1), new GenericManaCost(2));
|
||||||
|
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE));
|
||||||
|
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private DenethorRulingSteward(final DenethorRulingSteward card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DenethorRulingSteward copy() {
|
||||||
|
return new DenethorRulingSteward(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,10 +1,9 @@
|
||||||
package mage.cards.f;
|
package mage.cards.f;
|
||||||
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
|
||||||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||||
import mage.abilities.common.TheRingTemptsYouChooseAnotherTriggeredAbility;
|
import mage.abilities.common.TheRingTemptsYouChooseAnotherTriggeredAbility;
|
||||||
import mage.abilities.condition.Condition;
|
import mage.abilities.condition.common.CreatureDiedControlledCondition;
|
||||||
import mage.abilities.effects.common.CreateTokenEffect;
|
import mage.abilities.effects.common.CreateTokenEffect;
|
||||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
|
@ -13,9 +12,7 @@ import mage.constants.CardType;
|
||||||
import mage.constants.SubType;
|
import mage.constants.SubType;
|
||||||
import mage.constants.SuperType;
|
import mage.constants.SuperType;
|
||||||
import mage.constants.TargetController;
|
import mage.constants.TargetController;
|
||||||
import mage.game.Game;
|
|
||||||
import mage.game.permanent.token.HumanSoldierToken;
|
import mage.game.permanent.token.HumanSoldierToken;
|
||||||
import mage.watchers.common.CreaturesDiedWatcher;
|
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
|
@ -36,8 +33,8 @@ public final class FaramirFieldCommander extends CardImpl {
|
||||||
// At the beginning of your end step, if a creature died under your control this turn, draw a card.
|
// At the beginning of your end step, if a creature died under your control this turn, draw a card.
|
||||||
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
this.addAbility(new BeginningOfEndStepTriggeredAbility(
|
||||||
new DrawCardSourceControllerEffect(1), TargetController.YOU,
|
new DrawCardSourceControllerEffect(1), TargetController.YOU,
|
||||||
FaramirFieldCommanderCondition.instance, false
|
CreatureDiedControlledCondition.instance, false
|
||||||
));
|
).addHint(CreatureDiedControlledCondition.getHint()));
|
||||||
|
|
||||||
// Whenever the Ring tempts you, if you chose a creature other than Faramir, Field Commander as your Ring-bearer, create a 1/1 white Human Soldier creature token.
|
// Whenever the Ring tempts you, if you chose a creature other than Faramir, Field Commander as your Ring-bearer, create a 1/1 white Human Soldier creature token.
|
||||||
this.addAbility(new TheRingTemptsYouChooseAnotherTriggeredAbility(new CreateTokenEffect(new HumanSoldierToken())));
|
this.addAbility(new TheRingTemptsYouChooseAnotherTriggeredAbility(new CreateTokenEffect(new HumanSoldierToken())));
|
||||||
|
@ -53,19 +50,3 @@ public final class FaramirFieldCommander extends CardImpl {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
enum FaramirFieldCommanderCondition implements Condition {
|
|
||||||
instance;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Game game, Ability source) {
|
|
||||||
return game
|
|
||||||
.getState()
|
|
||||||
.getWatcher(CreaturesDiedWatcher.class)
|
|
||||||
.getAmountOfCreaturesDiedThisTurnByOwner(source.getControllerId()) > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return "a creature died under your control this turn";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ public final class TheLordOfTheRingsTalesOfMiddleEarth extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Claim the Precious", 81, Rarity.COMMON, mage.cards.c.ClaimThePrecious.class));
|
cards.add(new SetCardInfo("Claim the Precious", 81, Rarity.COMMON, mage.cards.c.ClaimThePrecious.class));
|
||||||
cards.add(new SetCardInfo("Council's Deliberation", 46, Rarity.UNCOMMON, mage.cards.c.CouncilsDeliberation.class));
|
cards.add(new SetCardInfo("Council's Deliberation", 46, Rarity.UNCOMMON, mage.cards.c.CouncilsDeliberation.class));
|
||||||
cards.add(new SetCardInfo("Deceive the Messenger", 47, Rarity.COMMON, mage.cards.d.DeceiveTheMessenger.class));
|
cards.add(new SetCardInfo("Deceive the Messenger", 47, Rarity.COMMON, mage.cards.d.DeceiveTheMessenger.class));
|
||||||
|
cards.add(new SetCardInfo("Denethor, Ruling Steward", 198, Rarity.UNCOMMON, mage.cards.d.DenethorRulingSteward.class));
|
||||||
cards.add(new SetCardInfo("Display of Power", 119, Rarity.RARE, mage.cards.d.DisplayOfPower.class));
|
cards.add(new SetCardInfo("Display of Power", 119, Rarity.RARE, mage.cards.d.DisplayOfPower.class));
|
||||||
cards.add(new SetCardInfo("Dreadful as the Storm", 48, Rarity.COMMON, mage.cards.d.DreadfulAsTheStorm.class));
|
cards.add(new SetCardInfo("Dreadful as the Storm", 48, Rarity.COMMON, mage.cards.d.DreadfulAsTheStorm.class));
|
||||||
cards.add(new SetCardInfo("Dunedain Blade", 6, Rarity.COMMON, mage.cards.d.DunedainBlade.class));
|
cards.add(new SetCardInfo("Dunedain Blade", 6, Rarity.COMMON, mage.cards.d.DunedainBlade.class));
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
package mage.abilities.condition.common;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
|
import mage.abilities.hint.ConditionHint;
|
||||||
|
import mage.abilities.hint.Hint;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.watchers.common.CreaturesDiedWatcher;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public enum CreatureDiedControlledCondition implements Condition {
|
||||||
|
instance;
|
||||||
|
private static final Hint hint = new ConditionHint(
|
||||||
|
instance, "A creature died under your control this turn"
|
||||||
|
);
|
||||||
|
|
||||||
|
public static Hint getHint() {
|
||||||
|
return hint;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
return game
|
||||||
|
.getState()
|
||||||
|
.getWatcher(CreaturesDiedWatcher.class)
|
||||||
|
.getAmountOfCreaturesDiedThisTurnByOwner(source.getControllerId()) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "a creature died under your control this turn";
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue