Temporary Invasion Plans workaround for AI

This commit is contained in:
Zzooouhh 2017-11-28 14:58:29 +01:00 committed by GitHub
parent 9d48046e43
commit ddaa39d160
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,9 +95,12 @@ class InvasionPlansEffect extends ContinuousRuleModifyingEffectImpl {
public boolean applies(GameEvent event, Ability source, Game game) { public boolean applies(GameEvent event, Ability source, Game game) {
Player blockController = game.getPlayer(game.getCombat().getAttackingPlayerId()); Player blockController = game.getPlayer(game.getCombat().getAttackingPlayerId());
if (blockController != null) { if (blockController != null) {
// temporary workaround for AI bugging out while choosing blockers
if (blockController.isHuman()) {
game.getCombat().selectBlockers(blockController, game); game.getCombat().selectBlockers(blockController, game);
return event.getPlayerId().equals(game.getCombat().getAttackingPlayerId()); return event.getPlayerId().equals(game.getCombat().getAttackingPlayerId());
} }
}
return false; return false;
} }
} }