diff --git a/hwe/ts/utilGame/index.ts b/hwe/ts/utilGame/index.ts index d3b26892..cf9046a0 100644 --- a/hwe/ts/utilGame/index.ts +++ b/hwe/ts/utilGame/index.ts @@ -13,4 +13,5 @@ export { getNPCColor } from "./getNPCColor"; export { isValidObjKey } from "./isValidObjKey"; export { nextExpLevelRemain } from "./nextExpLevelRemain"; export { postFilterNationCommandGen } from "./postFilterNationCommandGen"; -export { isTechLimited, convTechLevel, getMaxRelativeTechLevel } from "./techLevel"; \ No newline at end of file +export { isTechLimited, convTechLevel, getMaxRelativeTechLevel } from "./techLevel"; +export { calcTournamentTerm } from "./tournament"; \ No newline at end of file diff --git a/hwe/ts/utilGame/tournament.ts b/hwe/ts/utilGame/tournament.ts new file mode 100644 index 00000000..3b740100 --- /dev/null +++ b/hwe/ts/utilGame/tournament.ts @@ -0,0 +1,4 @@ +import { clamp } from 'lodash-es'; +export function calcTournamentTerm(turnTerm: number): number{ + return clamp(turnTerm, 5, 120); +} \ No newline at end of file