ConditionalTriggeredAbility checks condition now as interveningIfClause.

This commit is contained in:
LevelX2 2013-06-11 17:22:06 +02:00
parent 8985d9b627
commit 21e88c1ce3

View file

@ -36,6 +36,11 @@ public class ConditionalTriggeredAbility extends TriggeredAbilityImpl<Conditiona
this.condition = triggered.condition;
this.text = triggered.text;
}
@Override
public boolean checkInterveningIfClause(Game game) {
return condition.apply(game, this);
}
@Override
public ConditionalTriggeredAbility copy() {
@ -47,9 +52,9 @@ public class ConditionalTriggeredAbility extends TriggeredAbilityImpl<Conditiona
ability.setSourceId(this.getSourceId());
ability.setControllerId(this.getControllerId());
if (ability.checkTrigger(event, game)) {
if (condition.apply(game, this)) {
// if (condition.apply(game, this)) {
return true;
}
// }
}
return false;
}