forked from External/mage
[NEO] Implemented Spinning Wheel Kick
This commit is contained in:
parent
f1e3f1dbb2
commit
82ff5665ee
2 changed files with 89 additions and 0 deletions
88
Mage.Sets/src/mage/cards/s/SpinningWheelKick.java
Normal file
88
Mage.Sets/src/mage/cards/s/SpinningWheelKick.java
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.targetadjustment.TargetAdjuster;
|
||||
import mage.target.targetpointer.SecondTargetPointer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SpinningWheelKick extends CardImpl {
|
||||
|
||||
public SpinningWheelKick(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{G}{G}");
|
||||
|
||||
// Target creature you control deals damage equal to its power to each of X target creatures and/or planeswalkers.
|
||||
this.getSpellAbility().addEffect(new SpinningWheelKickEffect());
|
||||
this.getSpellAbility().setTargetAdjuster(SpinningWheelKickAdjuster.instance);
|
||||
}
|
||||
|
||||
private SpinningWheelKick(final SpinningWheelKick card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpinningWheelKick copy() {
|
||||
return new SpinningWheelKick(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum SpinningWheelKickAdjuster implements TargetAdjuster {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public void adjustTargets(Ability ability, Game game) {
|
||||
ability.getTargets().clear();
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
ability.addTarget(new TargetPermanent(
|
||||
ability.getManaCostsToPay().getX(),
|
||||
StaticFilters.FILTER_PERMANENT_CREATURE_OR_PLANESWALKER
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
class SpinningWheelKickEffect extends OneShotEffect {
|
||||
|
||||
SpinningWheelKickEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "target creature you control deals damage equal " +
|
||||
"to its power to each of X target creatures and/or planeswalkers";
|
||||
this.setTargetPointer(new SecondTargetPointer());
|
||||
}
|
||||
|
||||
private SpinningWheelKickEffect(final SpinningWheelKickEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpinningWheelKickEffect copy() {
|
||||
return new SpinningWheelKickEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent creature = game.getPermanent(source.getFirstTarget());
|
||||
if (creature == null) {
|
||||
return false;
|
||||
}
|
||||
for (UUID targetId : getTargetPointer().getTargets(game, source)) {
|
||||
Permanent permanent = game.getPermanent(targetId);
|
||||
if (permanent != null) {
|
||||
permanent.damage(creature.getPower().getValue(), creature.getId(), source, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -255,6 +255,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Sokenzan, Crucible of Defiance", 276, Rarity.RARE, mage.cards.s.SokenzanCrucibleOfDefiance.class));
|
||||
cards.add(new SetCardInfo("Soul Transfer", 122, Rarity.RARE, mage.cards.s.SoulTransfer.class));
|
||||
cards.add(new SetCardInfo("Spell Pierce", 80, Rarity.COMMON, mage.cards.s.SpellPierce.class));
|
||||
cards.add(new SetCardInfo("Spinning Wheel Kick", 207, Rarity.UNCOMMON, mage.cards.s.SpinningWheelKick.class));
|
||||
cards.add(new SetCardInfo("Spirit-Sister's Call", 237, Rarity.MYTHIC, mage.cards.s.SpiritSistersCall.class));
|
||||
cards.add(new SetCardInfo("Spirited Companion", 38, Rarity.COMMON, mage.cards.s.SpiritedCompanion.class));
|
||||
cards.add(new SetCardInfo("Spring-Leaf Avenger", 208, Rarity.RARE, mage.cards.s.SpringLeafAvenger.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue