forked from External/mage
Implemented Dire Tactics
This commit is contained in:
parent
1e4bede7f9
commit
45acd3a7fc
2 changed files with 76 additions and 0 deletions
75
Mage.Sets/src/mage/cards/d/DireTactics.java
Normal file
75
Mage.Sets/src/mage/cards/d/DireTactics.java
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
package mage.cards.d;
|
||||
|
||||
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.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DireTactics extends CardImpl {
|
||||
|
||||
public DireTactics(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}{B}");
|
||||
|
||||
// Exile target creature. If you don't control a Human, you lose life equal to that creature's toughness.
|
||||
this.getSpellAbility().addEffect(new DireTacticsEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
}
|
||||
|
||||
private DireTactics(final DireTactics card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DireTactics copy() {
|
||||
return new DireTactics(this);
|
||||
}
|
||||
}
|
||||
|
||||
class DireTacticsEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent(SubType.HUMAN, "");
|
||||
|
||||
DireTacticsEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Exile target creature. If you don't control a Human, " +
|
||||
"you lose life equal to that creature's toughness.";
|
||||
}
|
||||
|
||||
private DireTacticsEffect(final DireTacticsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DireTacticsEffect copy() {
|
||||
return new DireTacticsEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (permanent == null || player == null) {
|
||||
return false;
|
||||
}
|
||||
int toughness = permanent.getToughness().getValue();
|
||||
player.moveCards(permanent, Zone.EXILED, source, game);
|
||||
if (game.getBattlefield().countAll(filter, player.getId(), game) < 1) {
|
||||
player.loseLife(toughness, game, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -32,6 +32,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Chittering Harvester", 80, Rarity.UNCOMMON, mage.cards.c.ChitteringHarvester.class));
|
||||
cards.add(new SetCardInfo("Cloudpiercer", 112, Rarity.COMMON, mage.cards.c.Cloudpiercer.class));
|
||||
cards.add(new SetCardInfo("Colossification", 148, Rarity.RARE, mage.cards.c.Colossification.class));
|
||||
cards.add(new SetCardInfo("Dire Tactics", 183, Rarity.UNCOMMON, mage.cards.d.DireTactics.class));
|
||||
cards.add(new SetCardInfo("Dirge Bat", 84, Rarity.RARE, mage.cards.d.DirgeBat.class));
|
||||
cards.add(new SetCardInfo("Dreamtail Heron", 47, Rarity.COMMON, mage.cards.d.DreamtailHeron.class));
|
||||
cards.add(new SetCardInfo("Essence Scatter", 49, Rarity.COMMON, mage.cards.e.EssenceScatter.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue