Idle: Difference between revisions

160 bytes added ,  21 July 2023
extract quicksand death
(extract quicksand death)
Line 41: Line 41:
#* The camera preset is updated.
#* The camera preset is updated.
#* Mario's action is changed to [[Standing Death|standing death]].
#* Mario's action is changed to [[Standing Death|standing death]].
# Lastly, Mario can interact with quicksand on a quicksand floor. '''This only cancels if Mario's action is set to quicksand death'''.
# [[Idle#quicksand death|Potentially cancel to quicksand death]] (sinkingSpeed = 0.5)
#* Nothing happens if Mario is riding on a shell (though of course, riding a shell isn't a stationary action).
#* If Mario's floor isn't quicksand, the quicksand depth is set to 0, and nothing happens.
#* Else:
#** If Mario's quicksand depth is less than 1.1, it is set to 1.1
#** Mario's quicksand depth is increased by 0.5
#** If Mario's floor type is SURFACE_SHALLOW_QUICKSAND, SURFACE_SHALLOW_MOVING_QUICKSAND, or (SURFACE_QUICKSAND or SURFACE_MOVING_QUICKSAND), then his quicksand depth is capped to at most 10, 25, and 60 units respectively.
#** If (Mario's floor type is SURFACE_DEEP_QUICKSAND or SURFACE_DEEP_MOVING_QUICKSAND, and his quicksand depth is at least 160) '''or''' (Mario's floor type is SURFACE_INSTANT_QUICKSAND or SURFACE_INSTANT_MOVING_QUICKSAND):
#*** The camera preset is updated.
#*** Mario's action is set to [[Quicksand Death]].
The processing goes:
The processing goes:
# Somehow, m->action is set to a stationary action.
# Somehow, m->action is set to a stationary action.
Line 56: Line 47:
# The action is executed.
# The action is executed.
Technically, m->action was set to the stationary action. So although the action doesn't really do anything, there is still a "transition" between such stationary action and [[Water Plunge]], [[Squished]], [[Standing Death]], or [[Quicksand Death]]. So invariably, for all stationary actions, the infobox contains those 4 actions under "Transitions > Into" first (see top right of page if you don't know what I'm talking about).
Technically, m->action was set to the stationary action. So although the action doesn't really do anything, there is still a "transition" between such stationary action and [[Water Plunge]], [[Squished]], [[Standing Death]], or [[Quicksand Death]]. So invariably, for all stationary actions, the infobox contains those 4 actions under "Transitions > Into" first (see top right of page if you don't know what I'm talking about).
== quicksand death ==
Many actions call mario_update_quicksand. This function only cancels if Mario's action is set to [[Quicksand Death]]. This function has one argument, '''sinkingSpeed'''.
* Nothing happens if Mario is riding on a shell ([[Riding Shell Ground]], [[Riding Shell Jump]], [[Riding Shell Fall]])
* If Mario's floor isn't quicksand, the quicksand depth is set to 0, and nothing happens.
* Else:
** If Mario's quicksand depth is less than 1.1, it is set to 1.1
** Mario's quicksand depth is increased by '''sinkingSpeed'''
** If Mario's floor type is SURFACE_SHALLOW_QUICKSAND, SURFACE_SHALLOW_MOVING_QUICKSAND, or (SURFACE_QUICKSAND or SURFACE_MOVING_QUICKSAND), then his quicksand depth is capped to at most 10, 25, and 60 units respectively.
** If (Mario's floor type is SURFACE_DEEP_QUICKSAND or SURFACE_DEEP_MOVING_QUICKSAND, and his quicksand depth is at least 160) '''or''' (Mario's floor type is SURFACE_INSTANT_QUICKSAND or SURFACE_INSTANT_MOVING_QUICKSAND):
*** The camera preset is updated.
*** Mario's action is set to [[Quicksand Death]].
== check_common_idle_cancels==
== check_common_idle_cancels==
Note: This is used only in Idle, [[Start Sleeping]], [[Coughing]], [[In Quicksand]], and [[Panting]].
Note: This is used only in Idle, [[Start Sleeping]], [[Coughing]], [[In Quicksand]], and [[Panting]].
192

edits