feat: Updated room 9 graphics
This commit is contained in:
committed by
Julian Murgia
parent
ab795f2fd9
commit
7e3688fa63
@@ -1,34 +1,79 @@
|
||||
# Magical closet: the object is always in the LAST opened closet
|
||||
|
||||
# We want "use" and "open" to give the same end result
|
||||
# so we duplicate everything for use and open
|
||||
:use
|
||||
> [left_closet_open]
|
||||
# The closet is already open, so exit the command
|
||||
stop
|
||||
|
||||
set_global left_closet_open true
|
||||
# Increment the counter of the number of open closets
|
||||
inc_global open_closets 1
|
||||
|
||||
> [lt open_closets 3]
|
||||
set_state r9_closet_left open
|
||||
stop
|
||||
# Animate the door opening
|
||||
set_state r9_closet_left open_door
|
||||
|
||||
> [eq open_closets 3]
|
||||
set_state r9_closet_left open
|
||||
# After opening this one, we have 3 closets open
|
||||
# Activate the magic bottle in this particular closet
|
||||
> [i/r9_bottle]
|
||||
# If they've already picked up the bottle, don't make it appear
|
||||
stop
|
||||
> [r9_puzzle_complete]
|
||||
# If they've already completed the puzzle, don't make it appear
|
||||
stop
|
||||
set_active r9_bottle_left true
|
||||
# Note which cupboard the bottle is in in case the player
|
||||
# exits then reenters the room
|
||||
set_global r9_bottle_closet 1
|
||||
stop
|
||||
|
||||
|
||||
|
||||
:open
|
||||
> [left_closet_open]
|
||||
# The closet is already open, so exit the command
|
||||
stop
|
||||
|
||||
set_global left_closet_open true
|
||||
# Increment the counter of the number of open closets
|
||||
inc_global open_closets 1
|
||||
|
||||
> [lt open_closets 3]
|
||||
set_state r9_closet_left open
|
||||
stop
|
||||
# Animate the door opening
|
||||
set_state r9_closet_left open_door
|
||||
|
||||
> [eq open_closets 3]
|
||||
set_state r9_closet_left open
|
||||
# After opening this one, we have 3 closets open
|
||||
# Activate the magic bottle in this particular closet
|
||||
> [i/r9_bottle]
|
||||
# If they've already picked up the bottle, don't make it appear
|
||||
stop
|
||||
> [r9_puzzle_complete]
|
||||
# If they've already completed the puzzle, don't make it appear
|
||||
stop
|
||||
set_active r9_bottle_left true
|
||||
# Note which cupboard the bottle is in in case the player
|
||||
# exits then reenters the room
|
||||
set_global r9_bottle_closet 1
|
||||
stop
|
||||
|
||||
:close
|
||||
> [!left_closet_open]
|
||||
# If the closet isn't open, ignore the close command
|
||||
stop
|
||||
|
||||
> [eq open_closets 3]
|
||||
# If there's 3 closets open, the bottle was made active
|
||||
# We don't know which closet it was activated in so lets
|
||||
# deactivate all of them
|
||||
set_active r9_bottle_left false
|
||||
set_active r9_bottle_middle false
|
||||
set_active r9_bottle_right false
|
||||
|
||||
# Animate the door closing
|
||||
set_state r9_closet_left close_door
|
||||
|
||||
set_global left_closet_open false
|
||||
# Decrement the counter of closets open (used to determine when to show
|
||||
# the magic bottle)
|
||||
dec_global open_closets 1
|
||||
Reference in New Issue
Block a user