Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pull-assembly-patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import requests

VERSION = "0.9.2"
VERSION = "0.10.0"
ASSET_NAME = "Randomizer.Patches.zip"
DESTINATION_ASSEMBLY_PATH = (
Path(__file__)
Expand Down
6 changes: 6 additions & 0 deletions src/mars_patcher/mf/auto_generated_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,12 @@ class Marsschemamf(typ.TypedDict, total=False):
InstantUnmorph: bool = False
"""When true, enables instant unmorphing via the SELECT button."""

NerfGerons: bool = False
"""When true, changes the Geron weaknesses to only be weak to their 'intended' values."""

UseAlternativeHudHealthLayout: bool = False
"""When true, changes the HUD health layout to display 'currentHP/totalHP'."""

SkipDoorTransitions: bool = False
"""Makes all door transitions instant when true."""

Expand Down
2 changes: 2 additions & 0 deletions src/mars_patcher/mf/constants/reserved_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class ReservedConstantsMF:

PATCHER_FREE_SPACE_ADDR = 0x7D0000
PATCHER_FREE_SPACE_END = PATCHER_FREE_SPACE_ADDR + 0x20000
# TODO: refactor these to be like in ZM. Instead of hardcoding the addresses.
MINOR_LOCS_TABLE_ADDR = 0x7FF000
MINOR_LOCS_ARRAY_ADDR = 0x7FF004
MAJOR_LOCS_POINTER_ADDR = 0x7FF008
Expand All @@ -30,3 +31,4 @@ class ReservedConstantsMF:
TITLESCREEN_TEXT_POINTERS_POINTER_ADDR = 0x7FF030
DEFAULT_STEREO_FLAG_POINTER_ADDR = 0x7FF034
INSTANT_MORPH_FLAG_POINTER_ADDR = 0x7FF038
USE_ALTERNATIVE_HUD_DISPLAY = 0x7FF03C
10 changes: 10 additions & 0 deletions src/mars_patcher/mf/data/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,16 @@
"description": "When true, enables instant unmorphing via the SELECT button.",
"default": false
},
"NerfGerons": {
"type": "boolean",
"description": "When true, changes the Geron weaknesses to only be weak to their 'intended' values.",
"default": false
},
"UseAlternativeHudHealthLayout": {
"type": "boolean",
"description": "When true, changes the HUD health layout to display 'currentHP/totalHP'.",
"default": false
},
"SkipDoorTransitions": {
"type": "boolean",
"description": "Makes all door transitions instant when true.",
Expand Down
8 changes: 8 additions & 0 deletions src/mars_patcher/mf/misc_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ def apply_pbs_without_bombs(rom: Rom) -> None:
apply_patch_in_asm_path(rom, "bombless_pbs.ips")


def apply_nerf_gerons(rom: Rom) -> None:
apply_patch_in_asm_path(rom, "nerf_geron_weakness.ips")


def apply_alternative_health_layout(rom: Rom) -> None:
rom.write_8(rom.read_ptr(ReservedConstantsMF.USE_ALTERNATIVE_HUD_DISPLAY), 1)


def apply_reveal_hidden_tiles(rom: Rom) -> None:
rom.write_8(rom.read_ptr(ReservedConstantsMF.REVEAL_HIDDEN_TILES_ADDR), 1)

Expand Down
8 changes: 8 additions & 0 deletions src/mars_patcher/mf/patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
from mars_patcher.mf.locations import LocationSettings
from mars_patcher.mf.misc_patches import (
apply_accessibility_patch,
apply_alternative_health_layout,
apply_base_patch,
apply_instant_unmorph_patch,
apply_nerf_gerons,
apply_pbs_without_bombs,
apply_reveal_hidden_tiles,
apply_reveal_unexplored_doors,
Expand Down Expand Up @@ -156,6 +158,12 @@ def patch_mf(
if patch_data.get("PowerBombsWithoutBombs"):
apply_pbs_without_bombs(rom)

if patch_data.get("NerfGerons"):
apply_nerf_gerons(rom)

if patch_data.get("UseAlternativeHudHealthLayout"):
apply_alternative_health_layout(rom)

if patch_data.get("UnexploredMap"):
apply_unexplored_map(rom)

Expand Down