mirror of
https://github.com/magefree/mage.git
synced 2025-12-29 06:52:02 -08:00
modifications
This commit is contained in:
parent
c8e41bc002
commit
bf5e55aef9
1 changed files with 17 additions and 7 deletions
|
|
@ -29,12 +29,14 @@ package mage.cards.p;
|
|||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.costs.common.PayLifeCost;
|
||||
import mage.abilities.effects.common.DestroyMultiTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -43,12 +45,10 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public class PhyrexianPurge extends CardImpl {
|
||||
|
||||
public int maxTargets = 0;
|
||||
|
||||
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.
|
||||
// Phyrexian Purge costs 3 life more to cast for each target.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, Integer.MAX_VALUE));
|
||||
|
|
@ -61,8 +61,18 @@ public class PhyrexianPurge extends CardImpl {
|
|||
if (numTargets > 0) {
|
||||
ability.getCosts().add(new PayLifeCost(numTargets * 3));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustTargets(Ability ability, Game game) {
|
||||
if (ability instanceof SpellAbility) {
|
||||
ability.getTargets().clear();
|
||||
Player you = game.getPlayer(ownerId);
|
||||
int maxTargets = you.getLife() / 3;
|
||||
ability.addTarget(new TargetCreaturePermanent(0, maxTargets));
|
||||
}
|
||||
}
|
||||
|
||||
public PhyrexianPurge(final PhyrexianPurge card) {
|
||||
super(card);
|
||||
}
|
||||
|
|
@ -71,4 +81,4 @@ public class PhyrexianPurge extends CardImpl {
|
|||
public PhyrexianPurge copy() {
|
||||
return new PhyrexianPurge(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue