* Agyrem Plane - Fixed that the effect was not applied to creatures of all players (fixes #6486).

This commit is contained in:
LevelX2 2020-06-24 22:20:55 +02:00
parent 0b00ae8b9d
commit e33505ff7d

View file

@ -16,7 +16,6 @@ import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetE
import mage.abilities.effects.common.RollPlanarDieEffect;
import mage.cards.Card;
import mage.constants.*;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.ColorPredicate;
import mage.game.Game;
@ -29,14 +28,15 @@ import mage.watchers.common.PlanarRollWatcher;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.filter.common.FilterCreaturePermanent;
/**
* @author spjspj
*/
public class AgyremPlane extends Plane {
private static final FilterControlledCreaturePermanent filterWhite = new FilterControlledCreaturePermanent("a white creature");
private static final FilterControlledCreaturePermanent filterNonWhite = new FilterControlledCreaturePermanent("a nonwhite creature");
private static final FilterCreaturePermanent filterWhite = new FilterCreaturePermanent("a white creature");
private static final FilterCreaturePermanent filterNonWhite = new FilterCreaturePermanent("a nonwhite creature");
static {
filterWhite.add(new ColorPredicate(ObjectColor.WHITE));
@ -50,6 +50,7 @@ public class AgyremPlane extends Plane {
// Whenever a white creature dies, return it to the battlefield under its owner's control at the beginning of the next end step
DiesCreatureTriggeredAbility ability = new DiesCreatureTriggeredAbility(Zone.COMMAND, new AgyremEffect(), false, filterWhite, true);
this.getAbilities().add(ability);
// Whenever a nonwhite creature dies, return it to its owner's hand at the beginning of the next end step.
DiesCreatureTriggeredAbility ability2 = new DiesCreatureTriggeredAbility(Zone.COMMAND, new AgyremEffect2(), false, filterNonWhite, true);
this.getAbilities().add(ability2);
@ -57,9 +58,9 @@ public class AgyremPlane extends Plane {
Effect chaosEffect = new AgyremRestrictionEffect();
Target chaosTarget = null;
List<Effect> chaosEffects = new ArrayList<Effect>();
List<Effect> chaosEffects = new ArrayList<>();
chaosEffects.add(chaosEffect);
List<Target> chaosTargets = new ArrayList<Target>();
List<Target> chaosTargets = new ArrayList<>();
chaosTargets.add(chaosTarget);
ActivateIfConditionActivatedAbility chaosAbility = new ActivateIfConditionActivatedAbility(Zone.COMMAND, new RollPlanarDieEffect(chaosEffects, chaosTargets), new GenericManaCost(0), MainPhaseStackEmptyCondition.instance);