mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
bugfix for concede on play/draw
This commit is contained in:
@@ -367,7 +367,8 @@ public enum FControl {
|
|||||||
for(Player p: pp)
|
for(Player p: pp)
|
||||||
p.concede();
|
p.concede();
|
||||||
|
|
||||||
boolean humanHasPriority = game.getPhaseHandler().getPriorityPlayer().getLobbyPlayer() == getLobby().getGuiPlayer();
|
Player priorityPlayer = game.getPhaseHandler().getPriorityPlayer();
|
||||||
|
boolean humanHasPriority = priorityPlayer == null || priorityPlayer.getLobbyPlayer() == getLobby().getGuiPlayer();
|
||||||
|
|
||||||
if ( hasHuman && humanHasPriority )
|
if ( hasHuman && humanHasPriority )
|
||||||
game.getAction().checkGameOverCondition();
|
game.getAction().checkGameOverCondition();
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class FControlGamePlayback extends IGameEventVisitor.Base<Void> {
|
|||||||
@Subscribe
|
@Subscribe
|
||||||
public void receiveGameEvent(final GameEvent ev) { ev.visit(this); }
|
public void receiveGameEvent(final GameEvent ev) { ev.visit(this); }
|
||||||
|
|
||||||
private int phasesDelay = 400;
|
private int phasesDelay = 200;
|
||||||
private int combatDelay = 400;
|
private int combatDelay = 400;
|
||||||
private int resolveDelay = 600;
|
private int resolveDelay = 600;
|
||||||
|
|
||||||
@@ -67,23 +67,6 @@ public class FControlGamePlayback extends IGameEventVisitor.Base<Void> {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see forge.game.event.IGameEventVisitor.Base#visit(forge.game.event.GameEventGameStarted)
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Void visit(GameEventGameStarted event) {
|
|
||||||
boolean hasHuman = false;
|
|
||||||
for(Player p : event.players) {
|
|
||||||
if ( p.getController().getLobbyPlayer() == fc.getLobby().getGuiPlayer() )
|
|
||||||
hasHuman = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// show input here to adjust speed if no human playing
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Void visit(GameEventLandPlayed event) {
|
public Void visit(GameEventLandPlayed event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user