[logic]
active = ph_idle@disable

[ph_idle@disable]
nonscript_usable = false
tips = jup_sedoy_box_locked
on_info = {+jup_a7_sedoy_squad_dead} ph_idle@wait_key

[ph_idle@wait_key]
nonscript_usable = false
tips = jup_sedoy_box_locked
on_info  = {=actor_has_item(key_sedoy_box)} ph_idle@enable %+actor_has_key_sedoy_box%
on_info2 = {+actor_has_key_sedoy_box} ph_idle@enable

[ph_idle@enable]
nonscript_usable = true
tips = st_search_jup_sedoy_box
on_info  = {=all_boxes_are_empty(jup_sedoy_box)} ph_idle@enable_always %=remove_item_no_news(key_sedoy_box) +remove_key_sedoy_box%
on_info2 = {+remove_key_sedoy_box} ph_idle@enable_always

[ph_idle@enable_always]
nonscript_usable = true
tips = st_search_jup_sedoy_box
