mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
Players cannot play lands they don't own (useful for hotseat mode)
This commit is contained in:
@@ -1824,6 +1824,9 @@ public class Player extends GameEntity implements Comparable<Player> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( land.getOwner() != this )
|
||||
return false;
|
||||
|
||||
// Dev Mode
|
||||
if (this.getLobbyPlayer().getType() == PlayerType.HUMAN && Preferences.DEV_MODE &&
|
||||
|
||||
@@ -67,7 +67,6 @@ public enum CDock implements ICDoc {
|
||||
private LobbyPlayer player;
|
||||
|
||||
public void setModel(GameState game0, LobbyPlayer player0) {
|
||||
|
||||
game = game0;
|
||||
player = player0;
|
||||
}
|
||||
@@ -75,7 +74,8 @@ public enum CDock implements ICDoc {
|
||||
private Player findAffectedPlayer() {
|
||||
// try current priority
|
||||
Player currentPriority = game.getPhaseHandler().getPriorityPlayer();
|
||||
if( currentPriority.getLobbyPlayer() == player ) return currentPriority;
|
||||
if( currentPriority.getLobbyPlayer() == player )
|
||||
return currentPriority;
|
||||
|
||||
// otherwise find just any player, belonging to this lobbyplayer
|
||||
for(Player p : game.getPlayers())
|
||||
|
||||
Reference in New Issue
Block a user