Some fireEvent changes

This commit is contained in:
L_J 2018-02-17 13:59:15 +00:00 committed by GitHub
parent c0866c9ad7
commit 1cb703fbdf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -180,6 +180,12 @@ class FalseOrdersUnblockEffect extends OneShotEffect {
game.getCombat().addBlockingGroup(permanent.getId(), chosenPermanent.getId(), controller.getId(), game); // 702.21h
if (notYetBlocked) {
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CREATURE_BLOCKED, chosenPermanent.getId(), null));
for (UUID bandedId : chosenPermanent.getBandedCards()) {
CombatGroup bandedGroup = game.getCombat().findGroup(bandedId);
if (bandedGroup != null && chosenGroup.getBlockers().size() == 1) {
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.CREATURE_BLOCKED, bandedId, null));
}
}
}
game.fireEvent(GameEvent.getEvent(GameEvent.EventType.BLOCKER_DECLARED, chosenPermanent.getId(), permanent.getId(), permanent.getControllerId()));
}