mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 10:53:31 +00:00
starting troops modifer
This commit is contained in:
@@ -120,6 +120,7 @@ export class StoreModal extends BaseModal {
|
||||
disableNations: true,
|
||||
infiniteGold: true,
|
||||
infiniteTroops: true,
|
||||
startingTroops: 10_000_000,
|
||||
percentageTilesOwnedToWin: 99,
|
||||
disabledUnits: [
|
||||
UnitType.City,
|
||||
|
||||
@@ -264,6 +264,7 @@ export const GameConfigSchema = z.object({
|
||||
playerTeams: TeamCountConfigSchema.optional(),
|
||||
goldMultiplier: z.number().min(0.1).max(1000).nullable().optional(),
|
||||
startingGold: z.number().int().min(0).max(1000000000).nullable().optional(),
|
||||
startingTroops: z.number().int().min(0).max(1000000000).nullable().optional(),
|
||||
hostCheats: z
|
||||
.object({
|
||||
infiniteGold: z.boolean().optional(),
|
||||
|
||||
@@ -748,6 +748,12 @@ export class Config {
|
||||
assertNever(this._gameConfig.difficulty);
|
||||
}
|
||||
}
|
||||
if (
|
||||
this._gameConfig.startingTroops !== undefined &&
|
||||
this._gameConfig.startingTroops !== null
|
||||
) {
|
||||
return this._gameConfig.startingTroops;
|
||||
}
|
||||
return this.hasInfiniteTroopsForInfo(playerInfo) ? 1_000_000 : 25_000;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user