mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[CMM] Implement Skittering Cicada (#10682)
This commit is contained in:
parent
e7d6d0456a
commit
594a9ca85e
2 changed files with 106 additions and 0 deletions
105
Mage.Sets/src/mage/cards/s/SkitteringCicada.java
Normal file
105
Mage.Sets/src/mage/cards/s/SkitteringCicada.java
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashAllEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.mageobject.ColorlessPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.stack.Spell;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class SkitteringCicada extends CardImpl {
|
||||
|
||||
public static final FilterCard filterCard = new FilterCard("colorless spells");
|
||||
public static final FilterSpell filterSpell = new FilterSpell("a colorless spell");
|
||||
|
||||
static {
|
||||
filterCard.add(ColorlessPredicate.instance);
|
||||
filterSpell.add(ColorlessPredicate.instance);
|
||||
}
|
||||
|
||||
public SkitteringCicada(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}");
|
||||
|
||||
this.subtype.add(SubType.INSECT);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// You may cast colorless spells as though they had flash.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
new CastAsThoughItHadFlashAllEffect(Duration.WhileOnBattlefield, filterCard)
|
||||
));
|
||||
|
||||
// Whenever you cast a colorless spell, until end of turn, Skittering Cicada gains trample and gets +X/+X, where X is that spell's mana value.
|
||||
TriggeredAbility trigger = new SpellCastControllerTriggeredAbility(
|
||||
new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn)
|
||||
.setText("until end of turn, {this} gains trample"),
|
||||
filterSpell, false, true
|
||||
);
|
||||
trigger.addEffect(new SkitteringCicadaBoostEffect());
|
||||
|
||||
this.addAbility(trigger);
|
||||
}
|
||||
|
||||
private SkitteringCicada(final SkitteringCicada card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SkitteringCicada copy() {
|
||||
return new SkitteringCicada(this);
|
||||
}
|
||||
}
|
||||
|
||||
class SkitteringCicadaBoostEffect extends OneShotEffect {
|
||||
|
||||
public SkitteringCicadaBoostEffect() {
|
||||
super(Outcome.BoostCreature);
|
||||
this.staticText = " and gets +X/+X, where X is that spell's mana value";
|
||||
}
|
||||
|
||||
public SkitteringCicadaBoostEffect(final SkitteringCicadaBoostEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SkitteringCicadaBoostEffect copy() {
|
||||
return new SkitteringCicadaBoostEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Spell spell = game.getSpellOrLKIStack(this.getTargetPointer().getFirst(game, source));
|
||||
if (spell != null) {
|
||||
int cmc = spell.getManaValue();
|
||||
if (cmc > 0) {
|
||||
game.addEffect(new BoostSourceEffect(cmc, cmc, Duration.EndOfTurn), source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -559,6 +559,7 @@ public final class CommanderMasters extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sigil of the Empty Throne", 836, Rarity.RARE, mage.cards.s.SigilOfTheEmptyThrone.class));
|
||||
cards.add(new SetCardInfo("Silent Arbiter", 972, Rarity.RARE, mage.cards.s.SilentArbiter.class));
|
||||
cards.add(new SetCardInfo("Sinew Sliver", 837, Rarity.COMMON, mage.cards.s.SinewSliver.class));
|
||||
cards.add(new SetCardInfo("Skittering Cicada", 717, Rarity.RARE, mage.cards.s.SkitteringCicada.class));
|
||||
cards.add(new SetCardInfo("Skycloud Expanse", 1035, Rarity.RARE, mage.cards.s.SkycloudExpanse.class));
|
||||
cards.add(new SetCardInfo("Skyline Despot", 254, Rarity.UNCOMMON, mage.cards.s.SkylineDespot.class));
|
||||
cards.add(new SetCardInfo("Skyshroud Claim", 321, Rarity.COMMON, mage.cards.s.SkyshroudClaim.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue