mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 06:22:01 -08:00
If match timer is used, the AI consumes now also time for their priority action. Some minor changes to Gamemanager.
This commit is contained in:
parent
e8a72466d6
commit
cb6cc62ed4
5 changed files with 98 additions and 58 deletions
|
|
@ -728,7 +728,14 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
|
||||
@Override
|
||||
public boolean priority(Game game) {
|
||||
game.resumeTimer(playerId);
|
||||
log.debug("priority");
|
||||
boolean result = priorityPlay(game);
|
||||
game.pauseTimer(playerId);
|
||||
return result;
|
||||
}
|
||||
|
||||
private boolean priorityPlay(Game game) {
|
||||
UUID opponentId = game.getOpponents(playerId).iterator().next();
|
||||
if (game.getActivePlayerId().equals(playerId)) {
|
||||
if (game.isMainPhase() && game.getStack().isEmpty()) {
|
||||
|
|
@ -815,11 +822,10 @@ public class ComputerPlayer extends PlayerImpl implements Player {
|
|||
break;
|
||||
}
|
||||
}
|
||||
pass(game);
|
||||
pass(game);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean activateAbility(ActivatedAbility ability, Game game) {
|
||||
for (Target target: ability.getModes().getMode().getTargets()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue