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;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
|
@ -23,8 +20,11 @@ import mage.players.Player;
|
|||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author themogwi
|
||||
*/
|
||||
public final class Plaguecrafter extends CardImpl {
|
||||
|
@ -43,7 +43,7 @@ public final class Plaguecrafter extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new PlaguecrafterEffect()));
|
||||
}
|
||||
|
||||
public Plaguecrafter(final Plaguecrafter card) {
|
||||
private Plaguecrafter(final Plaguecrafter card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
@ -55,13 +55,13 @@ public final class Plaguecrafter extends CardImpl {
|
|||
|
||||
class PlaguecrafterEffect extends OneShotEffect {
|
||||
|
||||
public PlaguecrafterEffect() {
|
||||
PlaguecrafterEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "each player sacrifices a creature or planeswalker. "
|
||||
+ "Each player who can't discards a card.";
|
||||
}
|
||||
|
||||
public PlaguecrafterEffect(final PlaguecrafterEffect effect) {
|
||||
private PlaguecrafterEffect(final PlaguecrafterEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
|
@ -82,11 +82,14 @@ class PlaguecrafterEffect extends OneShotEffect {
|
|||
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
if (player == null) {
|
||||
continue;
|
||||
}
|
||||
FilterControlledPermanent filter = new FilterControlledPermanent("creature or planeswalker");
|
||||
filter.add(Predicates.or(
|
||||
new CardTypePredicate(CardType.CREATURE),
|
||||
new CardTypePredicate(CardType.PLANESWALKER)));
|
||||
new CardTypePredicate(CardType.PLANESWALKER)
|
||||
));
|
||||
TargetControlledPermanent target = new TargetControlledPermanent(1, 1, filter, true);
|
||||
if (target.canChoose(player.getId(), game)) {
|
||||
while (!target.isChosen() && player.canRespond()) {
|
||||
|
@ -97,7 +100,6 @@ class PlaguecrafterEffect extends OneShotEffect {
|
|||
cantSac.add(playerId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (UUID permID : perms) {
|
||||
Permanent permanent = game.getPermanent(permID);
|
||||
|
|
Loading…
Reference in a new issue