forked from External/mage
add method Game.isActivePlayer(UUID playerId)
This commit is contained in:
parent
2b78716a1b
commit
ca1ebeb55e
16 changed files with 33 additions and 31 deletions
|
|
@ -2450,7 +2450,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
|
||||
@Override
|
||||
public boolean canPlaySorcery(UUID playerId) {
|
||||
return isMainPhase() && getActivePlayerId().equals(playerId) && getStack().isEmpty();
|
||||
return isMainPhase() && isActivePlayer(playerId) && getStack().isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2594,7 +2594,7 @@ public abstract class GameImpl implements Game, Serializable {
|
|||
// If the current monarch leaves the game. When that happens, the player whose turn it is becomes the monarch.
|
||||
// If the monarch leaves the game on their turn, the next player in turn order becomes the monarch.
|
||||
if (playerId.equals(getMonarchId())) {
|
||||
if (!getActivePlayerId().equals(playerId)) {
|
||||
if (!isActivePlayer(playerId)) {
|
||||
setMonarchId(null, getActivePlayerId());
|
||||
} else {
|
||||
Player nextPlayer = getPlayerList().getNext(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue