mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +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,11 +82,14 @@ 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;
|
||||||
|
}
|
||||||
|
FilterControlledPermanent filter = new FilterControlledPermanent("creature or planeswalker");
|
||||||
filter.add(Predicates.or(
|
filter.add(Predicates.or(
|
||||||
new CardTypePredicate(CardType.CREATURE),
|
new CardTypePredicate(CardType.CREATURE),
|
||||||
new CardTypePredicate(CardType.PLANESWALKER)));
|
new CardTypePredicate(CardType.PLANESWALKER)
|
||||||
|
));
|
||||||
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, true);
|
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, true);
|
||||||
if (target.canChoose(player.getId(), game)) {
|
if (target.canChoose(player.getId(), game)) {
|
||||||
while (!target.isChosen() && player.canRespond()) {
|
while (!target.isChosen() && player.canRespond()) {
|
||||||
|
@ -97,7 +100,6 @@ class PlaguecrafterEffect extends OneShotEffect {
|
||||||
cantSac.add(playerId);
|
cantSac.add(playerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
for (UUID permID : perms) {
|
for (UUID permID : perms) {
|
||||||
Permanent permanent = game.getPermanent(permID);
|
Permanent permanent = game.getPermanent(permID);
|
||||||
|
|
Loading…
Reference in a new issue