mirror of
https://github.com/correl/mage.git
synced 2025-03-29 11:43:34 -09:00
Implemented Destiny Spinner
This commit is contained in:
parent
5402876f20
commit
cc57ce4ae3
2 changed files with 100 additions and 0 deletions
Mage.Sets/src/mage
99
Mage.Sets/src/mage/cards/d/DestinySpinner.java
Normal file
99
Mage.Sets/src/mage/cards/d/DestinySpinner.java
Normal file
|
@ -0,0 +1,99 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CantBeCounteredControlledEffect;
|
||||
import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
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.FilterSpell;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.custom.CreatureToken;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DestinySpinner extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("Creature and enchantment spells you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.CREATURE.getPredicate(),
|
||||
CardType.ENCHANTMENT.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
public DestinySpinner(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{1}{G}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Creature and enchantment spells you control can't be countered.
|
||||
this.addAbility(new SimpleStaticAbility(new CantBeCounteredControlledEffect(
|
||||
filter, null, Duration.WhileOnBattlefield
|
||||
)));
|
||||
|
||||
// {3}{G}: Target land you control becomes an X/X Elemental creature with trample and haste until end of turn, where X is the number of enchantments you control. It's still a land.
|
||||
Ability ability = new SimpleActivatedAbility(new DestinySpinnerEffect(), new ManaCostsImpl("{3}{G}"));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_LAND));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private DestinySpinner(final DestinySpinner card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DestinySpinner copy() {
|
||||
return new DestinySpinner(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DestinySpinnerEffect extends OneShotEffect {
|
||||
|
||||
DestinySpinnerEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Target land you control becomes an X/X Elemental creature with trample and haste " +
|
||||
"until end of turn, where X is the number of enchantments you control. It's still a land.";
|
||||
}
|
||||
|
||||
private DestinySpinnerEffect(final DestinySpinnerEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DestinySpinnerEffect copy() {
|
||||
return new DestinySpinnerEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int pt = game.getBattlefield().countAll(StaticFilters.FILTER_ENCHANTMENT_PERMANENT, source.getControllerId(), game);
|
||||
game.addEffect(new BecomesCreatureTargetEffect(
|
||||
new CreatureToken(pt, pt, "")
|
||||
.withSubType(SubType.ELEMENTAL)
|
||||
.withAbility(TrampleAbility.getInstance())
|
||||
.withAbility(HasteAbility.getInstance()),
|
||||
false, true, Duration.EndOfTurn
|
||||
), source);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -54,6 +54,7 @@ public final class TherosBeyondDeath extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Daxos, Blessed by the Sun", 9, Rarity.UNCOMMON, mage.cards.d.DaxosBlessedByTheSun.class));
|
||||
cards.add(new SetCardInfo("Deathbellow War Cry", 294, Rarity.RARE, mage.cards.d.DeathbellowWarCry.class));
|
||||
cards.add(new SetCardInfo("Demon of Loathing", 292, Rarity.RARE, mage.cards.d.DemonOfLoathing.class));
|
||||
cards.add(new SetCardInfo("Destiny Spinner", 168, Rarity.UNCOMMON, mage.cards.d.DestinySpinner.class));
|
||||
cards.add(new SetCardInfo("Devourer of Memory", 213, Rarity.UNCOMMON, mage.cards.d.DevourerOfMemory.class));
|
||||
cards.add(new SetCardInfo("Discordant Piper", 88, Rarity.COMMON, mage.cards.d.DiscordantPiper.class));
|
||||
cards.add(new SetCardInfo("Drag to the Underworld", 89, Rarity.UNCOMMON, mage.cards.d.DragToTheUnderworld.class));
|
||||
|
|
Loading…
Add table
Reference in a new issue