forked from External/mage
Beginning of implementation of Planechase.
10 or so initial planes that (mostly) have been tested, no phenomenons as yet and no modifying yet of chaos rolls. Also no support for a user to be able to set if it is planechase (able to do so via the cheat button).
This commit is contained in:
parent
ecbe7e68a6
commit
e932c139d9
32 changed files with 2042 additions and 18 deletions
|
|
@ -44,6 +44,7 @@ import mage.game.combat.Combat;
|
|||
import mage.game.combat.CombatGroup;
|
||||
import mage.game.command.Command;
|
||||
import mage.game.command.CommandObject;
|
||||
import mage.game.command.Plane;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.game.events.ZoneChangeGroupEvent;
|
||||
|
|
@ -95,6 +96,8 @@ public class GameState implements Serializable, Copyable<GameState> {
|
|||
private UUID monarchId; // player that is the monarch
|
||||
private SpellStack stack;
|
||||
private Command command;
|
||||
private boolean isPlaneChase;
|
||||
private List<String> seenPlanes = new ArrayList<>();
|
||||
private List<Designation> designations = new ArrayList<>();
|
||||
private Exile exile;
|
||||
private Battlefield battlefield;
|
||||
|
|
@ -153,6 +156,8 @@ public class GameState implements Serializable, Copyable<GameState> {
|
|||
|
||||
this.stack = state.stack.copy();
|
||||
this.command = state.command.copy();
|
||||
this.isPlaneChase = state.isPlaneChase;
|
||||
this.seenPlanes.addAll(state.seenPlanes);
|
||||
this.designations.addAll(state.designations);
|
||||
this.exile = state.exile.copy();
|
||||
this.battlefield = state.battlefield.copy();
|
||||
|
|
@ -203,7 +208,9 @@ public class GameState implements Serializable, Copyable<GameState> {
|
|||
this.monarchId = state.monarchId;
|
||||
this.stack = state.stack;
|
||||
this.command = state.command;
|
||||
this.designations = state.designations;
|
||||
this.isPlaneChase = state.isPlaneChase;
|
||||
this.seenPlanes = state.seenPlanes;
|
||||
this.designations = state.designations;
|
||||
this.exile = state.exile;
|
||||
this.battlefield = state.battlefield;
|
||||
this.turnNum = state.turnNum;
|
||||
|
|
@ -450,6 +457,14 @@ public class GameState implements Serializable, Copyable<GameState> {
|
|||
return designations;
|
||||
}
|
||||
|
||||
public List<String> getSeenPlanes() {
|
||||
return seenPlanes;
|
||||
}
|
||||
|
||||
public boolean isPlaneChase() {
|
||||
return isPlaneChase;
|
||||
}
|
||||
|
||||
public Command getCommand() {
|
||||
return command;
|
||||
}
|
||||
|
|
@ -855,6 +870,20 @@ public class GameState implements Serializable, Copyable<GameState> {
|
|||
addAbility(ability, designation.getId(), null);
|
||||
}
|
||||
}
|
||||
|
||||
public void addSeenPlane(Plane plane, Game game, UUID controllerId) {
|
||||
if (plane != null) {
|
||||
getSeenPlanes().add(plane.getName());
|
||||
}
|
||||
}
|
||||
|
||||
public void resetSeenPlanes() {
|
||||
getSeenPlanes().clear();
|
||||
}
|
||||
|
||||
public void setPlaneChase(Game game, boolean isPlaneChase) {
|
||||
this.isPlaneChase = isPlaneChase;
|
||||
}
|
||||
|
||||
public void addCommandObject(CommandObject commandObject) {
|
||||
getCommand().add(commandObject);
|
||||
|
|
@ -1014,6 +1043,8 @@ public class GameState implements Serializable, Copyable<GameState> {
|
|||
exile.clear();
|
||||
command.clear();
|
||||
designations.clear();
|
||||
seenPlanes.clear();
|
||||
isPlaneChase = false;
|
||||
revealed.clear();
|
||||
lookedAt.clear();
|
||||
turnNum = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue