mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08: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
|
|
@ -37,6 +37,11 @@ public class ConditionalTriggeredAbility extends TriggeredAbilityImpl<Conditiona
|
||||||
this.text = triggered.text;
|
this.text = triggered.text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkInterveningIfClause(Game game) {
|
||||||
|
return condition.apply(game, this);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ConditionalTriggeredAbility copy() {
|
public ConditionalTriggeredAbility copy() {
|
||||||
return new ConditionalTriggeredAbility(this);
|
return new ConditionalTriggeredAbility(this);
|
||||||
|
|
@ -47,9 +52,9 @@ public class ConditionalTriggeredAbility extends TriggeredAbilityImpl<Conditiona
|
||||||
ability.setSourceId(this.getSourceId());
|
ability.setSourceId(this.getSourceId());
|
||||||
ability.setControllerId(this.getControllerId());
|
ability.setControllerId(this.getControllerId());
|
||||||
if (ability.checkTrigger(event, game)) {
|
if (ability.checkTrigger(event, game)) {
|
||||||
if (condition.apply(game, this)) {
|
// if (condition.apply(game, this)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue