diff --git gamemaster/game.php gamemaster/game.php index d9c017e..1df33f6 100755 --- gamemaster/game.php +++ gamemaster/game.php @@ -506,50 +506,57 @@ class processGame extends Game if( $this->phase != 'Finished' ) $this->Members->notifyGameProgressed(); /* * The minimum-bet-to-join may have changed, based on supply-centers or people who have * newly Left or been Defeated, recalculate the minimum bet here. */ $this->resetMinimumBet(); /* + * The timescale for non-Diplomacy phases is half that of + * Diplomacy phases (which are of normal duration) + */ + $timescale = 1.0; + /* * We are moving on to the next phase; create new orders, and set players who * have new orders to no longer be ready */ switch($this->phase) { case 'Diplomacy': $PO = $this->Variant->processOrderDiplomacy(); $PO->create(); break; case 'Retreats': $PO = $this->Variant->processOrderRetreats(); $PO->create(); + $timescale = 0.5; break; case 'Builds': $PO = $this->Variant->processOrderBuilds(); $PO->create(); + $timescale = 0.5; break; } /* * The missed phase counter goes up for all players that need to log on in this phase, * (all players which have orders to enter) and they need to log on to bring it down. */ $DB->sql_put("UPDATE wD_Members m LEFT JOIN wD_Orders o ON ( o.gameID = m.gameID AND o.countryID = m.countryID ) SET m.orderStatus=IF(o.id IS NULL, 'None',''), missedPhases=IF(m.status='Playing' AND NOT o.id IS NULL, missedPhases + 1, missedPhases) WHERE m.gameID = ".$this->id); - $this->processTime = time() + $this->phaseMinutes*60; + $this->processTime = time() + $this->phaseMinutes*60*$timescale; $DB->sql_put("UPDATE wD_Games SET processTime = ".$this->processTime." WHERE id = ".$this->id); } } /** * Adjudicate; taking entered orders, converting them to moves, processing the moves, * applying the results of the rules. */ function adjudicate()