mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
fixed Phyrexian Purge text
This commit is contained in:
parent
7292683604
commit
b2e4c2cc9d
1 changed files with 15 additions and 14 deletions
|
@ -32,6 +32,7 @@ import mage.abilities.Ability;
|
||||||
import mage.abilities.SpellAbility;
|
import mage.abilities.SpellAbility;
|
||||||
import mage.abilities.costs.common.PayLifeCost;
|
import mage.abilities.costs.common.PayLifeCost;
|
||||||
import mage.abilities.effects.common.DestroyMultiTargetEffect;
|
import mage.abilities.effects.common.DestroyMultiTargetEffect;
|
||||||
|
import mage.abilities.effects.common.InfoEffect;
|
||||||
import mage.cards.CardImpl;
|
import mage.cards.CardImpl;
|
||||||
import mage.cards.CardSetInfo;
|
import mage.cards.CardSetInfo;
|
||||||
import mage.constants.CardType;
|
import mage.constants.CardType;
|
||||||
|
@ -44,17 +45,17 @@ import mage.target.common.TargetCreaturePermanent;
|
||||||
* @author escplan9 - Derek Monturo
|
* @author escplan9 - Derek Monturo
|
||||||
*/
|
*/
|
||||||
public class PhyrexianPurge extends CardImpl {
|
public class PhyrexianPurge extends CardImpl {
|
||||||
|
|
||||||
public PhyrexianPurge(UUID ownerId, CardSetInfo setInfo) {
|
public PhyrexianPurge(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{R}");
|
||||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}{R}");
|
|
||||||
|
|
||||||
// Destroy any number of target creatures.
|
// Destroy any number of target creatures.
|
||||||
// Phyrexian Purge costs 3 life more to cast for each target.
|
// Phyrexian Purge costs 3 life more to cast for each target.
|
||||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE));
|
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE));
|
||||||
this.getSpellAbility().addEffect(new DestroyMultiTargetEffect());
|
this.getSpellAbility().addEffect(new DestroyMultiTargetEffect());
|
||||||
|
this.getSpellAbility().addEffect(new InfoEffect("<br><br>{this} costs 3 life more to cast for each target"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void adjustCosts(Ability ability, Game game) {
|
public void adjustCosts(Ability ability, Game game) {
|
||||||
int numTargets = ability.getTargets().get(0).getTargets().size();
|
int numTargets = ability.getTargets().get(0).getTargets().size();
|
||||||
|
@ -62,17 +63,17 @@ public class PhyrexianPurge extends CardImpl {
|
||||||
ability.getCosts().add(new PayLifeCost(numTargets * 3));
|
ability.getCosts().add(new PayLifeCost(numTargets * 3));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void adjustTargets(Ability ability, Game game) {
|
public void adjustTargets(Ability ability, Game game) {
|
||||||
if (ability instanceof SpellAbility) {
|
if (ability instanceof SpellAbility) {
|
||||||
ability.getTargets().clear();
|
ability.getTargets().clear();
|
||||||
Player you = game.getPlayer(ownerId);
|
Player you = game.getPlayer(ownerId);
|
||||||
int maxTargets = you.getLife() / 3;
|
int maxTargets = you.getLife() / 3;
|
||||||
ability.addTarget(new TargetCreaturePermanent(0, maxTargets));
|
ability.addTarget(new TargetCreaturePermanent(0, maxTargets));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public PhyrexianPurge(final PhyrexianPurge card) {
|
public PhyrexianPurge(final PhyrexianPurge card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
@ -81,4 +82,4 @@ public class PhyrexianPurge extends CardImpl {
|
||||||
public PhyrexianPurge copy() {
|
public PhyrexianPurge copy() {
|
||||||
return new PhyrexianPurge(this);
|
return new PhyrexianPurge(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue