[LCI] Implement The Millennium Calendar (#11359)

new UNTAPPED_BATCH event.
This commit is contained in:
Susucre 2023-10-29 12:43:24 +01:00 committed by GitHub
parent 9ff307cefa
commit 0c485ec593
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 319 additions and 6 deletions

View file

@ -545,7 +545,14 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
//20091005 - 701.15b
if (tapped && !replaceEvent(EventType.UNTAP, game)) {
this.tapped = false;
fireEvent(EventType.UNTAPPED, game);
UntappedEvent event = new UntappedEvent(
objectId, this.controllerId,
// Since triggers are not checked until the next step,
// we use the event flag to know if untapping was done during the untap step
game.getTurnStepType() == PhaseStep.UNTAP
);
game.fireEvent(event);
game.getState().addSimultaneousUntapped(event, game);
return true;
}
return false;