Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2ef4929
RAC: Starting item fixes
Myth197 Aug 9, 2025
635384c
RAC: Progressive items defines
Myth197 Aug 9, 2025
87ef3fb
RAC: Progressive items Pools
Myth197 Aug 9, 2025
0717f37
RAC: Progressive items Classification and counts
Myth197 Aug 9, 2025
ca222d4
RAC: Add Progressive Options
Myth197 Aug 10, 2025
5301b59
RAC: Progressive Pool Cleanup
Myth197 Aug 10, 2025
4a4a6da
RAC: Check Progressive Options for Items
Myth197 Aug 10, 2025
f54abbc
Merge remote-tracking branch 'RAC-Upstream/Logic' into Logic
Myth197 Aug 17, 2025
2a5680f
RAC: Starting Location Option
Myth197 Aug 17, 2025
478310c
RAC: Move all golden weapons to Novalis
Myth197 Aug 18, 2025
fa1a299
RAC: Add display names and rich text tags to Options
Myth197 Aug 18, 2025
c1704e9
RAC: Make Weapons and Gold Weapons shuffle together when both enabled
Myth197 Aug 18, 2025
760c7ff
RAC: Logging changes
Myth197 Aug 18, 2025
8b1d3b5
RAC: Starting Location changes
Myth197 Aug 19, 2025
f2d521c
RAC: Bolt Packs
Myth197 Aug 19, 2025
8f1039d
RAC: Weapon Fixes
Myth197 Aug 19, 2025
6d6fdac
RAC: Start Inventory Fixes
Myth197 Aug 19, 2025
1c8f91b
RAC: Shuffle fixes
Myth197 Aug 19, 2025
8d9e993
RAC: Disable Skillpoints
Myth197 Aug 19, 2025
ff6e29e
RAC: Fix Gold Weapon Numbering
Myth197 Aug 20, 2025
b3c51a3
RAC: Bolt and Gold Bolt Pack names
Myth197 Aug 22, 2025
644cd4a
RAC: Bolt Multiplier Options
Myth197 Aug 22, 2025
d3b3ea7
RAC: Starting Planet - Novalis Fix
Myth197 Aug 22, 2025
282a7b1
RAC: Vanilla Gold Bolts and Bolt Name Fixes
Myth197 Aug 22, 2025
69dfd3d
RAC: Progressive Item order
Myth197 Aug 22, 2025
5fce076
RAC: Generation fixes
Myth197 Aug 22, 2025
91e9b71
RAC: Item Pack rework
Myth197 Aug 24, 2025
714b9f0
RAC: Pack rework cleanup
Myth197 Aug 24, 2025
11b95f8
RAC: Starting Weapon, Golden Weapon Progressive, RYNO, and Progressiv…
Myth197 Aug 24, 2025
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
38 changes: 17 additions & 21 deletions worlds/RAC1/ItemPool.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,37 @@


def get_classification(item: ItemData) -> ItemClassification:
if item in Items.PLANETS:
if (item in Items.PLANETS
or item in Items.ALL_PACKS
or item in Items.GADGETS
or item in Items.ALL_BOOTS
or item in Items.GOLD_BOLTS):
return ItemClassification.progression
if item in [
Items.HELI_PACK,
Items.THRUSTER_PACK,
Items.HYDRO_PACK,
Items.SWINGSHOT,
Items.MAGNEBOOTS,
Items.GRINDBOOTS,
Items.HYDRODISPLACER,
Items.TAUNTER,
Items.O2_MASK,
Items.PILOTS_HELMET,
Items.TRESPASSER,
Items.HOLOGUISE,
Items.PROGRESSIVE_HELMET,
Items.CODEBOT,
Items.RARITANIUM,
Items.HOVERBOARD,
Items.ZOOMERATOR,
Items.PROGRESSIVE_HOVERBOARD,
Items.BOMB_GLOVE,
Items.PROGRESSIVE_BOMB,
Items.BLASTER,
Items.MINE_GLOVE,
Items.PROGRESSIVE_MINE,
Items.DEVASTATOR,
Items.PROGRESSIVE_DEVASTATOR,
Items.VISIBOMB,
Items.METAL_DETECTOR,
Items.RYNO,
Items.PROGRESSIVE_TRADE,
]:
return ItemClassification.progression
if item in [
Items.BOLT_GRABBER,
Items.PERSUADER,
Items.PREMIUM_NANOTECH,
Items.ULTRA_NANOTECH,
]:
return ItemClassification.useful
if item in Items.WEAPONS:
return ItemClassification.useful
if item in Items.GOLDEN_WEAPONS:
if (item == Items.SONIC_SUMMONER
or item in Items.ALL_WEAPONS
or item in Items.ALL_EXTRA_ITEMS):
return ItemClassification.useful

