Skip to content

Commit 4073da2

Browse files
authored
Merge branch 'dev' into final-changes-for-ballaam
2 parents 2aee93c + 3f97397 commit 4073da2

File tree

13 files changed

+62
-23
lines changed

13 files changed

+62
-23
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[bumpversion]
22
commit = True
33
tag = False
4-
current_version = 5.7.57
4+
current_version = 5.7.59
55

66
[bumpversion:file:version.py]
77
search = version = "{current_version}"

archipelago/FillSettings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ def get_default_settings() -> dict:
249249
MiscChangesSelected.move_spring_cabin_rocketbarrel,
250250
],
251251
"more_cutscene_skips": ExtraCutsceneSkips.auto,
252+
"no_consumable_upgrades": False,
252253
"no_healing": False,
253254
"no_melons": False,
254255
"open_lobbies": False,

randomizer/Enums/Settings.jsonc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1420,7 +1420,8 @@
14201420
"win_condition_spawns_ship": 292,
14211421
"ice_trap_model": 293,
14221422
"krool_in_boss_pool_v2": 294,
1423-
"bosses_selected": 295
1423+
"no_consumable_upgrades": 295,
1424+
"bosses_selected": 296
14241425
},
14251426
/*
14261427
SettingsStringDataType:
@@ -2115,6 +2116,7 @@
21152116
"SettingsStringEnum.shops_dont_cost": { "obj": "SettingsStringDataType.bool" },
21162117
"SettingsStringEnum.alt_minecart_mayhem": { "obj": "SettingsStringDataType.bool" },
21172118
"SettingsStringEnum.less_fragile_boulders": { "obj": "SettingsStringDataType.bool" },
2119+
"SettingsStringEnum.no_consumable_upgrades": { "obj": "SettingsStringDataType.bool" },
21182120
"SettingsStringEnum.prog_slam_level_1": { "obj": "SlamRequirement" },
21192121
"SettingsStringEnum.prog_slam_level_2": { "obj": "SlamRequirement" },
21202122
"SettingsStringEnum.prog_slam_level_3": { "obj": "SlamRequirement" },

randomizer/Fill.py

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2290,7 +2290,8 @@ def Fill(spoiler: Spoiler) -> None:
22902290
bigListOfItemsToPlace = []
22912291
if Types.Shop in spoiler.settings.shuffled_location_types:
22922292
bigListOfItemsToPlace.extend(ItemPool.ImportantSharedMoves.copy())
2293-
bigListOfItemsToPlace.extend(ItemPool.JunkSharedMoves.copy())
2293+
if not spoiler.settings.no_consumable_upgrades:
2294+
bigListOfItemsToPlace.extend(ItemPool.JunkSharedMoves.copy())
22942295
bigListOfItemsToPlace.extend(ItemPool.DonkeyMoves)
22952296
bigListOfItemsToPlace.extend(ItemPool.DiddyMoves)
22962297
bigListOfItemsToPlace.extend(ItemPool.LankyMoves)
@@ -2823,19 +2824,20 @@ def ShuffleSharedMoves(spoiler: Spoiler, placedMoves: List[Items], placedTypes:
28232824
)
28242825
if importantSharedUnplaced > 0:
28252826
raise Ex.ItemPlacementException("Unable to find enough locations to place " + str(importantSharedUnplaced) + " shared important items.")
2826-
junkSharedToPlace = ItemPool.JunkSharedMoves.copy()
2827-
for item in placedMoves:
2828-
if item in junkSharedToPlace:
2829-
junkSharedToPlace.remove(item)
2830-
placedMoves.extend(junkSharedToPlace)
2831-
junkSharedUnplaced = PlaceItems(
2832-
spoiler,
2833-
FillAlgorithm.random,
2834-
junkSharedToPlace,
2835-
[x for x in ItemPool.GetItemsNeedingToBeAssumed(spoiler.settings, placedTypes) if x not in junkSharedToPlace],
2836-
)
2837-
if junkSharedUnplaced > 0:
2838-
raise Ex.ItemPlacementException("Unable to find enough locations to place " + str(junkSharedUnplaced) + " shared junk items.")
2827+
if not spoiler.settings.no_consumable_upgrades:
2828+
junkSharedToPlace = ItemPool.JunkSharedMoves.copy()
2829+
for item in placedMoves:
2830+
if item in junkSharedToPlace:
2831+
junkSharedToPlace.remove(item)
2832+
placedMoves.extend(junkSharedToPlace)
2833+
junkSharedUnplaced = PlaceItems(
2834+
spoiler,
2835+
FillAlgorithm.random,
2836+
junkSharedToPlace,
2837+
[x for x in ItemPool.GetItemsNeedingToBeAssumed(spoiler.settings, placedTypes) if x not in junkSharedToPlace],
2838+
)
2839+
if junkSharedUnplaced > 0:
2840+
raise Ex.ItemPlacementException("Unable to find enough locations to place " + str(junkSharedUnplaced) + " shared junk items.")
28392841

28402842

28412843
def GeneratePlaythrough(spoiler: Spoiler) -> None:
@@ -4255,6 +4257,8 @@ def CheckForIncompatibleSettings(settings: Settings) -> None:
42554257
if IsDDMSSelected(settings.hard_mode_selected, HardModeSelected.water_is_lava):
42564258
if settings.no_healing:
42574259
found_incompatibilities += "Cannot turn on 'Water is Lava' whilst disabling healing. "
4260+
if settings.no_consumable_upgrades and not settings.start_with_3rd_melon:
4261+
found_incompatibilities += "Cannot turn on 'Water is Lava' without access to 3 Melons of health. "
42584262
if IsDDMSSelected(settings.hard_mode_selected, HardModeSelected.angry_caves):
42594263
if settings.perma_death or settings.wipe_file_on_death:
42604264
if settings.damage_amount == DamageAmount.quad or settings.damage_amount == DamageAmount.ohko:

randomizer/Patching/ASM/Items.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,9 @@ def grabUpdates(ROM_COPY: LocalROM, settings, offset_dict: dict, spoiler):
299299
writeValue(ROM_COPY, 0x806F6F76, Overlay.Static, FLAG_ABILITY_CAMERA, offset_dict) # Film Refill
300300
writeFunction(ROM_COPY, 0x806F6F78, Overlay.Static, "hasFlagMove", offset_dict)
301301
writeValue(ROM_COPY, 0x806F916A, Overlay.Static, FLAG_ABILITY_CAMERA, offset_dict) # Film max
302-
writeFunction(ROM_COPY, 0x806F916C, Overlay.Static, "hasFlagMove", offset_dict)
302+
# writeFunction(ROM_COPY, 0x806F916C, Overlay.Static, "hasFlagMove", offset_dict)
303+
writeValue(ROM_COPY, 0x806F916C, Overlay.Static, 0x00000000, offset_dict, 4) # NOP (Skip this check, as the line below will render it obsolete)
304+
writeValue(ROM_COPY, 0x806F9174, Overlay.Static, 0x00000000, offset_dict, 4) # NOP (Skip setting film count to 0, to prevent that from happening)
303305
# Shockwave
304306
writeFunction(ROM_COPY, 0x806CA308, Overlay.Static, "hasFlagMove", offset_dict)
305307
writeFunction(ROM_COPY, 0x806F6EBC, Overlay.Static, "hasFlagMove", offset_dict)

randomizer/Settings.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,7 @@ def generate_misc(self):
954954
self.holiday_setting_offseason = False
955955
self.remove_wrinkly_puzzles = False
956956
self.smaller_shops = False
957+
self.no_consumable_upgrades = False
957958
self.alter_switch_allocation = False
958959
self.prog_slam_level_1 = SlamRequirement.green
959960
self.prog_slam_level_2 = SlamRequirement.green
@@ -1092,6 +1093,11 @@ def resolve_settings(self):
10921093
self.climbing_status = ClimbingStatus.normal
10931094
else:
10941095
self.climbing_status = ClimbingStatus.shuffled
1096+
# If you start with two copies of Progressive Instrument Upgrade, you start with 3 melons of health
1097+
if guaranteed_starting_moves.count(Items.ProgressiveInstrumentUpgrade) == 2:
1098+
self.start_with_3rd_melon = True
1099+
else:
1100+
self.start_with_3rd_melon = False
10951101

10961102
# Switchsanity handling
10971103
ShufflableExits[Transitions.AztecMainToLlama].entryKongs = {

static/presets/weights/weight_files_raw.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,6 +1340,15 @@
13401340
},
13411341
"qol_uses_hard": true
13421342
},
1343+
"no_consumable_upgrades": {
1344+
"setting_type": "bool",
1345+
"options": {
1346+
"easy": 0,
1347+
"standard": 25,
1348+
"difficult": 50
1349+
},
1350+
"qol_uses_hard": true
1351+
},
13431352
"open_lobbies": {
13441353
"setting_type": "bool",
13451354
"options": {

templates/items.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ <h3 class="modal-title title" id="starting_moves_ModalLabel">CUSTOMIZE STARTING
745745
if (allow_splitting) {
746746
let bk_copy_largest_to_smallest = temp_bk.slice();
747747
bk_copy_largest_to_smallest.sort((a, b) => b.size - a.size);
748-
console.log(bk_copy_largest_to_smallest);
748+
//console.log(bk_copy_largest_to_smallest);
749749
/*
750750
Rule 4:
751751
For all remaining buckets, check the pools which need the checks the most

templates/overworld.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,18 @@ <h2 class="title">DIFFICULTY</h2>
354354
</label>
355355
{{ properties_selector(helm_hurry_items, "helmhurry_list", "HELM HURRY SELECTOR", "This will open a popup that will let you customize what how much time each item will give you.") }}
356356
{# Remove end </div> as it's included in the macro for formatting #}
357-
<div class="spacer"></div>
357+
<div class="form-check form-switch item-switch">
358+
<label data-toggle="tooltip"
359+
title="Prevents consumable upgrades (Ammo Belts, Instrument Upgrades) from being placed in the game. You can still start with them.">
360+
<input class="form-check-input"
361+
type="checkbox"
362+
name="no_consumable_upgrades"
363+
id="no_consumable_upgrades"
364+
display_name="No Consumable Upgrades"
365+
value="True"/>
366+
No Consumable Upgrades
367+
</label>
368+
</div>
358369
</div>
359370
<div class="flex-container">
360371
{{ dropdown_multiselector(hard_mode, "hard_mode", "Hard Mode", "This will open a dropdown that will let you customize what hard mode Options are active.", 10) }}

tests/test_spoiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class TestSpoiler(unittest.TestCase):
3636
def test_settings_string(self):
3737
"""Confirm that settings strings decryption is working and generate a spoiler log with it."""
3838
# The settings string is defined either here or in the string above, pick your poison
39-
self.settings_string = "Px+YQAAEKA4WBwwDhoDDgGHgMQAYiAxICiYFFAKKgUWA4+AyABkIFF8mMFEcFI2FRkQjQLHaF6AAa/AAZggAEwwAAYoAAP9A0yAoCBgIDgYIBASCgoGBYODAiAJ1SxuABvABwABxAByABzAB0AC5ABMwEJw9AhQgMDDCDQkE1kArQLRLSLTLUTVTWbXbYtmtqG22426ndW83CXAW+HfXhXEHOXGHInK3MHQHSXVHWnY3bDRElNSZRcYB1qiVAISIUQKMFIClBTBIyQRcE9TZPlm2Yh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ZDpWx6dDxI0VniavN7w6R4wCHdcQZaxCC9fP4Bs8fDCaOd3Ur2VmZxTZ1bF8KcKAeEQyGQlS2Nc+ET+ALIAgoG1CiPBEMhTHQlS2Nc+EZTpW18Z1vnfPIHUivmnose4KrHLVg8w8IOFIx6lxphY8Uol8CgLclcD7qbK6KBxZpAlw1r0AHyAPUAfQA9gB9gA"
4040
settings_dict = decrypt_settings_string_enum(self.settings_string)
4141
settings_dict["seed"] = random.randint(0, 100000000) # Can be fixed if you want to test a specific seed repeatedly
4242

0 commit comments

Comments
 (0)