mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
ConditionalTriggeredAbility checks condition now as interveningIfClause.
This commit is contained in:
parent
8985d9b627
commit
21e88c1ce3
1 changed files with 7 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue