mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 03:08:02 +00:00
- Fixed skipping human priority when an ability played by the AI triggers a trigger controlled by the AI.
This commit is contained in:
@@ -850,7 +850,6 @@ public class PhaseHandler implements java.io.Serializable {
|
||||
System.out.print(" >>\n");
|
||||
}
|
||||
|
||||
|
||||
// actingPlayer is the player who may act
|
||||
// the firstAction is the player who gained Priority First in this segment
|
||||
// of Priority
|
||||
@@ -859,7 +858,7 @@ public class PhaseHandler implements java.io.Serializable {
|
||||
if ( game.isGameOver() || nextPlayer == null ) return; // conceded?
|
||||
|
||||
// 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()) {
|
||||
this.setPriority(this.getPlayerTurn()); // this needs to be set early as we exit the phase
|
||||
|
||||
|
||||
@@ -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
|
||||
// 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
|
||||
game.getPhaseHandler().setPriority(sp.getActivatingPlayer());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user