* Glimmervoid - Fixed that the condition was not implemented as an “Intervening If” clause.

This commit is contained in:
LevelX2 2016-06-19 16:39:22 +02:00
parent 4022a47a0d
commit ef9ab0769d

View file

@ -68,6 +68,8 @@ public class Glimmervoid extends CardImpl {
class GlimmervoidTriggeredAbility extends TriggeredAbilityImpl {
static final FilterArtifactPermanent filter = new FilterArtifactPermanent();
GlimmervoidTriggeredAbility() {
super(Zone.BATTLEFIELD, new SacrificeSourceEffect());
}
@ -81,6 +83,11 @@ class GlimmervoidTriggeredAbility extends TriggeredAbilityImpl {
return new GlimmervoidTriggeredAbility(this);
}
@java.lang.Override
public boolean checkInterveningIfClause(Game game) {
return game.getBattlefield().countAll(filter, controllerId, game) == 0;
}
@java.lang.Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == EventType.END_TURN_STEP_PRE;
@ -88,11 +95,7 @@ class GlimmervoidTriggeredAbility extends TriggeredAbilityImpl {
@java.lang.Override
public boolean checkTrigger(GameEvent event, Game game) {
FilterArtifactPermanent filter = new FilterArtifactPermanent();
if (!game.getBattlefield().contains(filter, controllerId, 1, game)) {
return true;
}
return false;
return true;
}
@java.lang.Override