- Fixed skipping human priority when an ability played by the AI triggers a trigger controlled by the AI.

This commit is contained in:
Sloth
2013-06-10 20:57:32 +00:00
parent 0e7d21b0d3
commit 12a1d9db2d
2 changed files with 2 additions and 3 deletions

View File

@@ -850,7 +850,6 @@ public class PhaseHandler implements java.io.Serializable {
System.out.print(" >>\n"); System.out.print(" >>\n");
} }
// actingPlayer is the player who may act // actingPlayer is the player who may act
// the firstAction is the player who gained Priority First in this segment // the firstAction is the player who gained Priority First in this segment
// of Priority // of Priority
@@ -859,7 +858,7 @@ public class PhaseHandler implements java.io.Serializable {
if ( game.isGameOver() || nextPlayer == null ) return; // conceded? if ( game.isGameOver() || nextPlayer == null ) return; // conceded?
// System.out.println(String.format("%s %s: %s passes priority to %s", playerTurn, phase, actingPlayer, nextPlayer)); // System.out.println(String.format("%s %s: %s passes priority to %s", playerTurn, phase, actingPlayer, nextPlayer));
if (this.getFirstPriority().equals(nextPlayer)) { if (getFirstPriority() == nextPlayer) {
if (game.getStack().isEmpty()) { if (game.getStack().isEmpty()) {
this.setPriority(this.getPlayerTurn()); // this needs to be set early as we exit the phase this.setPriority(this.getPlayerTurn()); // this needs to be set early as we exit the phase

View File

@@ -472,7 +472,7 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
// 2012-07-21 the following comparison needs to move below the pushes but somehow screws up priority // 2012-07-21 the following comparison needs to move below the pushes but somehow screws up priority
// When it's down there. That makes absolutely no sense to me, so i'm putting it back for now // When it's down there. That makes absolutely no sense to me, so i'm putting it back for now
if (!((sp instanceof AbilityTriggered) || (sp instanceof AbilityStatic))) { if (!(sp.isTrigger() || (sp instanceof AbilityStatic))) {
// when something is added we need to setPriority // when something is added we need to setPriority
game.getPhaseHandler().setPriority(sp.getActivatingPlayer()); game.getPhaseHandler().setPriority(sp.getActivatingPlayer());
} }