mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Lingo: Add trap weights option (#2837)
This commit is contained in:
committed by
GitHub
parent
11b32f17ab
commit
44988d430d
@@ -1,13 +1,9 @@
|
||||
from typing import Dict, List, NamedTuple, Optional, TYPE_CHECKING
|
||||
|
||||
from BaseClasses import Item, ItemClassification
|
||||
from .options import ShuffleDoors
|
||||
from .static_logic import DOORS_BY_ROOM, PROGRESSION_BY_ROOM, PROGRESSIVE_ITEMS, get_door_group_item_id, \
|
||||
get_door_item_id, get_progressive_item_id, get_special_item_id
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from . import LingoWorld
|
||||
|
||||
|
||||
class ItemData(NamedTuple):
|
||||
"""
|
||||
@@ -19,20 +15,6 @@ class ItemData(NamedTuple):
|
||||
has_doors: bool
|
||||
painting_ids: List[str]
|
||||
|
||||
def should_include(self, world: "LingoWorld") -> bool:
|
||||
if self.mode == "colors":
|
||||
return world.options.shuffle_colors > 0
|
||||
elif self.mode == "doors":
|
||||
return world.options.shuffle_doors != ShuffleDoors.option_none
|
||||
elif self.mode == "complex door":
|
||||
return world.options.shuffle_doors == ShuffleDoors.option_complex
|
||||
elif self.mode == "door group":
|
||||
return world.options.shuffle_doors == ShuffleDoors.option_simple
|
||||
elif self.mode == "special":
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
class LingoItem(Item):
|
||||
"""
|
||||
@@ -44,6 +26,8 @@ class LingoItem(Item):
|
||||
ALL_ITEM_TABLE: Dict[str, ItemData] = {}
|
||||
ITEMS_BY_GROUP: Dict[str, List[str]] = {}
|
||||
|
||||
TRAP_ITEMS: List[str] = ["Slowness Trap", "Iceland Trap", "Atbash Trap"]
|
||||
|
||||
|
||||
def load_item_data():
|
||||
global ALL_ITEM_TABLE, ITEMS_BY_GROUP
|
||||
@@ -87,9 +71,7 @@ def load_item_data():
|
||||
"The Feeling of Being Lost": ItemClassification.filler,
|
||||
"Wanderlust": ItemClassification.filler,
|
||||
"Empty White Hallways": ItemClassification.filler,
|
||||
"Slowness Trap": ItemClassification.trap,
|
||||
"Iceland Trap": ItemClassification.trap,
|
||||
"Atbash Trap": ItemClassification.trap,
|
||||
**{trap_name: ItemClassification.trap for trap_name in TRAP_ITEMS},
|
||||
"Puzzle Skip": ItemClassification.useful,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user