Reference · Shizen and Arashi environments
isEnvironmentTurnScheduledfunction
Pure one-based schedule lookup: frequent is every second turn; rare is every eighth turn.
Import it
import { isEnvironmentTurnScheduled } from "@johnmorrisdotca/houseki/nature";
Definition
function isEnvironmentTurnScheduled(turn: number, schedule: EnvironmentSchedule): boolean
Parameters
| Name | Type | Description |
|---|---|---|
turn | number | The committed placement/turn number tested against the environment schedule. |
schedule | EnvironmentSchedule | The native schedule with its authored or periodic trigger settings. |
Returns
boolean
Pure one-based schedule lookup: frequent is every second turn; rare is every eighth turn.
Examples
import { isEnvironmentTurnScheduled } from "@johnmorrisdotca/houseki/nature";
console.log(isEnvironmentTurnScheduled(2,{kind:"authored",turns:[2,4]}));trueWhat it prints (run when this page was built)