mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 05:09:16 -08:00
[OTC] Implement Stella Lee, Wild Card
This commit is contained in:
parent
0dfd214f44
commit
c4c768b841
3 changed files with 91 additions and 1 deletions
80
Mage.Sets/src/mage/cards/s/StellaLeeWildCard.java
Normal file
80
Mage.Sets/src/mage/cards/s/StellaLeeWildCard.java
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
import mage.abilities.common.CastSecondSpellTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.CopyTargetSpellEffect;
|
||||
import mage.abilities.effects.common.ExileTopXMayPlayUntilEffect;
|
||||
import mage.abilities.keyword.StormAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.common.FilterInstantOrSorcerySpell;
|
||||
import mage.game.Game;
|
||||
import mage.target.TargetSpell;
|
||||
import mage.watchers.common.CastSpellLastTurnWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class StellaLeeWildCard extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterInstantOrSorcerySpell("instant or sorcery spell you control");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
}
|
||||
|
||||
public StellaLeeWildCard(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{R}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Whenever you cast your second spell each turn, exile the top card of your library. Until the end of your next turn, you may play that card.
|
||||
this.addAbility(new CastSecondSpellTriggeredAbility(
|
||||
new ExileTopXMayPlayUntilEffect(1, Duration.UntilEndOfYourNextTurn)
|
||||
));
|
||||
|
||||
// {T}: Copy target instant or sorcery spell you control. You may choose new targets for the copy. Activate only if you've cast three or more spells this turn.
|
||||
Ability ability = new ActivateIfConditionActivatedAbility(
|
||||
Zone.BATTLEFIELD, new CopyTargetSpellEffect(),
|
||||
new TapSourceCost(), StellaLeeWildCardCondition.instance
|
||||
);
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
this.addAbility(ability.addHint(StormAbility.getHint()));
|
||||
}
|
||||
|
||||
private StellaLeeWildCard(final StellaLeeWildCard card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StellaLeeWildCard copy() {
|
||||
return new StellaLeeWildCard(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum StellaLeeWildCardCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return game
|
||||
.getState()
|
||||
.getWatcher(CastSpellLastTurnWatcher.class)
|
||||
.getAmountOfSpellsPlayerCastOnCurrentTurn(source.getControllerId()) >= 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "you've cast three or more spells this turn";
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package mage.sets;
|
||||
|
||||
import mage.cards.ExpansionSet;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.SetType;
|
||||
|
||||
/**
|
||||
|
|
@ -17,5 +18,7 @@ public final class OutlawsOfThunderJunctionCommander extends ExpansionSet {
|
|||
private OutlawsOfThunderJunctionCommander() {
|
||||
super("Outlaws of Thunder Junction Commander", "OTC", ExpansionSet.buildDate(2024, 4, 19), SetType.SUPPLEMENTAL);
|
||||
this.hasBasicLands = false;
|
||||
|
||||
cards.add(new SetCardInfo("Stella Lee, Wild Card", 3, Rarity.MYTHIC, mage.cards.s.StellaLeeWildCard.class));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import mage.abilities.TriggeredAbilityImpl;
|
|||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
|
|
@ -21,9 +22,15 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class StormAbility extends TriggeredAbilityImpl {
|
||||
|
||||
private static final Hint hint = new ValueHint("Spells cast this turn", SpellsCastThisTurnValue.instance);
|
||||
|
||||
public static Hint getHint() {
|
||||
return hint;
|
||||
}
|
||||
|
||||
public StormAbility() {
|
||||
super(Zone.STACK, new StormEffect());
|
||||
this.addHint(new ValueHint("Spells cast this turn", SpellsCastThisTurnValue.instance));
|
||||
this.addHint(hint);
|
||||
}
|
||||
|
||||
private StormAbility(final StormAbility ability) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue