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
1 change: 1 addition & 0 deletions base-hack/src/randomizers/k_rool_order.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ void completeBoss(void) {
if ((k_rool_phase == 4) || (Rando.k_rool_order[k_rool_phase + 1] == 0xFF)) {
// Ending phase
setPermFlag(FLAG_GAME_BEATEN);
save();
if (inU8List(CurrentMap, &maps_with_extended_end_cs, sizeof(maps_with_extended_end_cs))) {
playCutscene(CurrentActorPointer_0, 0x1A, 1);
renderingParamsData* render = Player->rendering_param_pointer;
Expand Down
2 changes: 1 addition & 1 deletion randomizer/Lists/CustomLocations.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ class LocationTypes(IntEnum):
max_size=56,
logic_region=Regions.JapesPaintingRoomHill,
group=1,
banned_types=[LocationTypes.MelonCrate],
banned_types=[LocationTypes.MelonCrate, LocationTypes.Bananaport],
),
CustomLocation(
map=Maps.JungleJapes,
Expand Down
22 changes: 18 additions & 4 deletions randomizer/Settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1673,9 +1673,14 @@ def resolve_settings(self):
if item_type == Types.Cranky:
item_types = [sk for sk in [Types.Cranky, Types.Snide, Types.Candy, Types.Funky] if shopkeeper_type_mapping[sk] not in guaranteed_starting_moves]
elif item_type == Types.TrainingBarrel:
item_types = [Types.TrainingBarrel, Types.PreGivenMove]
if self.climbing_status != ClimbingStatus.normal:
item_types.append(Types.Climbing)
# Only include TrainingBarrel type if training moves aren't all guaranteed starting moves
training_barrel_items = [Items.Vines, Items.Swim, Items.Oranges, Items.Barrels]
if all(tb_item in guaranteed_starting_moves for tb_item in training_barrel_items):
item_types = []
else:
item_types = [Types.TrainingBarrel, Types.PreGivenMove]
if self.climbing_status != ClimbingStatus.normal:
item_types.append(Types.Climbing)
elif item_type == Types.Medal and IsItemSelected(self.cb_rando_enabled, self.cb_rando_list_selected, Levels.DKIsles):
item_types = [Types.Medal, Types.IslesMedal]
for x in selector_types:
Expand Down Expand Up @@ -1708,6 +1713,15 @@ def resolve_settings(self):
):
self.item_pool_info[pool_index].is_shuffled = False
self.shuffled_location_types = list(set(self.shuffled_location_types))

# If training moves are not in any shuffled pool, add them to guaranteed_starting_moves
if Types.TrainingBarrel not in self.shuffled_location_types:
training_barrel_items = [Items.Vines, Items.Swim, Items.Oranges, Items.Barrels]
for tb_item in training_barrel_items:
if tb_item not in guaranteed_starting_moves:
guaranteed_starting_moves.append(tb_item)
self.training_barrels = TrainingBarrels.normal

self.enemy_drop_rando = Types.Enemies in self.shuffled_location_types
if Types.Shop in self.shuffled_location_types:
self.move_rando = MoveRando.item_shuffle
Expand Down Expand Up @@ -2645,7 +2659,7 @@ def update_valid_locations(self, spoiler):
if Types.Shockwave in self.shuffled_location_types:
locations_excluding_kong_shops.append(Locations.CameraAndShockwave)
self.valid_locations[Types.Shockwave] = locations_excluding_kong_shops.copy()
if Types.TrainingBarrel in self.shuffled_location_types:
if Types.TrainingBarrel in self.shuffled_location_types or self.training_barrels != TrainingBarrels.normal:
self.valid_locations[Types.TrainingBarrel] = locations_excluding_kong_shops.copy()
if Types.Climbing in self.shuffled_location_types:
self.valid_locations[Types.Climbing] = locations_excluding_kong_shops.copy()
Expand Down
20 changes: 20 additions & 0 deletions static/js/rando_options.js
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,7 @@ function unshuffled_pool_list_changed(evt) {
let shopsInPool = true;
let shockwaveInPool = true;
let shopownersInPool = true;
let trainingMovesInPool = true;

const unshuffled_pool = document.getElementById(`item_rando_list_0`);
const types_in_pool = unshuffled_pool.getElementsByTagName("li");
Expand All @@ -1087,10 +1088,17 @@ function unshuffled_pool_list_changed(evt) {
if (types_in_pool[i].getAttribute("value") == "shopowners") {
shopownersInPool = false;
}
if (types_in_pool[i].getAttribute("value") == "trainingmoves") {
trainingMovesInPool = false;
}
}

let camera_option = document.getElementById("starting_move_52");
let shockwave_option = document.getElementById("starting_move_53");
let vines_option = document.getElementById("starting_move_8");
let swim_option = document.getElementById("starting_move_9");
let oranges_option = document.getElementById("starting_move_10");
let barrels_option = document.getElementById("starting_move_11");
let cranky_option = document.getElementById("starting_move_92");
let funky_option = document.getElementById("starting_move_93");
let candy_option = document.getElementById("starting_move_94");
Expand All @@ -1107,6 +1115,18 @@ function unshuffled_pool_list_changed(evt) {
camera_option.removeAttribute("hidden");
shockwave_option.removeAttribute("hidden");
}
if (!trainingMovesInPool) {
vines_option.setAttribute("hidden", "hidden");
swim_option.setAttribute("hidden", "hidden");
oranges_option.setAttribute("hidden", "hidden");
barrels_option.setAttribute("hidden", "hidden");
}
else {
vines_option.removeAttribute("hidden");
swim_option.removeAttribute("hidden");
oranges_option.removeAttribute("hidden");
barrels_option.removeAttribute("hidden");
}
if (!shopownersInPool) {
cranky_option.setAttribute("hidden", "hidden");
funky_option.setAttribute("hidden", "hidden");
Expand Down
Binary file modified static/patches/shrink-dk64.bps
Binary file not shown.
82 changes: 41 additions & 41 deletions static/patches/symbols.json
Original file line number Diff line number Diff line change
Expand Up @@ -1031,47 +1031,47 @@
"blast_entrances": 2153743048,
"swap_ending_cutscene_model": 2153743072,
"completeboss": 2153743288,
"fixkroolkong": 2153744000,
"handlekroolsaveprogress": 2153744100,
"k_rool_phase": 2153744428,
"writehudamount": 2153744604,
"coinhudelements": 2153744772,
"movetransplant": 2153744816,
"isshopempty": 2153744884,
"getinstrumentlevel": 2153744992,
"getprice": 2153745048,
"getnextmovepurchase": 2153745236,
"purchasemove": 2153745580,
"checkfirstmovepurchase": 2153746076,
"purchasefirstmovehandler": 2153746240,
"setlocation": 2153746308,
"setlocationstatus": 2153746336,
"getlocationstatus": 2153746556,
"displaymovetext": 2153746584,
"getnextmovetext": 2153746896,
"displaybfimovetext": 2153749248,
"showpostmovetext": 2153749376,
"simianslamnames": 2153750520,
"specialmovesnames": 2153750528,
"gunnames": 2153750568,
"gunupgnames": 2153750576,
"ammobeltnames": 2153750580,
"instrumentnames": 2153750584,
"instrumentupgnames": 2153750592,
"destroybonus": 2153750600,
"completebonus": 2153750632,
"helminit": 2153750760,
"helmbarrelcode": 2153751688,
"crowndoorcheck": 2153752056,
"coindoorcheck": 2153752068,
"unlockmoves": 2153752184,
"starting_item_data": 2153752636,
"auto_turn_keys": 2153752700,
"qualityoflife_shorteners": 2153752832,
"fastwarp": 2153752924,
"fastwarp_playmusic": 2153752956,
"fastwarpshockwavefix": 2153752984,
"clearvulturecutscene": 2153753088,
"fixkroolkong": 2153744008,
"handlekroolsaveprogress": 2153744108,
"k_rool_phase": 2153744436,
"writehudamount": 2153744612,
"coinhudelements": 2153744780,
"movetransplant": 2153744824,
"isshopempty": 2153744892,
"getinstrumentlevel": 2153745000,
"getprice": 2153745056,
"getnextmovepurchase": 2153745244,
"purchasemove": 2153745588,
"checkfirstmovepurchase": 2153746084,
"purchasefirstmovehandler": 2153746248,
"setlocation": 2153746316,
"setlocationstatus": 2153746344,
"getlocationstatus": 2153746564,
"displaymovetext": 2153746592,
"getnextmovetext": 2153746904,
"displaybfimovetext": 2153749256,
"showpostmovetext": 2153749384,
"simianslamnames": 2153750528,
"specialmovesnames": 2153750536,
"gunnames": 2153750576,
"gunupgnames": 2153750584,
"ammobeltnames": 2153750588,
"instrumentnames": 2153750592,
"instrumentupgnames": 2153750600,
"destroybonus": 2153750608,
"completebonus": 2153750640,
"helminit": 2153750768,
"helmbarrelcode": 2153751696,
"crowndoorcheck": 2153752064,
"coindoorcheck": 2153752076,
"unlockmoves": 2153752192,
"starting_item_data": 2153752644,
"auto_turn_keys": 2153752708,
"qualityoflife_shorteners": 2153752840,
"fastwarp": 2153752932,
"fastwarp_playmusic": 2153752964,
"fastwarpshockwavefix": 2153752992,
"clearvulturecutscene": 2153753096,
"codeend": 2153754112,
"copyfunc": 2153756496,
"regularframeloop": 2153759408,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
| Jungle Japes | Diddy Cavern | | `self.logic = lambda _: True` |
| Jungle Japes | Inside Diddy's Cavern | | `self.logic = lambda _: True` |
| Jungle Japes | First tunnel - later half | | `self.logic = lambda _: True` |
| Jungle Japes | Painting Hill | MelonCrate | `self.logic = lambda _: True` |
| Jungle Japes | Painting Hill | MelonCrate, Bananaport | `self.logic = lambda _: True` |
| Jungle Japes | Hive area near Hunky barrel | | `self.logic = lambda _: True` |
| Jungle Japes | Near Stump | | `self.logic = lambda _: True` |
| Jungle Japes | Near Log | | `self.logic = lambda _: True` |
Expand Down
Loading