forked from mirror/Archipelago
Some checks failed
Analyze modified files / flake8 (push) Failing after 2m28s
Build / build-win (push) Has been cancelled
Build / build-ubuntu2204 (push) Has been cancelled
ctest / Test C++ ubuntu-latest (push) Has been cancelled
ctest / Test C++ windows-latest (push) Has been cancelled
Analyze modified files / mypy (push) Has been cancelled
Build and Publish Docker Images / Push Docker image to Docker Hub (push) Successful in 5m4s
Native Code Static Analysis / scan-build (push) Failing after 5m2s
type check / pyright (push) Successful in 1m7s
unittests / Test Python 3.11.2 ubuntu-latest (push) Failing after 16m23s
unittests / Test Python 3.12 ubuntu-latest (push) Failing after 28m19s
unittests / Test Python 3.13 ubuntu-latest (push) Failing after 14m49s
unittests / Test hosting with 3.13 on ubuntu-latest (push) Successful in 5m0s
unittests / Test Python 3.13 macos-latest (push) Has been cancelled
unittests / Test Python 3.11 windows-latest (push) Has been cancelled
unittests / Test Python 3.13 windows-latest (push) Has been cancelled
173 lines
9.5 KiB
Python
173 lines
9.5 KiB
Python
# fmt: off
|
|
"""Collectible logic file for Crystal Caves."""
|
|
|
|
from randomizer.Enums.Collectibles import Collectibles
|
|
from randomizer.Enums.Events import Events
|
|
from randomizer.Enums.Kongs import Kongs
|
|
from randomizer.Enums.Levels import Levels
|
|
from randomizer.Enums.Regions import Regions
|
|
from randomizer.Enums.Settings import RemovedBarriersSelected
|
|
from randomizer.LogicClasses import Collectible
|
|
|
|
LogicRegions = {
|
|
Regions.CrystalCavesMain: [
|
|
Collectible(Collectibles.bunch, Kongs.donkey, lambda l: True, None, 1), # Warp 1
|
|
Collectible(Collectibles.banana, Kongs.donkey, lambda l: True, None, 5), # Near BBlast
|
|
|
|
Collectible(Collectibles.banana, Kongs.diddy, lambda l: True, None, 5), # Near Funky
|
|
Collectible(Collectibles.bunch, Kongs.diddy, lambda l: l.jetpack, None, 1), # Near Bonus
|
|
Collectible(Collectibles.bunch, Kongs.diddy, lambda l: l.jetpack or l.advanced_platforming, None, 1), # Warp 4 pillar
|
|
Collectible(Collectibles.balloon, Kongs.diddy, lambda l: l.peanut, None, 1), # Near Warp 4 pillar
|
|
|
|
Collectible(Collectibles.banana, Kongs.lanky, lambda l: True, None, 5), # Level Start
|
|
Collectible(Collectibles.bunch, Kongs.lanky, lambda l: (l.balloon or l.advanced_platforming) and l.CanSlamSwitch(Levels.CrystalCaves, 2), None, 1), # Beetle Race entry
|
|
Collectible(Collectibles.bunch, Kongs.lanky, lambda l: l.balloon, None, 3), # Near Cranky
|
|
|
|
Collectible(Collectibles.banana, Kongs.tiny, lambda l: True, None, 10), # River To Igloo
|
|
Collectible(Collectibles.bunch, Kongs.tiny, lambda l: l.mini or l.CanPhase(), None, 1), # Warp 3 cave
|
|
|
|
Collectible(Collectibles.bunch, Kongs.chunky, lambda l: True, None, 1), # Warp 2
|
|
Collectible(Collectibles.bunch, Kongs.chunky, lambda l: True, None, 1), # On small boulder switch
|
|
Collectible(Collectibles.bunch, Kongs.chunky, lambda l: l.barrels, None, 1), # Underneath small boulder
|
|
Collectible(Collectibles.banana, Kongs.chunky, lambda l: True, None, 3), # On bridge to small boulder switch
|
|
|
|
Collectible(Collectibles.coin, Kongs.diddy, lambda l: True, None, 4), # On ice castle
|
|
Collectible(Collectibles.coin, Kongs.lanky, lambda l: True, None, 3), # In water below Funky
|
|
Collectible(Collectibles.coin, Kongs.tiny, lambda l: l.twirl, None, 2), # Pillar above warps
|
|
Collectible(Collectibles.coin, Kongs.tiny, lambda l: True, None, 3), # In front of tunnel to W4 cave
|
|
Collectible(Collectibles.coin, Kongs.chunky, lambda l: True, None, 3), # On slippery slope to Cranky
|
|
],
|
|
Regions.CavesGGRoom: [
|
|
Collectible(Collectibles.balloon, Kongs.donkey, lambda l: l.coconut, None, 1), # GG room balloon
|
|
Collectible(Collectibles.bunch, Kongs.chunky, lambda l: True, None, 1), # Gorilla Gone room
|
|
Collectible(Collectibles.banana, Kongs.chunky, lambda l: True, None, 3), # GG room singles
|
|
|
|
Collectible(Collectibles.coin, Kongs.donkey, lambda l: True, None, 3), # GG room coins
|
|
],
|
|
Regions.CavesSnideArea: [
|
|
Collectible(Collectibles.banana, Kongs.chunky, lambda l: True, None, 3), # Near Snide
|
|
Collectible(Collectibles.balloon, Kongs.chunky, lambda l: l.pineapple, None, 1), # Near Snide
|
|
|
|
Collectible(Collectibles.coin, Kongs.chunky, lambda l: True, None, 3), # Snide's room
|
|
],
|
|
Regions.CavesBlueprintCave: [
|
|
Collectible(Collectibles.bunch, Kongs.diddy, lambda l: True, None, 1), # Warp 4 cave
|
|
Collectible(Collectibles.banana, Kongs.diddy, lambda l: True, None, 5), # Warp 4 cave
|
|
|
|
Collectible(Collectibles.balloon, Kongs.tiny, lambda l: l.feather, None, 1), # Warp 4 cave
|
|
],
|
|
Regions.CavesBonusCave: [
|
|
Collectible(Collectibles.balloon, Kongs.chunky, lambda l: l.pineapple, None, 1), # Warp 3 cave
|
|
|
|
Collectible(Collectibles.coin, Kongs.chunky, lambda l: True, None, 3), # Warp 3 cave
|
|
],
|
|
Regions.CavesBlueprintPillar: [
|
|
Collectible(Collectibles.bunch, Kongs.lanky, lambda l: True, None, 4), # Warp 5 platform
|
|
],
|
|
Regions.CavesBananaportSpire: [
|
|
],
|
|
Regions.CavesBaboonBlast: [
|
|
Collectible(Collectibles.bunch, Kongs.donkey, lambda l: True, None, 4),
|
|
|
|
Collectible(Collectibles.coin, Kongs.donkey, lambda l: True, None, 3),
|
|
],
|
|
Regions.BoulderCave: [
|
|
Collectible(Collectibles.banana, Kongs.donkey, lambda l: True, None, 3),
|
|
Collectible(Collectibles.balloon, Kongs.donkey, lambda l: l.coconut, None, 1),
|
|
|
|
Collectible(Collectibles.banana, Kongs.chunky, lambda l: Events.CavesSmallBoulderButton in l.Events or l.CanPhase(), None, 6),
|
|
Collectible(Collectibles.bunch, Kongs.chunky, lambda l: Events.CavesSmallBoulderButton in l.Events and l.hunkyChunky and l.barrels, None, 1),
|
|
|
|
Collectible(Collectibles.coin, Kongs.donkey, lambda l: True, None, 3),
|
|
],
|
|
Regions.CavesLankyRace: [
|
|
],
|
|
Regions.FrozenCastle: [
|
|
Collectible(Collectibles.balloon, Kongs.lanky, lambda l: l.grape, None, 1),
|
|
|
|
Collectible(Collectibles.coin, Kongs.lanky, lambda l: True, None, 2),
|
|
],
|
|
Regions.IglooArea: [
|
|
Collectible(Collectibles.bunch, Kongs.donkey, lambda l: True, None, 1), # Warp 1
|
|
Collectible(Collectibles.banana, Kongs.donkey, lambda l: True, None, 5), # Around Igloo
|
|
|
|
Collectible(Collectibles.bunch, Kongs.diddy, lambda l: l.jetpack, None, 4), # Above igloos
|
|
|
|
Collectible(Collectibles.bunch, Kongs.tiny, lambda l: True, None, 1), # Warp 3
|
|
Collectible(Collectibles.bunch, Kongs.tiny, lambda l: Events.CavesMonkeyportAccess in l.Events or l.CanPhaseswim(), None, 1), # Monkeyport Ice Shield
|
|
|
|
Collectible(Collectibles.banana, Kongs.chunky, lambda l: Events.CavesLargeBoulderButton in l.Events or l.generalclips or l.CanPhaseswim(), None, 5), # Ice Shield
|
|
|
|
Collectible(Collectibles.coin, Kongs.lanky, lambda l: True, None, 3), # In water by pillar
|
|
Collectible(Collectibles.coin, Kongs.tiny, lambda l: True, None, 3), # In water behind W1
|
|
Collectible(Collectibles.coin, Kongs.chunky, lambda l: True, None, 3), # In water behind tag barrel
|
|
],
|
|
Regions.GiantKosha: [
|
|
Collectible(Collectibles.bunch, Kongs.tiny, lambda l: True, None, 4),
|
|
|
|
# Collectible(Collectibles.coin, Kongs.any, lambda l: l.shockwave, None, 1),
|
|
Collectible(Collectibles.coin, Kongs.tiny, lambda l: True, None, 3),
|
|
],
|
|
Regions.DonkeyIgloo: [
|
|
Collectible(Collectibles.banana, Kongs.donkey, lambda l: (l.strongKong or l.CanMoonkick()) and l.isdonkey, None, 7),
|
|
Collectible(Collectibles.bunch, Kongs.donkey, lambda l: True, None, 1),
|
|
Collectible(Collectibles.balloon, Kongs.donkey, lambda l: l.coconut, None, 1),
|
|
],
|
|
Regions.DiddyIgloo: [
|
|
Collectible(Collectibles.balloon, Kongs.diddy, lambda l: l.peanut, None, 1),
|
|
],
|
|
Regions.LankyIgloo: [
|
|
Collectible(Collectibles.banana, Kongs.lanky, lambda l: True, None, 1), # First single
|
|
Collectible(Collectibles.banana, Kongs.lanky, lambda l: l.balloon or l.advanced_platforming, None, 4), # Upper singles
|
|
Collectible(Collectibles.balloon, Kongs.lanky, lambda l: l.grape, None, 1),
|
|
],
|
|
Regions.TinyIgloo: [
|
|
Collectible(Collectibles.bunch, Kongs.tiny, lambda l: True, None, 1),
|
|
Collectible(Collectibles.balloon, Kongs.tiny, lambda l: l.feather, None, 1),
|
|
],
|
|
Regions.ChunkyIgloo: [
|
|
Collectible(Collectibles.balloon, Kongs.chunky, lambda l: l.pineapple, None, 1),
|
|
],
|
|
Regions.CabinArea: [
|
|
Collectible(Collectibles.bunch, Kongs.donkey, lambda l: True, None, 1),
|
|
Collectible(Collectibles.balloon, Kongs.diddy, lambda l: l.peanut, None, 1),
|
|
Collectible(Collectibles.banana, Kongs.lanky, lambda l: True, None, 10), # River
|
|
Collectible(Collectibles.balloon, Kongs.lanky, lambda l: l.grape, None, 1),
|
|
Collectible(Collectibles.balloon, Kongs.tiny, lambda l: l.feather, None, 1),
|
|
Collectible(Collectibles.bunch, Kongs.chunky, lambda l: True, None, 1), # Warp 2
|
|
|
|
Collectible(Collectibles.coin, Kongs.lanky, lambda l: True, None, 3), # Waterfall area, on ledge below Lanky Cabin
|
|
Collectible(Collectibles.coin, Kongs.chunky, lambda l: True, None, 3), # In corner near rocketbarrel
|
|
],
|
|
Regions.CavesSprintCabinRoof: [
|
|
Collectible(Collectibles.bunch, Kongs.lanky, lambda l: True, None, 1), # Top of Lanky cabin
|
|
],
|
|
Regions.RotatingCabin: [
|
|
Collectible(Collectibles.bunch, Kongs.donkey, lambda l: True, None, 1),
|
|
],
|
|
Regions.DonkeyCabin: [
|
|
Collectible(Collectibles.bunch, Kongs.donkey, lambda l: True, None, 1),
|
|
|
|
Collectible(Collectibles.coin, Kongs.donkey, lambda l: True, None, 2),
|
|
],
|
|
Regions.DiddyLowerCabin: [
|
|
Collectible(Collectibles.bunch, Kongs.diddy, lambda l: l.jetpack or l.advanced_platforming, None, 1),
|
|
Collectible(Collectibles.banana, Kongs.diddy, lambda l: True, None, 5),
|
|
|
|
Collectible(Collectibles.coin, Kongs.diddy, lambda l: l.jetpack or l.advanced_platforming, None, 4),
|
|
],
|
|
Regions.DiddyUpperCabin: [
|
|
Collectible(Collectibles.bunch, Kongs.diddy, lambda l: l.jetpack and (l.guitar or l.oranges) and (l.spring or l.CanMoontail()), None, 3),
|
|
],
|
|
Regions.LankyCabin: [
|
|
Collectible(Collectibles.bunch, Kongs.lanky, lambda l: True, None, 1),
|
|
],
|
|
Regions.TinyCabin: [
|
|
Collectible(Collectibles.bunch, Kongs.tiny, lambda l: True, None, 2),
|
|
Collectible(Collectibles.balloon, Kongs.tiny, lambda l: l.feather, None, 1),
|
|
],
|
|
Regions.ChunkyCabin: [
|
|
Collectible(Collectibles.bunch, Kongs.chunky, lambda l: l.gorillaGone and l.Slam, None, 4),
|
|
],
|
|
}
|