mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
fixed Plaguecrafter sacrifice text
This commit is contained in:
parent
21d7bef21f
commit
8ea074b4a3
1 changed files with 22 additions and 20 deletions
|
@ -1,8 +1,5 @@
|
||||||
package mage.cards.p;
|
package mage.cards.p;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.UUID;
|
|
||||||
import mage.MageInt;
|
import mage.MageInt;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
@ -23,8 +20,11 @@ import mage.players.Player;
|
||||||
import mage.target.common.TargetControlledPermanent;
|
import mage.target.common.TargetControlledPermanent;
|
||||||
import mage.target.targetpointer.FixedTarget;
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author themogwi
|
* @author themogwi
|
||||||
*/
|
*/
|
||||||
public final class Plaguecrafter extends CardImpl {
|
public final class Plaguecrafter extends CardImpl {
|
||||||
|
@ -43,7 +43,7 @@ public final class Plaguecrafter extends CardImpl {
|
||||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new PlaguecrafterEffect()));
|
this.addAbility(new EntersBattlefieldTriggeredAbility(new PlaguecrafterEffect()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Plaguecrafter(final Plaguecrafter card) {
|
private Plaguecrafter(final Plaguecrafter card) {
|
||||||
super(card);
|
super(card);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,13 +55,13 @@ public final class Plaguecrafter extends CardImpl {
|
||||||
|
|
||||||
class PlaguecrafterEffect extends OneShotEffect {
|
class PlaguecrafterEffect extends OneShotEffect {
|
||||||
|
|
||||||
public PlaguecrafterEffect() {
|
PlaguecrafterEffect() {
|
||||||
super(Outcome.Benefit);
|
super(Outcome.Benefit);
|
||||||
this.staticText = "each player sacrifices a creature or planeswalker. "
|
this.staticText = "each player sacrifices a creature or planeswalker. "
|
||||||
+ "Each player who can't discards a card.";
|
+ "Each player who can't discards a card.";
|
||||||
}
|
}
|
||||||
|
|
||||||
public PlaguecrafterEffect(final PlaguecrafterEffect effect) {
|
private PlaguecrafterEffect(final PlaguecrafterEffect effect) {
|
||||||
super(effect);
|
super(effect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,20 +82,22 @@ class PlaguecrafterEffect extends OneShotEffect {
|
||||||
|
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null) {
|
if (player == null) {
|
||||||
FilterControlledPermanent filter = new FilterControlledPermanent();
|
continue;
|
||||||
filter.add(Predicates.or(
|
}
|
||||||
new CardTypePredicate(CardType.CREATURE),
|
FilterControlledPermanent filter = new FilterControlledPermanent("creature or planeswalker");
|
||||||
new CardTypePredicate(CardType.PLANESWALKER)));
|
filter.add(Predicates.or(
|
||||||
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, true);
|
new CardTypePredicate(CardType.CREATURE),
|
||||||
if (target.canChoose(player.getId(), game)) {
|
new CardTypePredicate(CardType.PLANESWALKER)
|
||||||
while (!target.isChosen() && player.canRespond()) {
|
));
|
||||||
player.choose(Outcome.Sacrifice, target, source.getSourceId(), game);
|
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, true);
|
||||||
}
|
if (target.canChoose(player.getId(), game)) {
|
||||||
perms.addAll(target.getTargets());
|
while (!target.isChosen() && player.canRespond()) {
|
||||||
} else {
|
player.choose(Outcome.Sacrifice, target, source.getSourceId(), game);
|
||||||
cantSac.add(playerId);
|
|
||||||
}
|
}
|
||||||
|
perms.addAll(target.getTargets());
|
||||||
|
} else {
|
||||||
|
cantSac.add(playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue