Skip to content

Commit

Permalink
Updated Boo gate required checks. Force moves player from area if req…
Browse files Browse the repository at this point in the history
…uired boos are not met.
  • Loading branch information
SomeJakeGuy committed Dec 30, 2024
1 parent 2618ce9 commit 98b181f
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 20 deletions.
36 changes: 16 additions & 20 deletions worlds/luigismansion/Patching.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,40 +85,39 @@ def update_event_info(event_info, boo_checks: bool):
if x["EventNo"] == 65:
x["disappear_flag"] = 10

# Update the Washroom event trigger to be A-pressed based
# Update the Washroom event trigger to be area entry based
# Also updates the event disappear trigger to be flag 28
# Also updates the EventFlag to 0, so this event always plays
if boo_checks and x["EventNo"] == 47:
x["pos_x"] = -1300.000000
x["pos_x"] = -1625.000000
x["pos_y"] = 100.000000
x["pos_z"] = -4161.000000
x["pos_z"] = -4150.000000
x["EventFlag"] = 0
x["disappear_flag"] = 28
x["EventIf"] = 1 #TODO update to eventif 5 and then shrink the area to be right in front of doors,
#TODO then move the player slightly back the player doesnt meet criteria
x["EventArea"] = 800
x["EventIf"] = 5
x["EventArea"] = 380
x["EventLock"] = 1
x["PlayerStop"] = 1
x["EventLoad"] = 0

# Update the King Boo event trigger to be A-pressed based
# Update the King Boo event trigger to be area entry based
if boo_checks and x["EventNo"] == 16:
x["pos_x"] = 2250.000000
x["pos_x"] = 2260.000000
x["pos_y"] = -450.000000
x["pos_z"] = -4800.000000
x["EventIf"] = 1 #TODO update to eventif 5 and then shrink the area to be right in front of doors,
#TODO then move the player slightly back the player doesnt meet criteria
x["EventArea"] = 800
x["pos_z"] = -5300.000000
x["EventIf"] = 5
x["EventArea"] = 200
x["EventLock"] = 1
x["PlayerStop"] = 1
x["EventLoad"] = 0

# Update the Balcony Boo event trigger to be A-pressed based
# Update the Balcony Boo event trigger to be area entry based
if boo_checks and x["EventNo"] == 96:
x["pos_x"] = 1800.000000
x["pos_y"] = 1200.000000
x["pos_z"] = -2300.000000
x["EventIf"] = 1 #TODO update to eventif 5 and then shrink the area to be right in front of doors,
#TODO then move the player slightly back the player doesnt meet criteria
x["EventArea"] = 800
x["pos_z"] = -2600.000000
x["EventIf"] = 5
x["EventArea"] = 200
x["EventLock"] = 1
x["PlayerStop"] = 1
x["EventLoad"] = 0
Expand All @@ -142,9 +141,6 @@ def update_character_info(character_info, output_data):
if x["create_name"] == "63_2":
x["room_no"] = 63

#TODO add new luigi spawn points near Washroom, Balcony, and King Boo to prevent doors from opening early.
#TODO update event after to warp luigi after to these new locations.


def update_observer_info(observer_info):
for x in observer_info.info_file_field_entries:
Expand Down
11 changes: 11 additions & 0 deletions worlds/luigismansion/data/custom_events/event16.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
<MENUOFF>
<LUIGISTOP2>
<FULLSCREEN>
<CLEARCOUNT>
<CHECKTELESA>({CountOne})({CountTwo})({CountThree})({CountFour})({CountFive})
<COUNTJMP>"not_enough""not_enough""not_enough""not_enough""boos_captured""boos_captured"
<CASE>"not_enough"
<SE>(95)
<WINDOW>(0)<COLOR>(16)
<SAY><COLOR>(3)You require {CountFive} boo(s) before\nyou can open this door...
<ANYKEY>
<CLOSEWINDOW>(0)
<FORCEMOVE>(2175.000000)(-550.000000)(-4600.000000)(20)
<NORMALSCREEN>
<LUIGIFREE2>
<MENUON>
<END>
<CASE>"boos_captured"
<FLAGON>(77)
<NORMALSCREEN>
<LUIGIFREE2>
<MENUON>
<END>
11 changes: 11 additions & 0 deletions worlds/luigismansion/data/custom_events/event47.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
<MENUOFF>
<LUIGISTOP2>
<FULLSCREEN>
<CLEARCOUNT>
<CHECKTELESA>({CountOne})({CountTwo})({CountThree})({CountFour})({CountFive})
<COUNTJMP>"not_enough""not_enough""not_enough""not_enough""boos_captured""boos_captured"
<CASE>"not_enough"
<SE>(95)
<WINDOW>(0)<COLOR>(16)
<SAY><COLOR>(3)You require {CountFive} boo(s) before\nyou can open this door...
<ANYKEY>
<CLOSEWINDOW>(0)
<FORCEMOVE>(-1040.000000)(100.000000)(-4150.000000)(20)
<NORMALSCREEN>
<LUIGIFREE2>
<MENUON>
<END>
<CASE>"boos_captured"
<FLAGON>(28)
<NORMALSCREEN>
<LUIGIFREE2>
<MENUON>
<END>
11 changes: 11 additions & 0 deletions worlds/luigismansion/data/custom_events/event96.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
<MENUOFF>
<LUIGISTOP2>
<FULLSCREEN>
<CLEARCOUNT>
<CHECKTELESA>({CountOne})({CountTwo})({CountThree})({CountFour})({CountFive})
<COUNTJMP>"not_enough""not_enough""not_enough""not_enough""boos_captured""boos_captured"
<CASE>"not_enough"
<SE>(95)
<WINDOW>(0)<COLOR>(16)
<SAY><COLOR>(3)You require {CountFive} boo(s) before\nyou can open this door...
<ANYKEY>
<CLOSEWINDOW>(0)
<FORCEMOVE>(1800.000000)(1200.000000)(-2100.000000)(20)
<NORMALSCREEN>
<LUIGIFREE2>
<MENUON>
<END>
<CASE>"boos_captured"
<FLAGON>(2)
<NORMALSCREEN>
<LUIGIFREE2>
<MENUON>
<END>

0 comments on commit 98b181f

Please sign in to comment.