mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
updated more "that player or that planeswalker's controller" cards
This commit is contained in:
parent
1e27d7222a
commit
6bc735c297
8 changed files with 52 additions and 39 deletions
|
@ -47,6 +47,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
import mage.game.Game;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -55,7 +56,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public class ChandraNalaar extends CardImpl {
|
||||
|
||||
public ChandraNalaar(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{3}{R}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{3}{R}{R}");
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.CHANDRA);
|
||||
|
||||
|
@ -74,9 +75,11 @@ public class ChandraNalaar extends CardImpl {
|
|||
// -8: Chandra Nalaar deals 10 damage to target player and each creature he or she controls.
|
||||
Effects effects1 = new Effects();
|
||||
effects1.add(new DamageTargetEffect(10));
|
||||
effects1.add(new DamageAllControlledTargetEffect(10, new FilterCreaturePermanent()));
|
||||
effects1.add(new DamageAllControlledTargetEffect(10, new FilterCreaturePermanent())
|
||||
.setText("and each creature that player or that planeswalker’s controller controls")
|
||||
);
|
||||
LoyaltyAbility ability3 = new LoyaltyAbility(effects1, -8);
|
||||
ability3.addTarget(new TargetPlayer());
|
||||
ability3.addTarget(new TargetPlayerOrPlaneswalker());
|
||||
this.addAbility(ability3);
|
||||
}
|
||||
|
||||
|
|
|
@ -43,8 +43,8 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SuperType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -53,7 +53,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public class ChandraPyrogenius extends CardImpl {
|
||||
|
||||
public ChandraPyrogenius(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{4}{R}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{R}{R}");
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.CHANDRA);
|
||||
|
||||
|
@ -70,9 +70,11 @@ public class ChandraPyrogenius extends CardImpl {
|
|||
// -10: Chandra, Pyrogenius deals 6 damage to target player and each creature he or she controls.
|
||||
Effects effects = new Effects();
|
||||
effects.add(new DamageTargetEffect(6));
|
||||
effects.add(new DamageAllControlledTargetEffect(6, new FilterCreaturePermanent()));
|
||||
effects.add(new DamageAllControlledTargetEffect(6, new FilterCreaturePermanent())
|
||||
.setText("and each creature that player or that planeswalker’s controller controls")
|
||||
);
|
||||
ability = new LoyaltyAbility(effects, -10);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
ability.addTarget(new TargetPlayerOrPlaneswalker());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -43,13 +43,14 @@ import mage.target.TargetPlayer;
|
|||
public class ChandrasFury extends CardImpl {
|
||||
|
||||
public ChandrasFury(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{R}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{R}");
|
||||
|
||||
// Chandra's Fury deals 4 damage to target player and 1 damage to each creature that player controls.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
|
||||
this.getSpellAbility().addEffect(new DamageAllControlledTargetEffect(1, new FilterCreaturePermanent()));
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.getSpellAbility().addEffect(new DamageAllControlledTargetEffect(1, new FilterCreaturePermanent())
|
||||
.setText("and each creature that player or that planeswalker’s controller controls")
|
||||
);
|
||||
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
|
||||
}
|
||||
|
||||
public ChandrasFury(final ChandrasFury card) {
|
||||
|
|
|
@ -34,7 +34,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -43,12 +43,14 @@ import mage.target.TargetPlayer;
|
|||
public class FlameWave extends CardImpl {
|
||||
|
||||
public FlameWave(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}{R}{R}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}{R}{R}{R}");
|
||||
|
||||
// Flame Wave deals 4 damage to target player and each creature he or she controls.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.getSpellAbility().addEffect(new DamageAllControlledTargetEffect(4, new FilterCreaturePermanent()));
|
||||
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
|
||||
this.getSpellAbility().addEffect(new DamageAllControlledTargetEffect(4, new FilterCreaturePermanent())
|
||||
.setText("and each creature that player or that planeswalker’s controller controls")
|
||||
);
|
||||
}
|
||||
|
||||
public FlameWave(final FlameWave card) {
|
||||
|
@ -59,4 +61,4 @@ public class FlameWave extends CardImpl {
|
|||
public FlameWave copy() {
|
||||
return new FlameWave(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ import mage.filter.predicate.permanent.ControllerIdPredicate;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -52,16 +52,12 @@ import mage.target.TargetPlayer;
|
|||
public class Lavalanche extends CardImpl {
|
||||
|
||||
public Lavalanche(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{X}{B}{R}{G}");
|
||||
|
||||
|
||||
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{B}{R}{G}");
|
||||
|
||||
// Lavalanche deals X damage to target player and each creature he or she controls.
|
||||
this.getSpellAbility().addEffect(new LavalancheEffect(new ManacostVariableValue()));
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
|
||||
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
|
||||
|
||||
}
|
||||
|
||||
public Lavalanche(final Lavalanche card) {
|
||||
|
@ -81,7 +77,7 @@ class LavalancheEffect extends OneShotEffect {
|
|||
public LavalancheEffect(DynamicValue amount) {
|
||||
super(Outcome.Damage);
|
||||
this.amount = amount;
|
||||
staticText = "Lavalanche deals X damage to target player and each creature he or she controls";
|
||||
staticText = "{this} deals X damage to target player or planeswalker and each creature that player or that planeswalker’s controller controls";
|
||||
}
|
||||
|
||||
public LavalancheEffect(final LavalancheEffect effect) {
|
||||
|
@ -96,16 +92,16 @@ class LavalancheEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
||||
Player targetPlayer = game.getPlayerOrPlaneswalkerController(source.getFirstTarget());
|
||||
if (targetPlayer == null) {
|
||||
return false;
|
||||
}
|
||||
targetPlayer.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, true);
|
||||
FilterPermanent filter = new FilterPermanent("and each creature he or she controls");
|
||||
FilterPermanent filter = new FilterPermanent("and each creature that player or that planeswalker’s controller controls");
|
||||
filter.add(new CardTypePredicate(CardType.CREATURE));
|
||||
filter.add(new ControllerIdPredicate(targetPlayer.getId()));
|
||||
List<Permanent> permanents = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game);
|
||||
for (Permanent permanent: permanents) {
|
||||
for (Permanent permanent : permanents) {
|
||||
permanent.damage(amount.calculate(game, source, this), source.getSourceId(), game, false, true);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -45,8 +45,8 @@ import mage.filter.FilterPermanent;
|
|||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -61,7 +61,7 @@ public class NicolBolasPlaneswalker extends CardImpl {
|
|||
}
|
||||
|
||||
public NicolBolasPlaneswalker(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.PLANESWALKER},"{4}{U}{B}{B}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{4}{U}{B}{B}{R}");
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.BOLAS);
|
||||
|
||||
|
@ -77,9 +77,13 @@ public class NicolBolasPlaneswalker extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
// -9: Nicol Bolas, Planeswalker deals 7 damage to target player. That player discards seven cards, then sacrifices seven permanents.
|
||||
ability = new LoyaltyAbility(new DamageTargetEffect(7), -9);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
ability.addEffect(new DiscardTargetEffect(7));
|
||||
ability.addEffect(new SacrificeEffect(new FilterPermanent(), 7, "then"));
|
||||
ability.addTarget(new TargetPlayerOrPlaneswalker());
|
||||
ability.addEffect(new DiscardTargetEffect(7)
|
||||
.setText("That player or that planeswalker’s controller discards seven cards")
|
||||
);
|
||||
ability.addEffect(new SacrificeEffect(new FilterPermanent(), 7, "then")
|
||||
.setText("then sacrifices seven permanents")
|
||||
);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -48,11 +48,11 @@ import mage.target.TargetPlayer;
|
|||
public class PulseOfTheForge extends CardImpl {
|
||||
|
||||
public PulseOfTheForge(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}{R}");
|
||||
|
||||
// Pulse of the Forge deals 4 damage to target player. Then if that player has more life than you, return Pulse of the Forge to its owner's hand.
|
||||
this.getSpellAbility().addEffect(new DamageTargetEffect(4));
|
||||
this.getSpellAbility().addTarget(new TargetPlayer());
|
||||
this.getSpellAbility().addTarget(new TargetPlayerOrPlaneswalker());
|
||||
this.getSpellAbility().addEffect(new PulseOfTheForgeReturnToHandEffect());
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ class PulseOfTheForgeReturnToHandEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Player controller = game.getPlayerOrPlaneswalkerController(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
if (player != null && player.getLife() > controller.getLife()) {
|
||||
|
|
|
@ -33,6 +33,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -63,7 +64,11 @@ public class DamageAllControlledTargetEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, source.getFirstTarget(), game)) {
|
||||
Player player = game.getPlayerOrPlaneswalkerController(source.getFirstTarget());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, player.getId(), game)) {
|
||||
permanent.damage(amount, source.getSourceId(), game, false, true);
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue