Skip to content

Commit 1df5419

Browse files
authored
Merge branch 'dev' into archipelago-setup
2 parents 4d8d96c + ebd13d5 commit 1df5419

File tree

10 files changed

+480
-437
lines changed

10 files changed

+480
-437
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 = 4.11.19
4+
current_version = 4.11.22
55

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

ap_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Holds the version for Archipelago."""
22

3-
version = "1.0.20"
3+
version = "1.0.21"

base-hack/src/item rando/archipelago.c

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ void handleArchipelagoFeed(void) {
298298
}
299299
}
300300
}
301-
ap_info.can_die = cc_allower_generic() && cc_allower_spawnkop();
301+
ap_info.can_die = canDie();
302302
if (CutsceneActive > 1) {
303303
ap_info.can_die = 0;
304304
}
@@ -310,6 +310,28 @@ void handleArchipelagoFeed(void) {
310310
}
311311
}
312312

313+
int canDie(void) {
314+
// Check if the spawn kop CC effect can be triggered to simulate death without issues
315+
if(!cc_allower_generic()){
316+
// No cc effects in general would be allowed
317+
return 0;
318+
}
319+
int level = levelIndexMapping[CurrentMap];
320+
if(level == LEVEL_BONUS || level == LEVEL_SHARED){
321+
// In a bonus/shared map
322+
return 0;
323+
}
324+
if(!cc_allower_spawnkop()){
325+
// This cc effect is already active
326+
return 0;
327+
}
328+
if (TBVoidByte & 0x30 == 0) {
329+
// In a tag barrel. Kops hate this one trick.
330+
return 0;
331+
}
332+
return 1;
333+
}
334+
313335
void sendDeath(void) {
314336
if (isAPEnabled()) {
315337
if (!isActorLoaded(CUSTOM_ACTORS_START + NEWACTOR_KOPDUMMY)) {

randomizer/CompileHints.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3258,7 +3258,25 @@ def IsMultipathHintTooLong(message):
32583258
if character in measure_message_size:
32593259
measure_message_size = measure_message_size.replace(character, "")
32603260
measure_message_size_nospace = measure_message_size.replace(" ", "")
3261-
return len(message) > 255 or len(measure_message_size) > 150 or len(measure_message_size_nospace) > 125
3261+
# Also account for the fact that words are kept together when splitting across lines
3262+
cutOff_1 = getNumberOfCutoffCharacters(measure_message_size, 50)
3263+
cutOff_2 = getNumberOfCutoffCharacters(measure_message_size[(50 - cutOff_1) :], 50)
3264+
effective_length = len(measure_message_size) + cutOff_1 + cutOff_2
3265+
return len(message) > 255 or effective_length > 150 or len(measure_message_size_nospace) > 125
3266+
3267+
3268+
def getNumberOfCutoffCharacters(message, number):
3269+
"""Determine how many characters early a line would get cut off."""
3270+
if number < 2 or len(message) < (number - 1):
3271+
return 0
3272+
index = number - 1
3273+
initial_index = index
3274+
while message[index] != " ":
3275+
index -= 1
3276+
if index == 0:
3277+
index = initial_index
3278+
break
3279+
return initial_index - index
32623280

32633281

32643282
def AssociateHintsWithFlags(spoiler):

randomizer/Lists/CustomLocations.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ class LocationTypes(IntEnum):
377377
rot_y=3305,
378378
max_size=64,
379379
logic_region=Regions.JapesUselessSlope,
380+
banned_types=[LocationTypes.MelonCrate],
380381
group=2,
381382
),
382383
CustomLocation(

randomizer/Logic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,8 @@ def HintAccess(self, location, region_id):
943943
# The only weird exception: vanilla Fungi Lobby hint doors only check for Chunky, not the current Kong, and all besides Chunky's needs grab
944944
if not self.settings.wrinkly_location_rando and not self.settings.remove_wrinkly_puzzles and region_id == RegionEnum.FungiForestLobby:
945945
return self.chunky and (location.kong == Kongs.chunky or (self.donkey and self.grab))
946-
return self.HasKong(location.kong)
946+
# Last step: either have the kong or have Kongless Hint Doors enabled
947+
return self.HasKong(location.kong) or self.settings.wrinkly_available
947948

948949
def CanBuy(self, location, buy_empty=False):
949950
"""Check if there are enough coins to purchase this location."""

static/patches/shrink-dk64.bps

51 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)