moonphase
moonphase
The current lunar phase, as a word.
The phase tracks the game's own lunar cycle, advancing with game time.
Arguments
Takes no arguments.
Returns
A string naming the phase — for example new, waxing crescent,
full, or waning gibbous.
Examples
after command (say) {
do "say The moon is [moonphase] tonight."
}
If the phase was waning gibbous at the time of execution, the mob would say "The moon is waning gibbous tonight." The value would change as the lunar cycle advances.
Branch on the phase with streqi:
after command (say) {
if [streqi [moonphase] "full"] {
do "say Beware — the beasts are restless under the full moon."
}
}
This warning only fires when the moon is full.
See also
hour— the current game hour, also drawn from game time.streqi— compare the phase name case-insensitively.- Control flow —
ifand friends.