WorldMgr: Difference between revisions

Jump to navigation Jump to search
imported>Leoetlino
imported>Leoetlino
Line 185: Line 185:


=== Lord of the Mountain ===
=== Lord of the Mountain ===
The Lord of the Mountain appears whenever the AnimalMaster_Appearance flag is set. Its value is managed by a simple state machine in WorldMgr::TimeMgr.
Note that whenever a stage is unloaded, the AnimalMaster_Appearance flag is reset to false.
====State 0 - Wait for conditions====
If the following three conditions are true:
* The [[#Moon type]] must be 5 (waxing crescent)
* The AnimalMaster_Existence flag must be false (the LotM must not already be spawned)
* The current [[map area]] number must not be 64 ("HyruleHill", presumably the Satori Mountain area)
then the game generates a random "appearance hour" in the [0 .. 22] interval and goes into state 1.
====State 1 - Wait for the appearance time====
If the player is in map area 64, the state is reset back to 0.
Otherwise, the game does nothing until the current hour matches the previously generated appearance hour, at which point it sets AnimalMaster_Appearance to true and goes into state 2.
====State 2====
After one hour has elapsed, the current day of the week is stored and the state is set to 3.
====State 3====
After two week day changes, ''or'' [after the in-game day of the week changes and the current hour is >= the generated appearance hour], the LotM will disappear and the state will be set to 4.
====State 4====
The game waits for the moon type to be 5, before going back to state 0.


[[Category:Internals]]
[[Category:Internals]]
[[Category:Subsystems (BotW)]]
[[Category:Subsystems (BotW)]]
Anonymous user

Navigation menu