mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[NEO] Implemented Tatsunari, Toad Rider
This commit is contained in:
parent
336ba66ab9
commit
c1d5a310d5
4 changed files with 145 additions and 0 deletions
90
Mage.Sets/src/mage/cards/t/TatsunariToadRider.java
Normal file
90
Mage.Sets/src/mage/cards/t/TatsunariToadRider.java
Normal file
|
@ -0,0 +1,90 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedByAllTargetEffect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.game.permanent.token.KeimiToken;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TatsunariToadRider extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
|
||||
private static final FilterCreaturePermanent filter2 = new FilterCreaturePermanent();
|
||||
private static final FilterPermanent filter3 = new FilterControlledPermanent(SubType.FROG);
|
||||
|
||||
static {
|
||||
filter.add(new NamePredicate("Keimi"));
|
||||
filter2.add(Predicates.or(
|
||||
new AbilityPredicate(FlyingAbility.class),
|
||||
new AbilityPredicate(ReachAbility.class)
|
||||
));
|
||||
}
|
||||
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.EQUAL_TO, 0);
|
||||
|
||||
public TatsunariToadRider(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.NINJA);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Whenever you cast an enchantment spell, if you don't control a creature named Keimi, create Keimi, a legendary 3/3 black and green Frog creature token with "Whenever you cast an enchantment spell, each opponent loses 1 life and you gain 1 life."
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new SpellCastControllerTriggeredAbility(
|
||||
new CreateTokenEffect(new KeimiToken()),
|
||||
StaticFilters.FILTER_SPELL_AN_ENCHANTMENT, false
|
||||
), condition, "Whenever you cast an enchantment spell, if you don't control " +
|
||||
"a creature named Keimi, create Keimi, a legendary 3/3 black and green Frog creature token with " +
|
||||
"\"Whenever you cast an enchantment spell, each opponent loses 1 life and you gain 1 life.\""
|
||||
));
|
||||
|
||||
// {1}{G/U}: Tatsunari, Toad Rider and target Frog you control can't be blocked this turn except by creatures with flying or reach.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new CantBeBlockedByCreaturesSourceEffect(
|
||||
filter2, Duration.EndOfTurn
|
||||
).setText("{this}"), new ManaCostsImpl<>("{1}{G/U}")
|
||||
);
|
||||
ability.addEffect(new CantBeBlockedByAllTargetEffect(filter2, Duration.EndOfTurn)
|
||||
.setText("and target Frog you control can't be blocked this turn except by creatures with flying or reach"));
|
||||
ability.addTarget(new TargetPermanent(filter3));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private TatsunariToadRider(final TatsunariToadRider card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TatsunariToadRider copy() {
|
||||
return new TatsunariToadRider(this);
|
||||
}
|
||||
}
|
|
@ -265,6 +265,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Tameshi, Reality Architect", 82, Rarity.RARE, mage.cards.t.TameshiRealityArchitect.class));
|
||||
cards.add(new SetCardInfo("Tamiyo's Compleation", 83, Rarity.COMMON, mage.cards.t.TamiyosCompleation.class));
|
||||
cards.add(new SetCardInfo("Tamiyo's Safekeeping", 211, Rarity.COMMON, mage.cards.t.TamiyosSafekeeping.class));
|
||||
cards.add(new SetCardInfo("Tatsunari, Toad Rider", 123, Rarity.RARE, mage.cards.t.TatsunariToadRider.class));
|
||||
cards.add(new SetCardInfo("Teachings of the Kirin", 212, Rarity.RARE, mage.cards.t.TeachingsOfTheKirin.class));
|
||||
cards.add(new SetCardInfo("Tempered in Solitude", 165, Rarity.UNCOMMON, mage.cards.t.TemperedInSolitude.class));
|
||||
cards.add(new SetCardInfo("The Fall of Lord Konda", 12, Rarity.UNCOMMON, mage.cards.t.TheFallOfLordKonda.class));
|
||||
|
|
|
@ -780,6 +780,13 @@ public final class StaticFilters {
|
|||
FILTER_SPELL_INSTANT_SORCERY_WIZARD.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterSpell FILTER_SPELL_AN_ENCHANTMENT = new FilterSpell("an enchantment spell");
|
||||
|
||||
static {
|
||||
FILTER_SPELL_AN_ENCHANTMENT.add(CardType.ENCHANTMENT.getPredicate());
|
||||
FILTER_SPELL_AN_ENCHANTMENT.setLockedFilter(true);
|
||||
}
|
||||
|
||||
public static final FilterSpell FILTER_SPELL_KICKED_A = new FilterSpell("a kicked spell");
|
||||
|
||||
static {
|
||||
|
|
47
Mage/src/main/java/mage/game/permanent/token/KeimiToken.java
Normal file
47
Mage/src/main/java/mage/game/permanent/token/KeimiToken.java
Normal file
|
@ -0,0 +1,47 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class KeimiToken extends TokenImpl {
|
||||
|
||||
public KeimiToken() {
|
||||
super("Keimi", "Keimi, a legendary 3/3 black and green Frog creature token with \"Whenever you cast an enchantment spell, each opponent loses 1 life and you gain 1 life.\"");
|
||||
supertype.add(SuperType.LEGENDARY);
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlack(true);
|
||||
color.setGreen(true);
|
||||
subtype.add(SubType.FROG);
|
||||
power = new MageInt(3);
|
||||
toughness = new MageInt(3);
|
||||
|
||||
Ability ability = new SpellCastControllerTriggeredAbility(
|
||||
new LoseLifeOpponentsEffect(1),
|
||||
StaticFilters.FILTER_SPELL_AN_ENCHANTMENT, false
|
||||
);
|
||||
ability.addEffect(new GainLifeEffect(1).concatBy("and"));
|
||||
this.addAbility(ability);
|
||||
|
||||
availableImageSetCodes = Arrays.asList("NEO");
|
||||
}
|
||||
|
||||
private KeimiToken(final KeimiToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public KeimiToken copy() {
|
||||
return new KeimiToken(this);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue