mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[LTC] Implement Oarth Of Eorl (#10469)
Added one constructor for SagaAbility, accepting multiple effects and a target.
This commit is contained in:
parent
1194feefd8
commit
720b2fe163
4 changed files with 112 additions and 0 deletions
73
Mage.Sets/src/mage/cards/o/OathOfEorl.java
Normal file
73
Mage.Sets/src/mage/cards/o/OathOfEorl.java
Normal file
|
@ -0,0 +1,73 @@
|
|||
package mage.cards.o;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.common.SagaAbility;
|
||||
import mage.abilities.effects.Effects;
|
||||
import mage.abilities.effects.common.BecomesMonarchSourceEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.constants.SagaChapter;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.permanent.token.HumanKnightToken;
|
||||
import mage.game.permanent.token.HumanSoldierToken;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class OathOfEorl extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterCreaturePermanent(SubType.HUMAN, "Human");
|
||||
|
||||
public OathOfEorl(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}{W}");
|
||||
|
||||
this.subtype.add(SubType.SAGA);
|
||||
|
||||
// (As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.)
|
||||
SagaAbility sagaAbility = new SagaAbility(this);
|
||||
|
||||
|
||||
// I-- Create two 1/1 white Human Soldier creature tokens.
|
||||
sagaAbility.addChapterEffect(
|
||||
this, SagaChapter.CHAPTER_I, new CreateTokenEffect(new HumanSoldierToken(), 2)
|
||||
);
|
||||
|
||||
// II-- Create two 2/2 red Human Knight creature tokens with trample and haste.
|
||||
sagaAbility.addChapterEffect(
|
||||
this, SagaChapter.CHAPTER_II, new CreateTokenEffect(new HumanKnightToken(), 2)
|
||||
);
|
||||
|
||||
Effects chap3Effects = new Effects(
|
||||
new AddCountersTargetEffect(CounterType.INDESTRUCTIBLE.createInstance()),
|
||||
new BecomesMonarchSourceEffect()
|
||||
);
|
||||
|
||||
// III-- Put an indestructible counter on up to one target Human.
|
||||
sagaAbility.addChapterEffect(
|
||||
this, SagaChapter.CHAPTER_III,
|
||||
chap3Effects,
|
||||
new TargetPermanent(0, 1, filter)
|
||||
);
|
||||
|
||||
this.addAbility(sagaAbility);
|
||||
}
|
||||
|
||||
private OathOfEorl(final OathOfEorl card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OathOfEorl copy() {
|
||||
return new OathOfEorl(this);
|
||||
}
|
||||
}
|
|
@ -148,6 +148,7 @@ public final class TalesOfMiddleEarthCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Necroblossom Snarl", 321, Rarity.RARE, mage.cards.n.NecroblossomSnarl.class));
|
||||
cards.add(new SetCardInfo("Night's Whisper", 205, Rarity.COMMON, mage.cards.n.NightsWhisper.class));
|
||||
cards.add(new SetCardInfo("Notion Thief", 270, Rarity.RARE, mage.cards.n.NotionThief.class));
|
||||
cards.add(new SetCardInfo("Oath of Eorl", 64, Rarity.RARE, mage.cards.o.OathOfEorl.class));
|
||||
cards.add(new SetCardInfo("Oboro, Palace in the Clouds", 371, Rarity.MYTHIC, mage.cards.o.OboroPalaceInTheClouds.class));
|
||||
cards.add(new SetCardInfo("Opt", 194, Rarity.COMMON, mage.cards.o.Opt.class));
|
||||
cards.add(new SetCardInfo("Orchard Strider", 253, Rarity.COMMON, mage.cards.o.OrchardStrider.class));
|
||||
|
|
|
@ -63,6 +63,10 @@ public class SagaAbility extends SimpleStaticAbility {
|
|||
addChapterEffect(card, chapter, chapter, new Effects(effects));
|
||||
}
|
||||
|
||||
public void addChapterEffect(Card card, SagaChapter chapter, Effects effects, Target target) {
|
||||
addChapterEffect(card, chapter, chapter, effects, target);
|
||||
}
|
||||
|
||||
public void addChapterEffect(Card card, SagaChapter chapter, Consumer<TriggeredAbility> applier) {
|
||||
addChapterEffect(card, chapter, chapter, applier);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class HumanKnightToken extends TokenImpl {
|
||||
|
||||
public HumanKnightToken() {
|
||||
super("Human Knight Token", "2/2 red Human Knight creature token with trample and haste");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add(SubType.HUMAN);
|
||||
subtype.add(SubType.KNIGHT);
|
||||
power = new MageInt(2);
|
||||
toughness = new MageInt(2);
|
||||
addAbility(TrampleAbility.getInstance());
|
||||
addAbility(HasteAbility.getInstance());
|
||||
}
|
||||
|
||||
public HumanKnightToken(final HumanKnightToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HumanKnightToken copy() {
|
||||
return new HumanKnightToken(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue