mirror of
https://github.com/correl/mage.git
synced 2024-12-27 03:00:13 +00:00
[DMU] Implemented Tail Swipe
This commit is contained in:
parent
5b1c1b1c56
commit
decdec543f
2 changed files with 88 additions and 0 deletions
87
Mage.Sets/src/mage/cards/t/TailSwipe.java
Normal file
87
Mage.Sets/src/mage/cards/t/TailSwipe.java
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
package mage.cards.t;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.condition.common.AddendumCondition;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||||
|
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.Targets;
|
||||||
|
import mage.target.common.TargetControlledCreaturePermanent;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author weirddan455
|
||||||
|
*/
|
||||||
|
public final class TailSwipe extends CardImpl {
|
||||||
|
|
||||||
|
public TailSwipe(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}");
|
||||||
|
|
||||||
|
// Choose target creature you control and target creature you don't control.
|
||||||
|
// If you cast this spell during your main phase, the creature you control gets +1/+1 until end of turn.
|
||||||
|
// Then those creatures fight each other.
|
||||||
|
this.getSpellAbility().addEffect(new TailSwipeEffect());
|
||||||
|
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
|
||||||
|
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
|
||||||
|
}
|
||||||
|
|
||||||
|
private TailSwipe(final TailSwipe card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TailSwipe copy() {
|
||||||
|
return new TailSwipe(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class TailSwipeEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
public TailSwipeEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
this.staticText = "Choose target creature you control and target creature you don't control. " +
|
||||||
|
"If you cast this spell during your main phase, the creature you control gets +1/+1 until end of turn. " +
|
||||||
|
"Then those creatures fight each other. " +
|
||||||
|
"<i>(Each deals damage equal to its power to the other.)</i>";
|
||||||
|
}
|
||||||
|
|
||||||
|
private TailSwipeEffect(final TailSwipeEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TailSwipeEffect copy() {
|
||||||
|
return new TailSwipeEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Targets targets = source.getTargets();
|
||||||
|
if (targets.size() < 2) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Permanent creature1 = game.getPermanent(targets.get(0).getFirstTarget());
|
||||||
|
Permanent creature2 = game.getPermanent(targets.get(1).getFirstTarget());
|
||||||
|
if (creature1 == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (AddendumCondition.instance.apply(game, source)) {
|
||||||
|
game.addEffect(new BoostTargetEffect(1, 1)
|
||||||
|
.setTargetPointer(new FixedTarget(creature1, game)), source);
|
||||||
|
}
|
||||||
|
if (creature2 != null) {
|
||||||
|
creature1.fight(creature2, source, game);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
|
@ -135,6 +135,7 @@ public final class DominariaUnited extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Sulfurous Springs", 256, Rarity.RARE, mage.cards.s.SulfurousSprings.class));
|
cards.add(new SetCardInfo("Sulfurous Springs", 256, Rarity.RARE, mage.cards.s.SulfurousSprings.class));
|
||||||
cards.add(new SetCardInfo("Sunbathing Rootwalla", 181, Rarity.COMMON, mage.cards.s.SunbathingRootwalla.class));
|
cards.add(new SetCardInfo("Sunbathing Rootwalla", 181, Rarity.COMMON, mage.cards.s.SunbathingRootwalla.class));
|
||||||
cards.add(new SetCardInfo("Swamp", 268, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
cards.add(new SetCardInfo("Swamp", 268, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
|
||||||
|
cards.add(new SetCardInfo("Tail Swipe", 182, Rarity.UNCOMMON, mage.cards.t.TailSwipe.class));
|
||||||
cards.add(new SetCardInfo("Take Up the Shield", 35, Rarity.COMMON, mage.cards.t.TakeUpTheShield.class));
|
cards.add(new SetCardInfo("Take Up the Shield", 35, Rarity.COMMON, mage.cards.t.TakeUpTheShield.class));
|
||||||
cards.add(new SetCardInfo("Tattered Apparition", 111, Rarity.COMMON, mage.cards.t.TatteredApparition.class));
|
cards.add(new SetCardInfo("Tattered Apparition", 111, Rarity.COMMON, mage.cards.t.TatteredApparition.class));
|
||||||
cards.add(new SetCardInfo("Temporal Firestorm", 147, Rarity.RARE, mage.cards.t.TemporalFirestorm.class));
|
cards.add(new SetCardInfo("Temporal Firestorm", 147, Rarity.RARE, mage.cards.t.TemporalFirestorm.class));
|
||||||
|
|
Loading…
Reference in a new issue