File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -793,6 +793,17 @@ export class GameImpl implements Game {
793793 }
794794
795795 public isNationSpawnImmunityActive ( ) : boolean {
796+ if ( this . config ( ) . gameConfig ( ) . gameType === GameType . Singleplayer ) {
797+ this . updateSingleplayerStartTick ( ) ;
798+ if ( this . inSpawnPhase ( ) ) {
799+ return true ;
800+ }
801+ const startTick = this . singleplayerStartTick ?? this . ticks ( ) ;
802+ return (
803+ startTick + this . config ( ) . nationSpawnImmunityDuration ( ) > this . ticks ( )
804+ ) ;
805+ }
806+
796807 return (
797808 this . config ( ) . numSpawnPhaseTurns ( ) +
798809 this . config ( ) . nationSpawnImmunityDuration ( ) >
Original file line number Diff line number Diff line change @@ -859,6 +859,17 @@ export class GameView implements GameMap {
859859 ) ;
860860 }
861861 isNationSpawnImmunityActive ( ) : boolean {
862+ if ( this . _config . gameConfig ( ) . gameType === GameType . Singleplayer ) {
863+ this . updateSingleplayerStartTick ( ) ;
864+ if ( this . inSpawnPhase ( ) ) {
865+ return true ;
866+ }
867+ const startTick = this . singleplayerStartTick ?? this . ticks ( ) ;
868+ return (
869+ startTick + this . _config . nationSpawnImmunityDuration ( ) > this . ticks ( )
870+ ) ;
871+ }
872+
862873 return (
863874 this . _config . numSpawnPhaseTurns ( ) +
864875 this . _config . nationSpawnImmunityDuration ( ) >
You can’t perform that action at this time.
0 commit comments