return ItemClassification.filler
99 changes: 74 additions & 25 deletions worlds/RAC1/Logic.py
Original file line number Diff line number Diff line change
@@ -1,61 +1,63 @@
import logging

from BaseClasses import CollectionState
from .data import Items

rac_logger = logging.getLogger("Ratchet & Clank")
rac_logger.setLevel(logging.DEBUG)


def can_swingshot(state: CollectionState, player: int) -> bool:
return state.has(Items.SWINGSHOT.name, player)


def can_improved_jump(state: CollectionState, player: int) -> bool:
return state.has_any([Items.HELI_PACK.name, Items.THRUSTER_PACK.name], player)
return (state.has_any_count(Items.PROG[Items.HELI_PACK.name], player) or
state.has_any_count(Items.PROG[Items.THRUSTER_PACK.name], player))


def can_heli_high_jump(state: CollectionState, player: int) -> bool: # relevant for eudora gold bolt
return state.has(Items.HELI_PACK.name, player)
return state.has_any_count(Items.PROG[Items.HELI_PACK.name], player)


def can_glide(state: CollectionState, player: int) -> bool: # gliding is not possible without the heli pack
return state.has(Items.HELI_PACK.name, player)
return state.has_any_count(Items.PROG[Items.HELI_PACK.name], player)


def can_ground_pound(state: CollectionState, player: int) -> bool:
return state.has(Items.THRUSTER_PACK.name, player)
return state.has_any_count(Items.PROG[Items.THRUSTER_PACK.name], player)


def has_hydro_pack(state: CollectionState, player: int) -> bool:
return state.has(Items.HYDRO_PACK.name, player)
return state.has_any_count(Items.PROG[Items.HYDRO_PACK.name], player)


def can_grind(state: CollectionState, player: int) -> bool:
return state.has(Items.GRINDBOOTS.name, player)
return state.has_any_count(Items.PROG[Items.GRINDBOOTS.name], player)


def has_magneboots(state: CollectionState, player: int) -> bool:
return state.has(Items.MAGNEBOOTS.name, player)


def can_taunt(state: CollectionState, player: int) -> bool:
return state.has(Items.TAUNTER.name, player)
return state.has_any_count(Items.PROG[Items.MAGNEBOOTS.name], player)


def has_hydrodisplacer(state: CollectionState, player: int) -> bool:
return state.has(Items.HYDRODISPLACER.name, player)


def has_raritanium(state: CollectionState, player: int) -> bool:
return state.has(Items.RARITANIUM.name, player)
return state.has_any_count(Items.PROG[Items.RARITANIUM.name], player)


def has_zoomerator(state: CollectionState, player: int) -> bool:
return state.has(Items.ZOOMERATOR.name, player)
return state.has_any_count(Items.PROG[Items.ZOOMERATOR.name], player)


def has_hoverboard(state: CollectionState, player: int) -> bool:
return state.has(Items.HOVERBOARD.name, player)
return state.has_any_count(Items.PROG[Items.HOVERBOARD.name], player)


def has_o2_mask(state: CollectionState, player: int) -> bool:
return state.has(Items.O2_MASK.name, player)
return state.has_any_count(Items.PROG[Items.O2_MASK.name], player)


def has_trespasser(state: CollectionState, player: int) -> bool:
Expand All @@ -71,7 +73,7 @@ def has_hologuise(state: CollectionState, player: int) -> bool:


def has_pilots_helmet(state: CollectionState, player: int) -> bool:
return state.has(Items.PILOTS_HELMET.name, player)
return state.has_any_count(Items.PROG[Items.PILOTS_HELMET.name], player)


def has_codebot(state: CollectionState, player: int) -> bool:
Expand All @@ -81,26 +83,73 @@ def has_codebot(state: CollectionState, player: int) -> bool:
def has_taunter(state: CollectionState, player: int) -> bool:
return state.has(Items.TAUNTER.name, player)


# TODO Logic for accessing dig spots on each planet
def has_metal_detector(state: CollectionState, player: int) -> bool:
return state.has(Items.METAL_DETECTOR.name, player)


def has_explosive_weapon(state: CollectionState, player: int) -> bool:
return (state.has_any(
[Items.BOMB_GLOVE.name, Items.MINE_GLOVE.name, Items.DEVASTATOR.name, Items.VISIBOMB.name, Items.RYNO.name],
player))
return (state.has_any_count(Items.PROG[Items.BOMB_GLOVE.name], player) or
state.has_any_count(Items.PROG[Items.MINE_GLOVE.name], player) or
state.has_any_count(Items.PROG[Items.DEVASTATOR.name], player) or
state.has_any([Items.VISIBOMB.name, Items.RYNO.name], player))


def has_long_range_weapon(state: CollectionState, player: int) -> bool:
return (state.has_any([Items.BLASTER.name,
Items.DEVASTATOR.name,
Items.VISIBOMB.name,
Items.RYNO.name], player))
return (state.has_any_count(Items.PROG[Items.BLASTER.name], player) or
state.has_any_count(Items.PROG[Items.DEVASTATOR.name], player) or
state.has_any([Items.VISIBOMB.name, Items.RYNO.name], player))


def has_40_gold_bolts(state: CollectionState, player: int) -> bool:
return state.has(Items.GOLD_BOLT.name, player, 40)
lookup: dict[int, tuple[str, int]] = {
1: (Items.GOLD_BOLT_1.name, 40),
2: (Items.GOLD_BOLT_2.name, 20),
3: (Items.GOLD_BOLT_3.name, 14),
4: (Items.GOLD_BOLT_4.name, 10),
5: (Items.GOLD_BOLT_5.name, 8),
6: (Items.GOLD_BOLT_6.name, 7),
7: (Items.GOLD_BOLT_7.name, 6),
8: (Items.GOLD_BOLT_8.name, 5),
9: (Items.GOLD_BOLT_9.name, 5),
10: (Items.GOLD_BOLT_10.name, 4),
11: (Items.GOLD_BOLT_11.name, 4),
12: (Items.GOLD_BOLT_12.name, 4),
13: (Items.GOLD_BOLT_13.name, 4),
14: (Items.GOLD_BOLT_14.name, 3),
15: (Items.GOLD_BOLT_15.name, 3),
16: (Items.GOLD_BOLT_16.name, 3),
17: (Items.GOLD_BOLT_17.name, 3),
18: (Items.GOLD_BOLT_18.name, 3),
19: (Items.GOLD_BOLT_19.name, 3),
20: (Items.GOLD_BOLT_20.name, 2),
21: (Items.GOLD_BOLT_21.name, 2),
22: (Items.GOLD_BOLT_22.name, 2),
23: (Items.GOLD_BOLT_23.name, 2),
24: (Items.GOLD_BOLT_24.name, 2),
25: (Items.GOLD_BOLT_25.name, 2),
26: (Items.GOLD_BOLT_26.name, 2),
27: (Items.GOLD_BOLT_27.name, 2),
28: (Items.GOLD_BOLT_28.name, 2),
29: (Items.GOLD_BOLT_29.name, 2),
30: (Items.GOLD_BOLT_30.name, 2),
31: (Items.GOLD_BOLT_31.name, 2),
32: (Items.GOLD_BOLT_32.name, 2),
33: (Items.GOLD_BOLT_33.name, 2),
34: (Items.GOLD_BOLT_34.name, 2),
35: (Items.GOLD_BOLT_35.name, 2),
36: (Items.GOLD_BOLT_36.name, 2),
37: (Items.GOLD_BOLT_37.name, 2),
38: (Items.GOLD_BOLT_38.name, 2),
39: (Items.GOLD_BOLT_39.name, 2),
40: (Items.GOLD_BOLT_40.name, 1),
}
item, count = lookup[state.multiworld.worlds[player].options.pack_size_gold_bolts.value]
if state.count(item, player) < count:
rac_logger.debug(f"Missing gold bolt packs from world, expected {count} but only had"
f" {state.count(item, player)}. Can reach "
f"{state.prog_items}")
return state.has(item, player, count)


# Novalis
Expand Down
Loading