bugfix for concede on play/draw

This commit is contained in:
Maxmtg
2013-05-30 12:28:00 +00:00
parent 4052f179d4
commit e210260aa0
2 changed files with 3 additions and 19 deletions

View File

@@ -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();

View File

@@ -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) {