mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[WOE] Implement Tallion's Messenger (#10866)
* [WOE] Implement Tallion's Messenger * not set a trigger phrase for the reflexive trigger --------- Co-authored-by: Evan Kranzler <theelk801@gmail.com>
This commit is contained in:
parent
a575968aab
commit
f582685a79
2 changed files with 97 additions and 0 deletions
96
Mage.Sets/src/mage/cards/t/TalionsMessenger.java
Normal file
96
Mage.Sets/src/mage/cards/t/TalionsMessenger.java
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksWithCreaturesTriggeredAbility;
|
||||
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class TalionsMessenger extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterCreaturePermanent(SubType.FAERIE, "Faeries");
|
||||
|
||||
public TalionsMessenger(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}");
|
||||
|
||||
this.subtype.add(SubType.FAERIE);
|
||||
this.subtype.add(SubType.NOBLE);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Whenever you attack with one or more Faeries, draw a card, then discard a card. When you discard a card this way, put a +1/+1 counter on target Faerie you control.
|
||||
this.addAbility(new AttacksWithCreaturesTriggeredAbility(
|
||||
new TalionsMessengerEffect(), 1, filter
|
||||
));
|
||||
}
|
||||
|
||||
private TalionsMessenger(final TalionsMessenger card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TalionsMessenger copy() {
|
||||
return new TalionsMessenger(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TalionsMessengerEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.FAERIE, "Faerie you control");
|
||||
|
||||
TalionsMessengerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "draw a card, then discard a card. When you discard a card this way, put a +1/+1 counter on target Faerie you control";
|
||||
}
|
||||
|
||||
private TalionsMessengerEffect(final TalionsMessengerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TalionsMessengerEffect copy() {
|
||||
return new TalionsMessengerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
controller.drawCards(1, source, game);
|
||||
Cards discard = controller.discard(1, false, false, source, game);
|
||||
if (!discard.isEmpty()) {
|
||||
ReflexiveTriggeredAbility reflexive = new ReflexiveTriggeredAbility(
|
||||
new AddCountersTargetEffect(CounterType.P1P1.createInstance()),
|
||||
false
|
||||
);
|
||||
reflexive.addTarget(new TargetPermanent(filter));
|
||||
game.fireReflexiveTriggeredAbility(reflexive, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -81,6 +81,7 @@ public final class WildsOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sweettooth Witch", 111, Rarity.COMMON, mage.cards.s.SweettoothWitch.class));
|
||||
cards.add(new SetCardInfo("Syr Armont, the Redeemer", 214, Rarity.UNCOMMON, mage.cards.s.SyrArmontTheRedeemer.class));
|
||||
cards.add(new SetCardInfo("Syr Ginger, the Meal Ender", 252, Rarity.RARE, mage.cards.s.SyrGingerTheMealEnder.class));
|
||||
cards.add(new SetCardInfo("Talion's Messenger", 73, Rarity.RARE, mage.cards.t.TalionsMessenger.class));
|
||||
cards.add(new SetCardInfo("Taken by Nightmares", 112, Rarity.UNCOMMON, mage.cards.t.TakenByNightmares.class));
|
||||
cards.add(new SetCardInfo("Talion, the Kindly Lord", 215, Rarity.MYTHIC, mage.cards.t.TalionTheKindlyLord.class));
|
||||
cards.add(new SetCardInfo("Tanglespan Lookout", 188, Rarity.UNCOMMON, mage.cards.t.TanglespanLookout.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue