Skip to content

Commit

Permalink
Merge pull request #257 from steven11sjf/feature/power-bomb-nerf
Browse files Browse the repository at this point in the history
Added a game patch to nerf power bombs
  • Loading branch information
henriquegemignani authored Aug 23, 2023
2 parents 389a316 + 17d6315 commit f855ae3
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/open_dread_rando/files/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,11 @@
"type": "boolean",
"description": "Enable warping to the starting location from Save Stations.",
"default": true
},
"nerf_power_bombs": {
"type": "boolean",
"description": "Changes weaknesses for certain enemies and props to make Power Bombs less overpowered.",
"default": false
}
},
"additionalProperties": false
Expand Down
19 changes: 19 additions & 0 deletions src/open_dread_rando/specific_patches/game_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ def apply_game_patches(editor: PatcherEditor, configuration: dict):
if configuration["warp_to_start"]:
_warp_to_start(editor)

if configuration["nerf_power_bombs"]:
_remove_pb_weaknesses(editor)


def _modify_raven_beak_damage_table(editor: PatcherEditor, mode: str):
rb_bmsad = editor.get_file("actors/characters/chozocommander/charclasses/chozocommander.bmsad", Bmsad)
Expand Down Expand Up @@ -97,6 +100,22 @@ def _remove_grapple_blocks(editor: PatcherEditor, configuration: dict):
)


def _remove_pb_weaknesses(editor: PatcherEditor):
# enky
warlotus = editor.get_file("actors/characters/warlotus/charclasses/warlotus.bmsad", Bmsad)
warlotus.raw.property.components.LIFE.fields.fields.bShouldDieWithPowerBomb = False
warlotus.raw.property.components.LIFE.fields.fields.oDamageSourceFactor.fPowerBombFactor = 0.0

# charge door
for door in ["doorchargecharge", "doorchargeclosed", "doorclosedcharge"]:
charge_door = editor.get_file(f"actors/props/{door}/charclasses/{door}.bmsad", Bmsad)
func = charge_door.raw.property.components.LIFE.functions[0]
if func.params.Param1.value:
func.params.Param1.value = "CHARGE_BEAM"
if func.params.Param2.value:
func.params.Param2.value = "CHARGE_BEAM"


def _warp_to_start(editor: PatcherEditor):
text = "Save your progress?|Hold \u1806 and \u1807 while selecting {c6}Cancel{c0}|to warp to the starting location."
patch_text(editor, "GUI_SAVESTATION_QUESTION", text)
3 changes: 2 additions & 1 deletion tests/test_files/starter_preset_patcher.json
Original file line number Diff line number Diff line change
Expand Up @@ -4099,7 +4099,8 @@
"raven_beak_damage_table_handling": "consistent_low",
"remove_grapple_blocks_hanubia_shortcut": true,
"remove_grapple_block_path_to_itorash": true,
"default_x_released": false
"default_x_released": false,
"nerf_power_bombs": true
},
"door_patches": [
{
Expand Down

0 comments on commit f855ae3

Please sign in to comment.