Core: move multiple Item properties into a single Flag (#638)

This commit is contained in:
Fabian Dill 2022-06-17 03:23:27 +02:00 committed by GitHub
parent 5be00e28dd
commit 6c525e1fe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 559 additions and 493 deletions

View File

@ -1,7 +1,7 @@
from __future__ import annotations from __future__ import annotations
import copy import copy
from enum import Enum, unique from enum import unique, IntEnum, IntFlag
import logging import logging
import json import json
import functools import functools
@ -911,7 +911,7 @@ class CollectionState():
@unique @unique
class RegionType(int, Enum): class RegionType(IntEnum):
Generic = 0 Generic = 0
LightWorld = 1 LightWorld = 1
DarkWorld = 2 DarkWorld = 2
@ -1066,7 +1066,7 @@ class Boss():
return f"Boss({self.name})" return f"Boss({self.name})"
class LocationProgressType(Enum): class LocationProgressType(IntEnum):
DEFAULT = 1 DEFAULT = 1
PRIORITY = 2 PRIORITY = 2
EXCLUDED = 3 EXCLUDED = 3
@ -1138,19 +1138,29 @@ class Location:
return "at " + self.name.replace("_", " ").replace("-", " ") return "at " + self.name.replace("_", " ").replace("-", " ")
class Item(): class ItemClassification(IntFlag):
filler = 0b0000 # aka trash, as in filler items like ammo, currency etc,
progression = 0b0001 # Item that is logically relevant
useful = 0b0010 # Item that is generally quite useful, but not required for anything logical
trap = 0b0100 # detrimental or entirely useless (nothing) item
skip_balancing = 0b1000 # should technically never occur on its own
# Item that is logically relevant, but progression balancing should not touch.
# Typically currency or other counted items.
progression_skip_balancing = 0b1001 # only progression gets balanced
def as_flag(self) -> int:
"""As Network API flag int."""
return self & 0b0111
class Item:
location: Optional[Location] = None location: Optional[Location] = None
world: Optional[MultiWorld] = None world: Optional[MultiWorld] = None
code: Optional[int] = None # an item with ID None is called an Event, and does not get written to multidata code: Optional[int] = None # an item with ID None is called an Event, and does not get written to multidata
name: str name: str
game: str = "Generic" game: str = "Generic"
type: str = None type: str = None
# indicates if this is a negative impact item. Causes these to be handled differently by various games. classification: ItemClassification
trap: bool = False
# change manually to ensure that a specific non-progression item never goes on an excluded location
never_exclude = False
# item is not considered by progression balancing despite being progression
skip_in_prog_balancing: bool = False
# need to find a decent place for these to live and to allow other games to register texts if they want. # need to find a decent place for these to live and to allow other games to register texts if they want.
pedestal_credit_text: str = "and the Unknown Item" pedestal_credit_text: str = "and the Unknown Item"
@ -1165,9 +1175,9 @@ class Item():
map: bool = False map: bool = False
compass: bool = False compass: bool = False
def __init__(self, name: str, advancement: bool, code: Optional[int], player: int): def __init__(self, name: str, classification: ItemClassification, code: Optional[int], player: int):
self.name = name self.name = name
self.advancement = advancement self.classification = classification
self.player = player self.player = player
self.code = code self.code = code
@ -1179,9 +1189,28 @@ class Item():
def pedestal_hint_text(self): def pedestal_hint_text(self):
return getattr(self, "_pedestal_hint_text", self.name.replace("_", " ").replace("-", " ")) return getattr(self, "_pedestal_hint_text", self.name.replace("_", " ").replace("-", " "))
@property
def advancement(self) -> bool:
return bool(self.classification & ItemClassification.progression)
@property
def skip_in_prog_balancing(self) -> bool:
return self.classification == ItemClassification.progression_skip_balancing
@property
def useful(self) -> bool:
return bool(self.classification & ItemClassification.useful)
@property
def trap(self) -> bool:
return bool(self.classification & ItemClassification.trap)
@property @property
def flags(self) -> int: def flags(self) -> int:
return self.advancement + (self.never_exclude << 1) + (self.trap << 2) new = self.classification.as_flag()
old = self.advancement + (self.useful << 1) + (self.trap << 2)
assert new == old
return new
def __eq__(self, other): def __eq__(self, other):
return self.name == other.name and self.player == other.player return self.name == other.name and self.player == other.player

View File

@ -144,7 +144,7 @@ def distribute_items_restrictive(world: MultiWorld) -> None:
for item in itempool: for item in itempool:
if item.advancement: if item.advancement:
progitempool.append(item) progitempool.append(item)
elif item.never_exclude: # this only gets nonprogression items which should not appear in excluded locations elif item.useful: # this only gets nonprogression items which should not appear in excluded locations
nonexcludeditempool.append(item) nonexcludeditempool.append(item)
elif item.name in world.local_items[item.player].value: elif item.name in world.local_items[item.player].value:
localrestitempool[item.player].append(item) localrestitempool[item.player].append(item)

View File

@ -235,7 +235,7 @@ class JSONtoTextParser(metaclass=HandlerMeta):
node["color"] = 'cyan' node["color"] = 'cyan'
elif flags & 0b001: # advancement elif flags & 0b001: # advancement
node["color"] = 'plum' node["color"] = 'plum'
elif flags & 0b010: # never_exclude elif flags & 0b010: # useful
node["color"] = 'slateblue' node["color"] = 'slateblue'
elif flags & 0b100: # trap elif flags & 0b100: # trap
node["color"] = 'salmon' node["color"] = 'salmon'

View File

@ -760,8 +760,6 @@ class ItemLinks(OptionList):
raise Exception(f"item_link {link['name']} has {intersection} items in both its local_items and non_local_items pool.") raise Exception(f"item_link {link['name']} has {intersection} items in both its local_items and non_local_items pool.")
per_game_common_options = { per_game_common_options = {
**common_options, # can be overwritten per-game **common_options, # can be overwritten per-game
"local_items": LocalItems, "local_items": LocalItems,

View File

@ -511,7 +511,7 @@ class KivyJSONtoTextParser(JSONtoTextParser):
flags = node.get("flags", 0) flags = node.get("flags", 0)
if flags & 0b001: # advancement if flags & 0b001: # advancement
itemtype = "progression" itemtype = "progression"
elif flags & 0b010: # never_exclude elif flags & 0b010: # useful
itemtype = "useful" itemtype = "useful"
elif flags & 0b100: # trap elif flags & 0b100: # trap
itemtype = "trap" itemtype = "trap"

View File

@ -6,7 +6,7 @@ import Utils
file_path = pathlib.Path(__file__).parent.parent file_path = pathlib.Path(__file__).parent.parent
Utils.local_path.cached_path = file_path Utils.local_path.cached_path = file_path
from BaseClasses import MultiWorld, CollectionState from BaseClasses import MultiWorld, CollectionState, ItemClassification
from worlds.alttp.Items import ItemFactory from worlds.alttp.Items import ItemFactory
@ -19,7 +19,7 @@ class TestBase(unittest.TestCase):
return self._state_cache[self.world, tuple(items)] return self._state_cache[self.world, tuple(items)]
state = CollectionState(self.world) state = CollectionState(self.world)
for item in items: for item in items:
item.advancement = True item.classification = ItemClassification.progression
state.collect(item) state.collect(item)
state.sweep_for_events() state.sweep_for_events()
self._state_cache[self.world, tuple(items)] = state self._state_cache[self.world, tuple(items)] = state

View File

@ -1,7 +1,7 @@
import unittest import unittest
from argparse import Namespace from argparse import Namespace
from BaseClasses import MultiWorld, CollectionState from BaseClasses import MultiWorld, CollectionState, ItemClassification
from worlds.alttp.Dungeons import create_dungeons, get_dungeon_item_pool from worlds.alttp.Dungeons import create_dungeons, get_dungeon_item_pool
from worlds.alttp.EntranceShuffle import mandatory_connections, connect_simple from worlds.alttp.EntranceShuffle import mandatory_connections, connect_simple
from worlds.alttp.ItemPool import difficulties, generate_itempool from worlds.alttp.ItemPool import difficulties, generate_itempool
@ -60,7 +60,7 @@ class TestDungeon(unittest.TestCase):
state.blocked_connections[1].add(exit) state.blocked_connections[1].add(exit)
for item in items: for item in items:
item.advancement = True item.classification = ItemClassification.progression
state.collect(item) state.collect(item)
self.assertEqual(self.world.get_location(location, 1).can_reach(state), access) self.assertEqual(self.world.get_location(location, 1).can_reach(state), access)

View File

@ -1,8 +1,9 @@
from typing import List from typing import List, Iterable
import unittest import unittest
from worlds.AutoWorld import World from worlds.AutoWorld import World
from Fill import FillError, balance_multiworld_progression, fill_restrictive, distribute_items_restrictive from Fill import FillError, balance_multiworld_progression, fill_restrictive, distribute_items_restrictive
from BaseClasses import Entrance, LocationProgressType, MultiWorld, Region, RegionType, Item, Location from BaseClasses import Entrance, LocationProgressType, MultiWorld, Region, RegionType, Item, Location, \
ItemClassification
from worlds.generic.Rules import CollectionRule, locality_rules, set_rule from worlds.generic.Rules import CollectionRule, locality_rules, set_rule
@ -108,14 +109,16 @@ def generate_locations(count: int, player_id: int, address: int = None, region:
def generate_items(count: int, player_id: int, advancement: bool = False, code: int = None) -> List[Item]: def generate_items(count: int, player_id: int, advancement: bool = False, code: int = None) -> List[Item]:
items = [] items = []
type = "prog" if advancement else "" item_type = "prog" if advancement else ""
for i in range(count): for i in range(count):
name = "player" + str(player_id) + "_" + type + "item" + str(i) name = "player" + str(player_id) + "_" + item_type + "item" + str(i)
items.append(Item(name, advancement, code, player_id)) items.append(Item(name,
ItemClassification.progression if advancement else ItemClassification.filler,
code, player_id))
return items return items
def names(objs: list) -> List[str]: def names(objs: list) -> Iterable[str]:
return map(lambda o: o.name, objs) return map(lambda o: o.name, objs)
@ -185,7 +188,7 @@ class TestFillRestrictive(unittest.TestCase):
items = player1.prog_items items = player1.prog_items
locations = player1.locations locations = player1.locations
multi_world.accessibility[player1.id] = 'minimal' multi_world.accessibility[player1.id].value = multi_world.accessibility[player1.id].option_minimal
multi_world.completion_condition[player1.id] = lambda state: state.has( multi_world.completion_condition[player1.id] = lambda state: state.has(
items[1].name, player1.id) items[1].name, player1.id)
set_rule(locations[1], lambda state: state.has( set_rule(locations[1], lambda state: state.has(
@ -400,7 +403,7 @@ class TestDistributeItemsRestrictive(unittest.TestCase):
basic_items = player1.basic_items basic_items = player1.basic_items
locations[1].progress_type = LocationProgressType.EXCLUDED locations[1].progress_type = LocationProgressType.EXCLUDED
basic_items[1].never_exclude = True basic_items[1].classification = ItemClassification.useful
distribute_items_restrictive(multi_world) distribute_items_restrictive(multi_world)
@ -427,8 +430,8 @@ class TestDistributeItemsRestrictive(unittest.TestCase):
locations[1].progress_type = LocationProgressType.EXCLUDED locations[1].progress_type = LocationProgressType.EXCLUDED
locations[2].progress_type = LocationProgressType.EXCLUDED locations[2].progress_type = LocationProgressType.EXCLUDED
basic_items[0].never_exclude = True basic_items[0].classification = ItemClassification.useful
basic_items[1].never_exclude = True basic_items[1].classification = ItemClassification.useful
self.assertRaises(FillError, distribute_items_restrictive, multi_world) self.assertRaises(FillError, distribute_items_restrictive, multi_world)
@ -569,7 +572,7 @@ class TestDistributeItemsRestrictive(unittest.TestCase):
multi_world, 2, location_count=5, basic_item_count=5) multi_world, 2, location_count=5, basic_item_count=5)
for item in multi_world.get_items(): for item in multi_world.get_items():
item.never_exclude = True item.classification = ItemClassification.useful
multi_world.local_items[player1.id].value = set(names(player1.basic_items)) multi_world.local_items[player1.id].value = set(names(player1.basic_items))
multi_world.local_items[player2.id].value = set(names(player2.basic_items)) multi_world.local_items[player2.id].value = set(names(player2.basic_items))
@ -625,8 +628,7 @@ class TestBalanceMultiworldProgression(unittest.TestCase):
# Sphere 3 # Sphere 3
region = player2.generate_region( region = player2.generate_region(
player2.menu, 20, lambda state: state.has(player2.prog_items[0].name, player2.id)) player2.menu, 20, lambda state: state.has(player2.prog_items[0].name, player2.id))
items = fillRegion(multi_world, region, [ fillRegion(multi_world, region, [player2.prog_items[1]] + items)
player2.prog_items[1]] + items)
def test_balances_progression(self) -> None: def test_balances_progression(self) -> None:
self.multi_world.progression_balancing[self.player1.id].value = 50 self.multi_world.progression_balancing[self.player1.id].value = 50

View File

@ -1,6 +1,6 @@
import worlds.minecraft.Options import worlds.minecraft.Options
from test.TestBase import TestBase from test.TestBase import TestBase
from BaseClasses import MultiWorld from BaseClasses import MultiWorld, ItemClassification
from worlds import AutoWorld from worlds import AutoWorld
from worlds.minecraft import MinecraftWorld from worlds.minecraft import MinecraftWorld
from worlds.minecraft.Items import MinecraftItem, item_table from worlds.minecraft.Items import MinecraftItem, item_table
@ -16,7 +16,10 @@ def MCItemFactory(items, player: int):
singleton = True singleton = True
for item in items: for item in items:
if item in item_table: if item in item_table:
ret.append(MinecraftItem(item, item_table[item].progression, item_table[item].code, player)) ret.append(MinecraftItem(
item, ItemClassification.progression if item_table[item].progression else ItemClassification.filler,
item_table[item].code, player
))
else: else:
raise Exception(f"Unknown item {item}") raise Exception(f"Unknown item {item}")

View File

@ -1,7 +1,7 @@
from collections import namedtuple from collections import namedtuple
import logging import logging
from BaseClasses import Region, RegionType from BaseClasses import Region, RegionType, ItemClassification
from worlds.alttp.SubClasses import ALttPLocation from worlds.alttp.SubClasses import ALttPLocation
from worlds.alttp.Shops import TakeAny, total_shop_slots, set_up_shops, shuffle_shops from worlds.alttp.Shops import TakeAny, total_shop_slots, set_up_shops, shuffle_shops
from worlds.alttp.Bosses import place_bosses from worlds.alttp.Bosses import place_bosses
@ -395,11 +395,11 @@ def generate_itempool(world):
# rather than making all hearts/heart pieces progression items (which slows down generation considerably) # rather than making all hearts/heart pieces progression items (which slows down generation considerably)
# We mark one random heart container as an advancement item (or 4 heart pieces in expert mode) # We mark one random heart container as an advancement item (or 4 heart pieces in expert mode)
if world.goal[player] != 'icerodhunt' and world.difficulty[player] in ['easy', 'normal', 'hard'] and not (world.custom and world.customitemarray[30] == 0): if world.goal[player] != 'icerodhunt' and world.difficulty[player] in ['easy', 'normal', 'hard'] and not (world.custom and world.customitemarray[30] == 0):
next(item for item in items if item.name == 'Boss Heart Container').advancement = True next(item for item in items if item.name == 'Boss Heart Container').classification = ItemClassification.progression
elif world.goal[player] != 'icerodhunt' and world.difficulty[player] in ['expert'] and not (world.custom and world.customitemarray[29] < 4): elif world.goal[player] != 'icerodhunt' and world.difficulty[player] in ['expert'] and not (world.custom and world.customitemarray[29] < 4):
adv_heart_pieces = (item for item in items if item.name == 'Piece of Heart') adv_heart_pieces = (item for item in items if item.name == 'Piece of Heart')
for i in range(4): for i in range(4):
next(adv_heart_pieces).advancement = True next(adv_heart_pieces).classification = ItemClassification.progression
progressionitems = [] progressionitems = []

View File

@ -1,5 +1,6 @@
import typing import typing
from BaseClasses import ItemClassification as IC
def GetBeemizerItem(world, player: int, item): def GetBeemizerItem(world, player: int, item):
item_name = item if isinstance(item, str) else item.name item_name = item if isinstance(item, str) else item.name
@ -39,7 +40,7 @@ def ItemFactory(items, player: int):
class ItemData(typing.NamedTuple): class ItemData(typing.NamedTuple):
advancement: bool classification: IC
type: typing.Optional[str] type: typing.Optional[str]
item_code: typing.Union[typing.Optional[int], typing.Iterable[int]] item_code: typing.Union[typing.Optional[int], typing.Iterable[int]]
pedestal_hint: typing.Optional[str] pedestal_hint: typing.Optional[str]
@ -49,174 +50,172 @@ class ItemData(typing.NamedTuple):
witch_credit: typing.Optional[str] witch_credit: typing.Optional[str]
flute_boy_credit: typing.Optional[str] flute_boy_credit: typing.Optional[str]
hint_text: typing.Optional[str] hint_text: typing.Optional[str]
trap: bool = False
# Format: Name: (Advancement, Type, ItemCode, Pedestal Hint Text, Pedestal Credit Text, Sick Kid Credit Text, Zora Credit Text, Witch Credit Text, Flute Boy Credit Text, Hint Text) # Format: Name: (Advancement, Type, ItemCode, Pedestal Hint Text, Pedestal Credit Text, Sick Kid Credit Text, Zora Credit Text, Witch Credit Text, Flute Boy Credit Text, Hint Text)
item_table = {'Bow': ItemData(True, None, 0x0B, 'You have\nchosen the\narcher class.', 'the stick and twine', 'arrow-slinging kid', 'arrow sling for sale', 'witch and robin hood', 'archer boy shoots again', 'the Bow'), item_table = {'Bow': ItemData(IC.progression, None, 0x0B, 'You have\nchosen the\narcher class.', 'the stick and twine', 'arrow-slinging kid', 'arrow sling for sale', 'witch and robin hood', 'archer boy shoots again', 'the Bow'),
'Progressive Bow': ItemData(True, None, 0x64, 'You have\nchosen the\narcher class.', 'the stick and twine', 'arrow-slinging kid', 'arrow sling for sale', 'witch and robin hood', 'archer boy shoots again', 'a Bow'), 'Progressive Bow': ItemData(IC.progression, None, 0x64, 'You have\nchosen the\narcher class.', 'the stick and twine', 'arrow-slinging kid', 'arrow sling for sale', 'witch and robin hood', 'archer boy shoots again', 'a Bow'),
'Progressive Bow (Alt)': ItemData(True, None, 0x65, 'You have\nchosen the\narcher class.', 'the stick and twine', 'arrow-slinging kid', 'arrow sling for sale', 'witch and robin hood', 'archer boy shoots again', 'a Bow'), 'Progressive Bow (Alt)': ItemData(IC.progression, None, 0x65, 'You have\nchosen the\narcher class.', 'the stick and twine', 'arrow-slinging kid', 'arrow sling for sale', 'witch and robin hood', 'archer boy shoots again', 'a Bow'),
'Silver Arrows': ItemData(True, None, 0x58, 'Do you fancy\nsilver tipped\narrows?', 'and the ganonsbane','ganon-killing kid', 'ganon doom for sale', 'fungus for pork','archer boy shines again', 'the Silver Arrows'), 'Silver Arrows': ItemData(IC.progression, None, 0x58, 'Do you fancy\nsilver tipped\narrows?', 'and the ganonsbane','ganon-killing kid', 'ganon doom for sale', 'fungus for pork','archer boy shines again', 'the Silver Arrows'),
'Silver Bow': ItemData(True, None, 0x3B, 'Buy 1 Silver\nget Archery\nfor free.', 'the baconmaker', 'ganon-killing kid', 'ganon doom for sale', 'fungus for pork', 'archer boy shines again', 'the Silver Bow'), 'Silver Bow': ItemData(IC.progression, None, 0x3B, 'Buy 1 Silver\nget Archery\nfor free.', 'the baconmaker', 'ganon-killing kid', 'ganon doom for sale', 'fungus for pork', 'archer boy shines again', 'the Silver Bow'),
'Book of Mudora': ItemData(True, None, 0x1D, 'Hylian\nfor\nDingusses.', 'and the story book', 'the scholarly kid', 'moon runes for sale', 'drugs for literacy', 'book-worm boy can read again', 'the Book'), 'Book of Mudora': ItemData(IC.progression, None, 0x1D, 'Hylian\nfor\nDingusses.', 'and the story book', 'the scholarly kid', 'moon runes for sale', 'drugs for literacy', 'book-worm boy can read again', 'the Book'),
'Hammer': ItemData(True, None, 0x09, 'stop\nhammer time!', 'and m c hammer', 'hammer-smashing kid', 'm c hammer for sale', 'stop... hammer time', 'stop, hammer time', 'the Hammer'), 'Hammer': ItemData(IC.progression, None, 0x09, 'stop\nhammer time!', 'and m c hammer', 'hammer-smashing kid', 'm c hammer for sale', 'stop... hammer time', 'stop, hammer time', 'the Hammer'),
'Hookshot': ItemData(True, None, 0x0A, 'BOING!!!\nBOING!!!\nBOING!!!', 'and the tickle beam', 'tickle-monster kid', 'tickle beam for sale', 'witch and tickle boy', 'beam boy tickles again', 'the Hookshot'), 'Hookshot': ItemData(IC.progression, None, 0x0A, 'BOING!!!\nBOING!!!\nBOING!!!', 'and the tickle beam', 'tickle-monster kid', 'tickle beam for sale', 'witch and tickle boy', 'beam boy tickles again', 'the Hookshot'),
'Magic Mirror': ItemData(True, None, 0x1A, 'Isn\'t your\nreflection so\npretty?', 'the face reflector', 'the narcissistic kid', 'your face for sale', 'trades looking-glass', 'narcissistic boy is happy again', 'the Mirror'), 'Magic Mirror': ItemData(IC.progression, None, 0x1A, 'Isn\'t your\nreflection so\npretty?', 'the face reflector', 'the narcissistic kid', 'your face for sale', 'trades looking-glass', 'narcissistic boy is happy again', 'the Mirror'),
'Flute': ItemData(True, None, 0x14, 'Save the duck\nand fly to\nfreedom!', 'and the duck call', 'the duck-call kid', 'duck call for sale', 'duck-calls for trade', 'flute boy plays again', 'the Flute'), 'Flute': ItemData(IC.progression, None, 0x14, 'Save the duck\nand fly to\nfreedom!', 'and the duck call', 'the duck-call kid', 'duck call for sale', 'duck-calls for trade', 'flute boy plays again', 'the Flute'),
'Pegasus Boots': ItemData(True, None, 0x4B, 'Gotta go fast!', 'and the sprint shoes', 'the running-man kid', 'sprint shoe for sale', 'shrooms for speed', 'gotta-go-fast boy runs again', 'the Boots'), 'Pegasus Boots': ItemData(IC.progression, None, 0x4B, 'Gotta go fast!', 'and the sprint shoes', 'the running-man kid', 'sprint shoe for sale', 'shrooms for speed', 'gotta-go-fast boy runs again', 'the Boots'),
'Power Glove': ItemData(True, None, 0x1B, 'Now you can\nlift weak\nstuff!', 'and the grey mittens', 'body-building kid', 'lift glove for sale', 'fungus for gloves', 'body-building boy lifts again', 'the Glove'), 'Power Glove': ItemData(IC.progression, None, 0x1B, 'Now you can\nlift weak\nstuff!', 'and the grey mittens', 'body-building kid', 'lift glove for sale', 'fungus for gloves', 'body-building boy lifts again', 'the Glove'),
'Cape': ItemData(True, None, 0x19, 'Wear this to\nbecome\ninvisible!', 'the camouflage cape', 'red riding-hood kid', 'red hood for sale', 'hood from a hood', 'dapper boy hides again', 'the Cape'), 'Cape': ItemData(IC.progression, None, 0x19, 'Wear this to\nbecome\ninvisible!', 'the camouflage cape', 'red riding-hood kid', 'red hood for sale', 'hood from a hood', 'dapper boy hides again', 'the Cape'),
'Mushroom': ItemData(True, None, 0x29, 'I\'m a fun guy!\n\nI\'m a funghi!', 'and the legal drugs', 'the drug-dealing kid', 'legal drugs for sale', 'shroom swap', 'shroom boy sells drugs again', 'the Mushroom'), 'Mushroom': ItemData(IC.progression, None, 0x29, 'I\'m a fun guy!\n\nI\'m a funghi!', 'and the legal drugs', 'the drug-dealing kid', 'legal drugs for sale', 'shroom swap', 'shroom boy sells drugs again', 'the Mushroom'),
'Shovel': ItemData(True, None, 0x13, 'Can\n You\n Dig it?', 'and the spade', 'archaeologist kid', 'dirt spade for sale', 'can you dig it', 'shovel boy digs again', 'the Shovel'), 'Shovel': ItemData(IC.progression, None, 0x13, 'Can\n You\n Dig it?', 'and the spade', 'archaeologist kid', 'dirt spade for sale', 'can you dig it', 'shovel boy digs again', 'the Shovel'),
'Lamp': ItemData(True, None, 0x12, 'Baby, baby,\nbaby.\nLight my way!', 'and the flashlight', 'light-shining kid', 'flashlight for sale', 'fungus for illumination', 'illuminated boy can see again', 'the Lamp'), 'Lamp': ItemData(IC.progression, None, 0x12, 'Baby, baby,\nbaby.\nLight my way!', 'and the flashlight', 'light-shining kid', 'flashlight for sale', 'fungus for illumination', 'illuminated boy can see again', 'the Lamp'),
'Magic Powder': ItemData(True, None, 0x0D, 'you can turn\nanti-faeries\ninto faeries', 'and the magic sack', 'the sack-holding kid', 'magic sack for sale', 'the witch and assistant', 'magic boy plays marbles again', 'the Powder'), 'Magic Powder': ItemData(IC.progression, None, 0x0D, 'you can turn\nanti-faeries\ninto faeries', 'and the magic sack', 'the sack-holding kid', 'magic sack for sale', 'the witch and assistant', 'magic boy plays marbles again', 'the Powder'),
'Moon Pearl': ItemData(True, None, 0x1F, ' Bunny Link\n be\n gone!', 'and the jaw breaker', 'fortune-telling kid', 'lunar orb for sale', 'shrooms for moon rock', 'moon boy plays ball again', 'the Moon Pearl'), 'Moon Pearl': ItemData(IC.progression, None, 0x1F, ' Bunny Link\n be\n gone!', 'and the jaw breaker', 'fortune-telling kid', 'lunar orb for sale', 'shrooms for moon rock', 'moon boy plays ball again', 'the Moon Pearl'),
'Cane of Somaria': ItemData(True, None, 0x15, 'I make blocks\nto hold down\nswitches!', 'and the red blocks', 'the block-making kid', 'block stick for sale', 'block stick for trade', 'cane boy makes blocks again', 'the Red Cane'), 'Cane of Somaria': ItemData(IC.progression, None, 0x15, 'I make blocks\nto hold down\nswitches!', 'and the red blocks', 'the block-making kid', 'block stick for sale', 'block stick for trade', 'cane boy makes blocks again', 'the Red Cane'),
'Fire Rod': ItemData(True, None, 0x07, 'I\'m the hot\nrod. I make\nthings burn!', 'and the flamethrower', 'fire-starting kid', 'rage rod for sale', 'fungus for rage-rod', 'firestarter boy burns again', 'the Fire Rod'), 'Fire Rod': ItemData(IC.progression, None, 0x07, 'I\'m the hot\nrod. I make\nthings burn!', 'and the flamethrower', 'fire-starting kid', 'rage rod for sale', 'fungus for rage-rod', 'firestarter boy burns again', 'the Fire Rod'),
'Flippers': ItemData(True, None, 0x1E, 'fancy a swim?', 'and the toewebs', 'the swimming kid', 'finger webs for sale', 'shrooms let you swim', 'swimming boy swims again', 'the Flippers'), 'Flippers': ItemData(IC.progression, None, 0x1E, 'fancy a swim?', 'and the toewebs', 'the swimming kid', 'finger webs for sale', 'shrooms let you swim', 'swimming boy swims again', 'the Flippers'),
'Ice Rod': ItemData(True, None, 0x08, 'I\'m the cold\nrod. I make\nthings freeze!', 'and the freeze ray', 'the ice-bending kid', 'freeze ray for sale', 'fungus for ice-rod', 'ice-cube boy freezes again', 'the Ice Rod'), 'Ice Rod': ItemData(IC.progression, None, 0x08, 'I\'m the cold\nrod. I make\nthings freeze!', 'and the freeze ray', 'the ice-bending kid', 'freeze ray for sale', 'fungus for ice-rod', 'ice-cube boy freezes again', 'the Ice Rod'),
'Titans Mitts': ItemData(True, None, 0x1C, 'Now you can\nlift heavy\nstuff!', 'and the golden glove', 'body-building kid', 'carry glove for sale', 'fungus for bling-gloves', 'body-building boy has gold again', 'the Mitts'), 'Titans Mitts': ItemData(IC.progression, None, 0x1C, 'Now you can\nlift heavy\nstuff!', 'and the golden glove', 'body-building kid', 'carry glove for sale', 'fungus for bling-gloves', 'body-building boy has gold again', 'the Mitts'),
'Bombos': ItemData(True, None, 0x0F, 'Burn, baby,\nburn! Fear my\nring of fire!', 'and the swirly coin', 'coin-collecting kid', 'swirly coin for sale', 'shrooms for swirly-coin', 'medallion boy melts room again', 'Bombos'), 'Bombos': ItemData(IC.progression, None, 0x0F, 'Burn, baby,\nburn! Fear my\nring of fire!', 'and the swirly coin', 'coin-collecting kid', 'swirly coin for sale', 'shrooms for swirly-coin', 'medallion boy melts room again', 'Bombos'),
'Ether': ItemData(True, None, 0x10, 'This magic\ncoin freezes\neverything!', 'and the bolt coin', 'coin-collecting kid', 'bolt coin for sale', 'shrooms for bolt-coin', 'medallion boy sees floor again', 'Ether'), 'Ether': ItemData(IC.progression, None, 0x10, 'This magic\ncoin freezes\neverything!', 'and the bolt coin', 'coin-collecting kid', 'bolt coin for sale', 'shrooms for bolt-coin', 'medallion boy sees floor again', 'Ether'),
'Quake': ItemData(True, None, 0x11, 'Maxing out the\nRichter scale\nis what I do!', 'and the wavy coin', 'coin-collecting kid', 'wavy coin for sale', 'shrooms for wavy-coin', 'medallion boy shakes dirt again', 'Quake'), 'Quake': ItemData(IC.progression, None, 0x11, 'Maxing out the\nRichter scale\nis what I do!', 'and the wavy coin', 'coin-collecting kid', 'wavy coin for sale', 'shrooms for wavy-coin', 'medallion boy shakes dirt again', 'Quake'),
'Bottle': ItemData(True, None, 0x16, 'Now you can\nstore potions\nand stuff!', 'and the terrarium', 'the terrarium kid', 'terrarium for sale', 'special promotion', 'bottle boy has terrarium again', 'a bottle'), 'Bottle': ItemData(IC.progression, None, 0x16, 'Now you can\nstore potions\nand stuff!', 'and the terrarium', 'the terrarium kid', 'terrarium for sale', 'special promotion', 'bottle boy has terrarium again', 'a bottle'),
'Bottle (Red Potion)': ItemData(True, None, 0x2B, 'Hearty red goop!', 'and the red goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has red goo again', 'a bottle'), 'Bottle (Red Potion)': ItemData(IC.progression, None, 0x2B, 'Hearty red goop!', 'and the red goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has red goo again', 'a bottle'),
'Bottle (Green Potion)': ItemData(True, None, 0x2C, 'Refreshing green goop!', 'and the green goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has green goo again', 'a bottle'), 'Bottle (Green Potion)': ItemData(IC.progression, None, 0x2C, 'Refreshing green goop!', 'and the green goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has green goo again', 'a bottle'),
'Bottle (Blue Potion)': ItemData(True, None, 0x2D, 'Delicious blue goop!', 'and the blue goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has blue goo again', 'a bottle'), 'Bottle (Blue Potion)': ItemData(IC.progression, None, 0x2D, 'Delicious blue goop!', 'and the blue goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has blue goo again', 'a bottle'),
'Bottle (Fairy)': ItemData(True, None, 0x3D, 'Save me and I will revive you', 'and the captive', 'the tingle kid','hostage for sale', 'fairy dust and shrooms', 'bottle boy has friend again', 'a bottle'), 'Bottle (Fairy)': ItemData(IC.progression, None, 0x3D, 'Save me and I will revive you', 'and the captive', 'the tingle kid','hostage for sale', 'fairy dust and shrooms', 'bottle boy has friend again', 'a bottle'),
'Bottle (Bee)': ItemData(True, None, 0x3C, 'I will sting your foes a few times', 'and the sting buddy', 'the beekeeper kid', 'insect for sale', 'shroom pollenation', 'bottle boy has mad bee again', 'a bottle'), 'Bottle (Bee)': ItemData(IC.progression, None, 0x3C, 'I will sting your foes a few times', 'and the sting buddy', 'the beekeeper kid', 'insect for sale', 'shroom pollenation', 'bottle boy has mad bee again', 'a bottle'),
'Bottle (Good Bee)': ItemData(True, None, 0x48, 'I will sting your foes a whole lot!', 'and the sparkle sting', 'the beekeeper kid', 'insect for sale', 'shroom pollenation', 'bottle boy has beetor again', 'a bottle'), 'Bottle (Good Bee)': ItemData(IC.progression, None, 0x48, 'I will sting your foes a whole lot!', 'and the sparkle sting', 'the beekeeper kid', 'insect for sale', 'shroom pollenation', 'bottle boy has beetor again', 'a bottle'),
'Master Sword': ItemData(True, 'Sword', 0x50, 'I beat barries and pigs alike', 'and the master sword', 'sword-wielding kid', 'glow sword for sale', 'fungus for blue slasher', 'sword boy fights again', 'the Master Sword'), 'Master Sword': ItemData(IC.progression, 'Sword', 0x50, 'I beat barries and pigs alike', 'and the master sword', 'sword-wielding kid', 'glow sword for sale', 'fungus for blue slasher', 'sword boy fights again', 'the Master Sword'),
'Tempered Sword': ItemData(True, 'Sword', 0x02, 'I stole the\nblacksmith\'s\njob!', 'the tempered sword', 'sword-wielding kid', 'flame sword for sale', 'fungus for red slasher', 'sword boy fights again', 'the Tempered Sword'), 'Tempered Sword': ItemData(IC.progression, 'Sword', 0x02, 'I stole the\nblacksmith\'s\njob!', 'the tempered sword', 'sword-wielding kid', 'flame sword for sale', 'fungus for red slasher', 'sword boy fights again', 'the Tempered Sword'),
'Fighter Sword': ItemData(True, 'Sword', 0x49, 'A pathetic\nsword rests\nhere!', 'the tiny sword', 'sword-wielding kid', 'tiny sword for sale', 'fungus for tiny slasher', 'sword boy fights again', 'the Small Sword'), 'Fighter Sword': ItemData(IC.progression, 'Sword', 0x49, 'A pathetic\nsword rests\nhere!', 'the tiny sword', 'sword-wielding kid', 'tiny sword for sale', 'fungus for tiny slasher', 'sword boy fights again', 'the Small Sword'),
'Golden Sword': ItemData(True, 'Sword', 0x03, 'The butter\nsword rests\nhere!', 'and the butter sword', 'sword-wielding kid', 'butter for sale', 'cap churned to butter', 'sword boy fights again', 'the Golden Sword'), 'Golden Sword': ItemData(IC.progression, 'Sword', 0x03, 'The butter\nsword rests\nhere!', 'and the butter sword', 'sword-wielding kid', 'butter for sale', 'cap churned to butter', 'sword boy fights again', 'the Golden Sword'),
'Progressive Sword': ItemData(True, 'Sword', 0x5E, 'a better copy\nof your sword\nfor your time', 'the unknown sword', 'sword-wielding kid', 'sword for sale', 'fungus for some slasher', 'sword boy fights again', 'a Sword'), 'Progressive Sword': ItemData(IC.progression, 'Sword', 0x5E, 'a better copy\nof your sword\nfor your time', 'the unknown sword', 'sword-wielding kid', 'sword for sale', 'fungus for some slasher', 'sword boy fights again', 'a Sword'),
'Progressive Glove': ItemData(True, None, 0x61, 'a way to lift\nheavier things', 'and the lift upgrade', 'body-building kid', 'some glove for sale', 'fungus for gloves', 'body-building boy lifts again', 'a Glove'), 'Progressive Glove': ItemData(IC.progression, None, 0x61, 'a way to lift\nheavier things', 'and the lift upgrade', 'body-building kid', 'some glove for sale', 'fungus for gloves', 'body-building boy lifts again', 'a Glove'),
'Green Pendant': ItemData(True, 'Crystal', (0x04, 0x38, 0x62, 0x00, 0x69, 0x01), None, None, None, None, None, None, "the green pendant"), 'Green Pendant': ItemData(IC.progression, 'Crystal', (0x04, 0x38, 0x62, 0x00, 0x69, 0x01), None, None, None, None, None, None, "the green pendant"),
'Blue Pendant': ItemData(True, 'Crystal', (0x02, 0x34, 0x60, 0x00, 0x69, 0x02), None, None, None, None, None, None, "the blue pendant"), 'Blue Pendant': ItemData(IC.progression, 'Crystal', (0x02, 0x34, 0x60, 0x00, 0x69, 0x02), None, None, None, None, None, None, "the blue pendant"),
'Red Pendant': ItemData(True, 'Crystal', (0x01, 0x32, 0x60, 0x00, 0x69, 0x03), None, None, None, None, None, None, "the red pendant"), 'Red Pendant': ItemData(IC.progression, 'Crystal', (0x01, 0x32, 0x60, 0x00, 0x69, 0x03), None, None, None, None, None, None, "the red pendant"),
'Triforce': ItemData(True, None, 0x6A, '\n YOU WIN!', 'and the triforce', 'victorious kid', 'victory for sale', 'fungus for the win', 'greedy boy wins game again', 'the Triforce'), 'Triforce': ItemData(IC.progression, None, 0x6A, '\n YOU WIN!', 'and the triforce', 'victorious kid', 'victory for sale', 'fungus for the win', 'greedy boy wins game again', 'the Triforce'),
'Power Star': ItemData(True, None, 0x6B, 'a small victory', 'and the power star', 'star-struck kid', 'star for sale', 'see stars with shroom', 'mario powers up again', 'a Power Star'), 'Power Star': ItemData(IC.progression, None, 0x6B, 'a small victory', 'and the power star', 'star-struck kid', 'star for sale', 'see stars with shroom', 'mario powers up again', 'a Power Star'),
'Triforce Piece': ItemData(True, None, 0x6C, 'a small victory', 'and the thirdforce', 'triangular kid', 'triangle for sale', 'fungus for triangle', 'wise boy has triangle again', 'a Triforce Piece'), 'Triforce Piece': ItemData(IC.progression, None, 0x6C, 'a small victory', 'and the thirdforce', 'triangular kid', 'triangle for sale', 'fungus for triangle', 'wise boy has triangle again', 'a Triforce Piece'),
'Crystal 1': ItemData(True, 'Crystal', (0x02, 0x34, 0x64, 0x40, 0x7F, 0x06), None, None, None, None, None, None, "a blue crystal"), 'Crystal 1': ItemData(IC.progression, 'Crystal', (0x02, 0x34, 0x64, 0x40, 0x7F, 0x06), None, None, None, None, None, None, "a blue crystal"),
'Crystal 2': ItemData(True, 'Crystal', (0x10, 0x34, 0x64, 0x40, 0x79, 0x06), None, None, None, None, None, None, "a blue crystal"), 'Crystal 2': ItemData(IC.progression, 'Crystal', (0x10, 0x34, 0x64, 0x40, 0x79, 0x06), None, None, None, None, None, None, "a blue crystal"),
'Crystal 3': ItemData(True, 'Crystal', (0x40, 0x34, 0x64, 0x40, 0x6C, 0x06), None, None, None, None, None, None, "a blue crystal"), 'Crystal 3': ItemData(IC.progression, 'Crystal', (0x40, 0x34, 0x64, 0x40, 0x6C, 0x06), None, None, None, None, None, None, "a blue crystal"),
'Crystal 4': ItemData(True, 'Crystal', (0x20, 0x34, 0x64, 0x40, 0x6D, 0x06), None, None, None, None, None, None, "a blue crystal"), 'Crystal 4': ItemData(IC.progression, 'Crystal', (0x20, 0x34, 0x64, 0x40, 0x6D, 0x06), None, None, None, None, None, None, "a blue crystal"),
'Crystal 5': ItemData(True, 'Crystal', (0x04, 0x32, 0x64, 0x40, 0x6E, 0x06), None, None, None, None, None, None, "a red crystal"), 'Crystal 5': ItemData(IC.progression, 'Crystal', (0x04, 0x32, 0x64, 0x40, 0x6E, 0x06), None, None, None, None, None, None, "a red crystal"),
'Crystal 6': ItemData(True, 'Crystal', (0x01, 0x32, 0x64, 0x40, 0x6F, 0x06), None, None, None, None, None, None, "a red crystal"), 'Crystal 6': ItemData(IC.progression, 'Crystal', (0x01, 0x32, 0x64, 0x40, 0x6F, 0x06), None, None, None, None, None, None, "a red crystal"),
'Crystal 7': ItemData(True, 'Crystal', (0x08, 0x34, 0x64, 0x40, 0x7C, 0x06), None, None, None, None, None, None, "a blue crystal"), 'Crystal 7': ItemData(IC.progression, 'Crystal', (0x08, 0x34, 0x64, 0x40, 0x7C, 0x06), None, None, None, None, None, None, "a blue crystal"),
'Single Arrow': ItemData(False, None, 0x43, 'a lonely arrow\nsits here.', 'and the arrow', 'stick-collecting kid', 'sewing needle for sale', 'fungus for arrow', 'archer boy sews again', 'an arrow'), 'Single Arrow': ItemData(IC.filler, None, 0x43, 'a lonely arrow\nsits here.', 'and the arrow', 'stick-collecting kid', 'sewing needle for sale', 'fungus for arrow', 'archer boy sews again', 'an arrow'),
'Arrows (10)': ItemData(False, None, 0x44, 'This will give\nyou ten shots\nwith your bow!', 'and the arrow pack','stick-collecting kid', 'sewing kit for sale', 'fungus for arrows', 'archer boy sews again','ten arrows'), 'Arrows (10)': ItemData(IC.filler, None, 0x44, 'This will give\nyou ten shots\nwith your bow!', 'and the arrow pack','stick-collecting kid', 'sewing kit for sale', 'fungus for arrows', 'archer boy sews again','ten arrows'),
'Arrow Upgrade (+10)': ItemData(False, None, 0x54, 'increase arrow\nstorage, low\nlow price', 'and the quiver', 'quiver-enlarging kid', 'arrow boost for sale', 'witch and more skewers', 'upgrade boy sews more again', 'arrow capacity'), 'Arrow Upgrade (+10)': ItemData(IC.filler, None, 0x54, 'increase arrow\nstorage, low\nlow price', 'and the quiver', 'quiver-enlarging kid', 'arrow boost for sale', 'witch and more skewers', 'upgrade boy sews more again', 'arrow capacity'),
'Arrow Upgrade (+5)': ItemData(False, None, 0x53, 'increase arrow\nstorage, low\nlow price', 'and the quiver', 'quiver-enlarging kid', 'arrow boost for sale', 'witch and more skewers', 'upgrade boy sews more again', 'arrow capacity'), 'Arrow Upgrade (+5)': ItemData(IC.filler, None, 0x53, 'increase arrow\nstorage, low\nlow price', 'and the quiver', 'quiver-enlarging kid', 'arrow boost for sale', 'witch and more skewers', 'upgrade boy sews more again', 'arrow capacity'),
'Single Bomb': ItemData(False, None, 0x27, 'I make things\ngo BOOM! But\njust once.', 'and the explosion', 'the bomb-holding kid', 'firecracker for sale', 'blend fungus into bomb', '\'splosion boy explodes again', 'a bomb'), 'Single Bomb': ItemData(IC.filler, None, 0x27, 'I make things\ngo BOOM! But\njust once.', 'and the explosion', 'the bomb-holding kid', 'firecracker for sale', 'blend fungus into bomb', '\'splosion boy explodes again', 'a bomb'),
'Bombs (3)': ItemData(False, None, 0x28, 'I make things\ngo triple\nBOOM!!!', 'and the explosions', 'the bomb-holding kid', 'firecrackers for sale', 'blend fungus into bombs', '\'splosion boy explodes again', 'three bombs'), 'Bombs (3)': ItemData(IC.filler, None, 0x28, 'I make things\ngo triple\nBOOM!!!', 'and the explosions', 'the bomb-holding kid', 'firecrackers for sale', 'blend fungus into bombs', '\'splosion boy explodes again', 'three bombs'),
'Bombs (10)': ItemData(False, None, 0x31, 'I make things\ngo BOOM! Ten\ntimes!', 'and the explosions', 'the bomb-holding kid', 'firecrackers for sale', 'blend fungus into bombs', '\'splosion boy explodes again', 'ten bombs'), 'Bombs (10)': ItemData(IC.filler, None, 0x31, 'I make things\ngo BOOM! Ten\ntimes!', 'and the explosions', 'the bomb-holding kid', 'firecrackers for sale', 'blend fungus into bombs', '\'splosion boy explodes again', 'ten bombs'),
'Bomb Upgrade (+10)': ItemData(False, None, 0x52, 'increase bomb\nstorage, low\nlow price', 'and the bomb bag', 'boom-enlarging kid', 'bomb boost for sale', 'the shroom goes boom', 'upgrade boy explodes more again', 'bomb capacity'), 'Bomb Upgrade (+10)': ItemData(IC.filler, None, 0x52, 'increase bomb\nstorage, low\nlow price', 'and the bomb bag', 'boom-enlarging kid', 'bomb boost for sale', 'the shroom goes boom', 'upgrade boy explodes more again', 'bomb capacity'),
'Bomb Upgrade (+5)': ItemData(False, None, 0x51, 'increase bomb\nstorage, low\nlow price', 'and the bomb bag', 'boom-enlarging kid', 'bomb boost for sale', 'the shroom goes boom', 'upgrade boy explodes more again', 'bomb capacity'), 'Bomb Upgrade (+5)': ItemData(IC.filler, None, 0x51, 'increase bomb\nstorage, low\nlow price', 'and the bomb bag', 'boom-enlarging kid', 'bomb boost for sale', 'the shroom goes boom', 'upgrade boy explodes more again', 'bomb capacity'),
'Blue Mail': ItemData(False, None, 0x22, 'Now you\'re a\nblue elf!', 'and the banana hat', 'the protected kid', 'banana hat for sale', 'the clothing store', 'tailor boy banana hatted again', 'the Blue Mail'), 'Blue Mail': ItemData(IC.useful, None, 0x22, 'Now you\'re a\nblue elf!', 'and the banana hat', 'the protected kid', 'banana hat for sale', 'the clothing store', 'tailor boy banana hatted again', 'the Blue Mail'),
'Red Mail': ItemData(False, None, 0x23, 'Now you\'re a\nred elf!', 'and the eggplant hat', 'well-protected kid', 'purple hat for sale', 'the nice clothing store', 'tailor boy fears nothing again', 'the Red Mail'), 'Red Mail': ItemData(IC.useful, None, 0x23, 'Now you\'re a\nred elf!', 'and the eggplant hat', 'well-protected kid', 'purple hat for sale', 'the nice clothing store', 'tailor boy fears nothing again', 'the Red Mail'),
'Progressive Mail': ItemData(False, None, 0x60, 'time for a\nchange of\nclothes?', 'and the unknown hat', 'the protected kid', 'new hat for sale', 'the clothing store', 'tailor boy has threads again', 'some armor'), 'Progressive Mail': ItemData(IC.useful, None, 0x60, 'time for a\nchange of\nclothes?', 'and the unknown hat', 'the protected kid', 'new hat for sale', 'the clothing store', 'tailor boy has threads again', 'some armor'),
'Blue Boomerang': ItemData(True, None, 0x0C, 'No matter what\nyou do, blue\nreturns to you', 'and the bluemarang', 'the bat-throwing kid', 'bent stick for sale', 'fungus for puma-stick', 'throwing boy plays fetch again', 'the Blue Boomerang'), 'Blue Boomerang': ItemData(IC.progression, None, 0x0C, 'No matter what\nyou do, blue\nreturns to you', 'and the bluemarang', 'the bat-throwing kid', 'bent stick for sale', 'fungus for puma-stick', 'throwing boy plays fetch again', 'the Blue Boomerang'),
'Red Boomerang': ItemData(True, None, 0x2A, 'No matter what\nyou do, red\nreturns to you', 'and the badmarang', 'the bat-throwing kid', 'air foil for sale', 'fungus for return-stick', 'magical boy plays fetch again', 'the Red Boomerang'), 'Red Boomerang': ItemData(IC.progression, None, 0x2A, 'No matter what\nyou do, red\nreturns to you', 'and the badmarang', 'the bat-throwing kid', 'air foil for sale', 'fungus for return-stick', 'magical boy plays fetch again', 'the Red Boomerang'),
'Blue Shield': ItemData(False, None, 0x04, 'Now you can\ndefend against\npebbles!', 'and the stone blocker', 'shield-wielding kid', 'shield for sale', 'fungus for shield', 'shield boy defends again', 'the Blue Shield'), 'Blue Shield': ItemData(IC.filler, None, 0x04, 'Now you can\ndefend against\npebbles!', 'and the stone blocker', 'shield-wielding kid', 'shield for sale', 'fungus for shield', 'shield boy defends again', 'the Blue Shield'),
'Red Shield': ItemData(False, None, 0x05, 'Now you can\ndefend against\nfireballs!', 'and the shot blocker', 'shield-wielding kid', 'fire shield for sale', 'fungus for fire shield', 'shield boy defends again', 'the Red Shield'), 'Red Shield': ItemData(IC.filler, None, 0x05, 'Now you can\ndefend against\nfireballs!', 'and the shot blocker', 'shield-wielding kid', 'fire shield for sale', 'fungus for fire shield', 'shield boy defends again', 'the Red Shield'),
'Mirror Shield': ItemData(True, None, 0x06, 'Now you can\ndefend against\nlasers!', 'and the laser blocker', 'shield-wielding kid', 'face shield for sale', 'fungus for face shield', 'shield boy defends again', 'the Mirror Shield'), 'Mirror Shield': ItemData(IC.progression, None, 0x06, 'Now you can\ndefend against\nlasers!', 'and the laser blocker', 'shield-wielding kid', 'face shield for sale', 'fungus for face shield', 'shield boy defends again', 'the Mirror Shield'),
'Progressive Shield': ItemData(True, None, 0x5F, 'have a better\nblocker in\nfront of you', 'and the new shield', 'shield-wielding kid', 'shield for sale', 'fungus for shield', 'shield boy defends again', 'a shield'), 'Progressive Shield': ItemData(IC.progression, None, 0x5F, 'have a better\nblocker in\nfront of you', 'and the new shield', 'shield-wielding kid', 'shield for sale', 'fungus for shield', 'shield boy defends again', 'a shield'),
'Bug Catching Net': ItemData(True, None, 0x21, 'Let\'s catch\nsome bees and\nfaeries!', 'and the bee catcher', 'the bug-catching kid', 'stick web for sale', 'fungus for butterflies', 'wrong boy catches bees again', 'the Bug Net'), 'Bug Catching Net': ItemData(IC.progression, None, 0x21, 'Let\'s catch\nsome bees and\nfaeries!', 'and the bee catcher', 'the bug-catching kid', 'stick web for sale', 'fungus for butterflies', 'wrong boy catches bees again', 'the Bug Net'),
'Cane of Byrna': ItemData(True, None, 0x18, 'Use this to\nbecome\ninvincible!', 'and the bad cane', 'the spark-making kid', 'spark stick for sale', 'spark-stick for trade', 'cane boy encircles again', 'the Blue Cane'), 'Cane of Byrna': ItemData(IC.progression, None, 0x18, 'Use this to\nbecome\ninvincible!', 'and the bad cane', 'the spark-making kid', 'spark stick for sale', 'spark-stick for trade', 'cane boy encircles again', 'the Blue Cane'),
'Boss Heart Container': ItemData(False, None, 0x3E, 'Maximum health\nincreased!\nYeah!', 'and the full heart', 'the life-giving kid', 'love for sale', 'fungus for life', 'life boy feels love again', 'a heart'), 'Boss Heart Container': ItemData(IC.useful, None, 0x3E, 'Maximum health\nincreased!\nYeah!', 'and the full heart', 'the life-giving kid', 'love for sale', 'fungus for life', 'life boy feels love again', 'a heart'),
'Sanctuary Heart Container': ItemData(False, None, 0x3F, 'Maximum health\nincreased!\nYeah!', 'and the full heart', 'the life-giving kid', 'love for sale', 'fungus for life', 'life boy feels love again', 'a heart'), 'Sanctuary Heart Container': ItemData(IC.useful, None, 0x3F, 'Maximum health\nincreased!\nYeah!', 'and the full heart', 'the life-giving kid', 'love for sale', 'fungus for life', 'life boy feels love again', 'a heart'),
'Piece of Heart': ItemData(False, None, 0x17, 'Just a little\npiece of love!', 'and the broken heart', 'the life-giving kid', 'little love for sale', 'fungus for life', 'life boy feels some love again', 'a heart piece'), 'Piece of Heart': ItemData(IC.useful, None, 0x17, 'Just a little\npiece of love!', 'and the broken heart', 'the life-giving kid', 'little love for sale', 'fungus for life', 'life boy feels some love again', 'a heart piece'),
'Rupee (1)': ItemData(False, None, 0x34, 'Just pocket\nchange. Move\nright along.', 'the pocket change', 'poverty-struck kid', 'life lesson for sale', 'buying cheap drugs', 'destitute boy has snack again', 'a green rupee'), 'Rupee (1)': ItemData(IC.filler, None, 0x34, 'Just pocket\nchange. Move\nright along.', 'the pocket change', 'poverty-struck kid', 'life lesson for sale', 'buying cheap drugs', 'destitute boy has snack again', 'a green rupee'),
'Rupees (5)': ItemData(False, None, 0x35, 'Just pocket\nchange. Move\nright along.', 'the pocket change', 'poverty-struck kid', 'life lesson for sale', 'buying cheap drugs', 'destitute boy has snack again', 'a blue rupee'), 'Rupees (5)': ItemData(IC.filler, None, 0x35, 'Just pocket\nchange. Move\nright along.', 'the pocket change', 'poverty-struck kid', 'life lesson for sale', 'buying cheap drugs', 'destitute boy has snack again', 'a blue rupee'),
'Rupees (20)': ItemData(False, None, 0x36, 'Just couch\ncash. Move\nright along.', 'and the couch cash', 'the piggy-bank kid', 'life lesson for sale', 'the witch buying drugs', 'destitute boy has lunch again', 'a red rupee'), 'Rupees (20)': ItemData(IC.filler, None, 0x36, 'Just couch\ncash. Move\nright along.', 'and the couch cash', 'the piggy-bank kid', 'life lesson for sale', 'the witch buying drugs', 'destitute boy has lunch again', 'a red rupee'),
'Rupees (50)': ItemData(False, None, 0x41, 'A rupee pile!\nOkay?', 'and the rupee pile', 'the well-off kid', 'life lesson for sale', 'buying okay drugs', 'destitute boy has dinner again', 'fifty rupees'), 'Rupees (50)': ItemData(IC.filler, None, 0x41, 'A rupee pile!\nOkay?', 'and the rupee pile', 'the well-off kid', 'life lesson for sale', 'buying okay drugs', 'destitute boy has dinner again', 'fifty rupees'),
'Rupees (100)': ItemData(False, None, 0x40, 'A rupee stash!\nHell yeah!', 'and the rupee stash', 'the kind-of-rich kid', 'life lesson for sale', 'buying good drugs', 'affluent boy goes drinking again', 'one hundred rupees'), 'Rupees (100)': ItemData(IC.filler, None, 0x40, 'A rupee stash!\nHell yeah!', 'and the rupee stash', 'the kind-of-rich kid', 'life lesson for sale', 'buying good drugs', 'affluent boy goes drinking again', 'one hundred rupees'),
'Rupees (300)': ItemData(False, None, 0x46, 'A rupee hoard!\nHell yeah!', 'and the rupee hoard', 'the really-rich kid', 'life lesson for sale', 'buying the best drugs', 'fat-cat boy is rich again', 'three hundred rupees'), 'Rupees (300)': ItemData(IC.filler, None, 0x46, 'A rupee hoard!\nHell yeah!', 'and the rupee hoard', 'the really-rich kid', 'life lesson for sale', 'buying the best drugs', 'fat-cat boy is rich again', 'three hundred rupees'),
'Rupoor': ItemData(False, None, 0x59, 'a debt collector', 'and the toll-booth', 'the toll-booth kid', 'double loss for sale', 'witch stole your rupees', 'affluent boy steals rupees', 'a rupoor', True), 'Rupoor': ItemData(IC.trap, None, 0x59, 'a debt collector', 'and the toll-booth', 'the toll-booth kid', 'double loss for sale', 'witch stole your rupees', 'affluent boy steals rupees', 'a rupoor'),
'Red Clock': ItemData(False, None, 0x5B, 'a waste of time', 'the ruby clock', 'the ruby-time kid', 'red time for sale', 'for ruby time', 'moment boy travels time again', 'a red clock', True), 'Red Clock': ItemData(IC.trap, None, 0x5B, 'a waste of time', 'the ruby clock', 'the ruby-time kid', 'red time for sale', 'for ruby time', 'moment boy travels time again', 'a red clock'),
'Blue Clock': ItemData(False, None, 0x5C, 'a bit of time', 'the sapphire clock', 'sapphire-time kid', 'blue time for sale', 'for sapphire time', 'moment boy time travels again', 'a blue clock'), 'Blue Clock': ItemData(IC.filler, None, 0x5C, 'a bit of time', 'the sapphire clock', 'sapphire-time kid', 'blue time for sale', 'for sapphire time', 'moment boy time travels again', 'a blue clock'),
'Green Clock': ItemData(False, None, 0x5D, 'a lot of time', 'the emerald clock', 'the emerald-time kid', 'green time for sale', 'for emerald time', 'moment boy adjusts time again', 'a red clock'), 'Green Clock': ItemData(IC.useful, None, 0x5D, 'a lot of time', 'the emerald clock', 'the emerald-time kid', 'green time for sale', 'for emerald time', 'moment boy adjusts time again', 'a red clock'),
'Single RNG': ItemData(False, None, 0x62, 'something you don\'t yet have', None, None, None, None, 'unknown boy somethings again', 'a new mystery'), 'Single RNG': ItemData(IC.filler, None, 0x62, 'something you don\'t yet have', None, None, None, None, 'unknown boy somethings again', 'a new mystery'),
'Multi RNG': ItemData(False, None, 0x63, 'something you may already have', None, None, None, None, 'unknown boy somethings again', 'a total mystery'), 'Multi RNG': ItemData(IC.filler, None, 0x63, 'something you may already have', None, None, None, None, 'unknown boy somethings again', 'a total mystery'),
'Magic Upgrade (1/2)': ItemData(True, None, 0x4E, 'Your magic\npower has been\ndoubled!', 'and the spell power', 'the magic-saving kid', 'wizardry for sale', 'mekalekahi mekahiney ho', 'magic boy saves magic again', 'Half Magic'), # can be required to beat mothula in an open seed in very very rare circumstance 'Magic Upgrade (1/2)': ItemData(IC.progression, None, 0x4E, 'Your magic\npower has been\ndoubled!', 'and the spell power', 'the magic-saving kid', 'wizardry for sale', 'mekalekahi mekahiney ho', 'magic boy saves magic again', 'Half Magic'), # can be required to beat mothula in an open seed in very very rare circumstance
'Magic Upgrade (1/4)': ItemData(True, None, 0x4F, 'Your magic\npower has been\nquadrupled!', 'and the spell power', 'the magic-saving kid', 'wizardry for sale', 'mekalekahi mekahiney ho', 'magic boy saves magic again', 'Quarter Magic'), # can be required to beat mothula in an open seed in very very rare circumstance 'Magic Upgrade (1/4)': ItemData(IC.progression, None, 0x4F, 'Your magic\npower has been\nquadrupled!', 'and the spell power', 'the magic-saving kid', 'wizardry for sale', 'mekalekahi mekahiney ho', 'magic boy saves magic again', 'Quarter Magic'), # can be required to beat mothula in an open seed in very very rare circumstance
'Small Key (Eastern Palace)': ItemData(True, 'SmallKey', 0xA2, 'A small key to the eastern palace', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Eastern Palace'), 'Small Key (Eastern Palace)': ItemData(IC.progression, 'SmallKey', 0xA2, 'A small key to the eastern palace', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Eastern Palace'),
'Big Key (Eastern Palace)': ItemData(True, 'BigKey', 0x9D, 'A big key to the eastern palace', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Eastern Palace'), 'Big Key (Eastern Palace)': ItemData(IC.progression, 'BigKey', 0x9D, 'A big key to the eastern palace', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Eastern Palace'),
'Compass (Eastern Palace)': ItemData(False, 'Compass', 0x8D, 'Now you can find the the boss of the eastern palace!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Eastern Palace'), 'Compass (Eastern Palace)': ItemData(IC.filler, 'Compass', 0x8D, 'Now you can find the the boss of the eastern palace!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Eastern Palace'),
'Map (Eastern Palace)': ItemData(False, 'Map', 0x7D, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Eastern Palace'), 'Map (Eastern Palace)': ItemData(IC.filler, 'Map', 0x7D, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Eastern Palace'),
'Small Key (Desert Palace)': ItemData(True, 'SmallKey', 0xA3, 'A small key to the desert', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Desert Palace'), 'Small Key (Desert Palace)': ItemData(IC.progression, 'SmallKey', 0xA3, 'A small key to the desert', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Desert Palace'),
'Big Key (Desert Palace)': ItemData(True, 'BigKey', 0x9C, 'A big key to the desert', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Desert Palace'), 'Big Key (Desert Palace)': ItemData(IC.progression, 'BigKey', 0x9C, 'A big key to the desert', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Desert Palace'),
'Compass (Desert Palace)': ItemData(False, 'Compass', 0x8C, 'Now you can find the boss of the desert!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Desert Palace'), 'Compass (Desert Palace)': ItemData(IC.filler, 'Compass', 0x8C, 'Now you can find the boss of the desert!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Desert Palace'),
'Map (Desert Palace)': ItemData(False, 'Map', 0x7C, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Desert Palace'), 'Map (Desert Palace)': ItemData(IC.filler, 'Map', 0x7C, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Desert Palace'),
'Small Key (Tower of Hera)': ItemData(True, 'SmallKey', 0xAA, 'A small key to Hera', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Tower of Hera'), 'Small Key (Tower of Hera)': ItemData(IC.progression, 'SmallKey', 0xAA, 'A small key to Hera', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Tower of Hera'),
'Big Key (Tower of Hera)': ItemData(True, 'BigKey', 0x95, 'A big key to Hera', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Tower of Hera'), 'Big Key (Tower of Hera)': ItemData(IC.progression, 'BigKey', 0x95, 'A big key to Hera', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Tower of Hera'),
'Compass (Tower of Hera)': ItemData(False, 'Compass', 0x85, 'Now you can find the boss of Hera!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Tower of Hera'), 'Compass (Tower of Hera)': ItemData(IC.filler, 'Compass', 0x85, 'Now you can find the boss of Hera!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Tower of Hera'),
'Map (Tower of Hera)': ItemData(False, 'Map', 0x75, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Tower of Hera'), 'Map (Tower of Hera)': ItemData(IC.filler, 'Map', 0x75, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Tower of Hera'),
'Small Key (Hyrule Castle)': ItemData(True, 'SmallKey', 0xA0, 'A small key to the castle', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Hyrule Castle'), 'Small Key (Hyrule Castle)': ItemData(IC.progression, 'SmallKey', 0xA0, 'A small key to the castle', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Hyrule Castle'),
'Big Key (Hyrule Castle)': ItemData(True, 'BigKey', 0x9F, 'A big key to the castle', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Hyrule Castle'), 'Big Key (Hyrule Castle)': ItemData(IC.progression, 'BigKey', 0x9F, 'A big key to the castle', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Hyrule Castle'),
'Compass (Hyrule Castle)': ItemData(False, 'Compass', 0x8F, 'Now you can find no boss!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Hyrule Castle'), 'Compass (Hyrule Castle)': ItemData(IC.filler, 'Compass', 0x8F, 'Now you can find no boss!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Hyrule Castle'),
'Map (Hyrule Castle)': ItemData(False, 'Map', 0x7F, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Hyrule Castle'), 'Map (Hyrule Castle)': ItemData(IC.filler, 'Map', 0x7F, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Hyrule Castle'),
'Small Key (Agahnims Tower)': ItemData(True, 'SmallKey', 0xA4, 'A small key to the castle tower', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Castle Tower'), 'Small Key (Agahnims Tower)': ItemData(IC.progression, 'SmallKey', 0xA4, 'A small key to the castle tower', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Castle Tower'),
# doors-specific items, baserom will not be able to understand these # doors-specific items, baserom will not be able to understand these
'Big Key (Agahnims Tower)': ItemData(True, 'BigKey', 0x9B, 'A big key to the castle tower', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Castle Tower'), 'Big Key (Agahnims Tower)': ItemData(IC.progression, 'BigKey', 0x9B, 'A big key to the castle tower', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Castle Tower'),
'Compass (Agahnims Tower)': ItemData(False, 'Compass', 0x8B, 'Now you can find the boss of the castle tower!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds null again', 'a compass to Castle Tower'), 'Compass (Agahnims Tower)': ItemData(IC.filler, 'Compass', 0x8B, 'Now you can find the boss of the castle tower!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds null again', 'a compass to Castle Tower'),
'Map (Agahnims Tower)': ItemData(False, 'Map', 0x7B, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Castle Tower'), 'Map (Agahnims Tower)': ItemData(IC.filler, 'Map', 0x7B, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Castle Tower'),
# end of doors-specific items # end of doors-specific items
'Small Key (Palace of Darkness)': ItemData(True, 'SmallKey', 0xA6, 'A small key to darkness', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Palace of Darkness'), 'Small Key (Palace of Darkness)': ItemData(IC.progression, 'SmallKey', 0xA6, 'A small key to darkness', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Palace of Darkness'),
'Big Key (Palace of Darkness)': ItemData(True, 'BigKey', 0x99, 'A big key to darkness', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Palace of Darkness'), 'Big Key (Palace of Darkness)': ItemData(IC.progression, 'BigKey', 0x99, 'A big key to darkness', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Palace of Darkness'),
'Compass (Palace of Darkness)': ItemData(False, 'Compass', 0x89, 'Now you can find the boss of darkness!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Palace of Darkness'), 'Compass (Palace of Darkness)': ItemData(IC.filler, 'Compass', 0x89, 'Now you can find the boss of darkness!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Palace of Darkness'),
'Map (Palace of Darkness)': ItemData(False, 'Map', 0x79, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Palace of Darkness'), 'Map (Palace of Darkness)': ItemData(IC.filler, 'Map', 0x79, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Palace of Darkness'),
'Small Key (Thieves Town)': ItemData(True, 'SmallKey', 0xAB, 'A small key to thievery', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Thieves\' Town'), 'Small Key (Thieves Town)': ItemData(IC.progression, 'SmallKey', 0xAB, 'A small key to thievery', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Thieves\' Town'),
'Big Key (Thieves Town)': ItemData(True, 'BigKey', 0x94, 'A big key to thievery', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Thieves\' Town'), 'Big Key (Thieves Town)': ItemData(IC.progression, 'BigKey', 0x94, 'A big key to thievery', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Thieves\' Town'),
'Compass (Thieves Town)': ItemData(False, 'Compass', 0x84, 'Now you can find the boss of thievery!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Thieves\' Town'), 'Compass (Thieves Town)': ItemData(IC.filler, 'Compass', 0x84, 'Now you can find the boss of thievery!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Thieves\' Town'),
'Map (Thieves Town)': ItemData(False, 'Map', 0x74, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Thieves\' Town'), 'Map (Thieves Town)': ItemData(IC.filler, 'Map', 0x74, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Thieves\' Town'),
'Small Key (Skull Woods)': ItemData(True, 'SmallKey', 0xA8, 'A small key to the woods', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Skull Woods'), 'Small Key (Skull Woods)': ItemData(IC.progression, 'SmallKey', 0xA8, 'A small key to the woods', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Skull Woods'),
'Big Key (Skull Woods)': ItemData(True, 'BigKey', 0x97, 'A big key to the woods', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Skull Woods'), 'Big Key (Skull Woods)': ItemData(IC.progression, 'BigKey', 0x97, 'A big key to the woods', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Skull Woods'),
'Compass (Skull Woods)': ItemData(False, 'Compass', 0x87, 'Now you can find the boss of the woods!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Skull Woods'), 'Compass (Skull Woods)': ItemData(IC.filler, 'Compass', 0x87, 'Now you can find the boss of the woods!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Skull Woods'),
'Map (Skull Woods)': ItemData(False, 'Map', 0x77, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Skull Woods'), 'Map (Skull Woods)': ItemData(IC.filler, 'Map', 0x77, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Skull Woods'),
'Small Key (Swamp Palace)': ItemData(True, 'SmallKey', 0xA5, 'A small key to the swamp', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Swamp Palace'), 'Small Key (Swamp Palace)': ItemData(IC.progression, 'SmallKey', 0xA5, 'A small key to the swamp', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Swamp Palace'),
'Big Key (Swamp Palace)': ItemData(True, 'BigKey', 0x9A, 'A big key to the swamp', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Swamp Palace'), 'Big Key (Swamp Palace)': ItemData(IC.progression, 'BigKey', 0x9A, 'A big key to the swamp', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Swamp Palace'),
'Compass (Swamp Palace)': ItemData(False, 'Compass', 0x8A, 'Now you can find the boss of the swamp!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Swamp Palace'), 'Compass (Swamp Palace)': ItemData(IC.filler, 'Compass', 0x8A, 'Now you can find the boss of the swamp!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Swamp Palace'),
'Map (Swamp Palace)': ItemData(False, 'Map', 0x7A, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Swamp Palace'), 'Map (Swamp Palace)': ItemData(IC.filler, 'Map', 0x7A, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Swamp Palace'),
'Small Key (Ice Palace)': ItemData(True, 'SmallKey', 0xA9, 'A small key to the iceberg', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Ice Palace'), 'Small Key (Ice Palace)': ItemData(IC.progression, 'SmallKey', 0xA9, 'A small key to the iceberg', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Ice Palace'),
'Big Key (Ice Palace)': ItemData(True, 'BigKey', 0x96, 'A big key to the iceberg', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Ice Palace'), 'Big Key (Ice Palace)': ItemData(IC.progression, 'BigKey', 0x96, 'A big key to the iceberg', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Ice Palace'),
'Compass (Ice Palace)': ItemData(False, 'Compass', 0x86, 'Now you can find the boss of the iceberg!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Ice Palace'), 'Compass (Ice Palace)': ItemData(IC.filler, 'Compass', 0x86, 'Now you can find the boss of the iceberg!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Ice Palace'),
'Map (Ice Palace)': ItemData(False, 'Map', 0x76, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Ice Palace'), 'Map (Ice Palace)': ItemData(IC.filler, 'Map', 0x76, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Ice Palace'),
'Small Key (Misery Mire)': ItemData(True, 'SmallKey', 0xA7, 'A small key to the mire', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Misery Mire'), 'Small Key (Misery Mire)': ItemData(IC.progression, 'SmallKey', 0xA7, 'A small key to the mire', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Misery Mire'),
'Big Key (Misery Mire)': ItemData(True, 'BigKey', 0x98, 'A big key to the mire', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Misery Mire'), 'Big Key (Misery Mire)': ItemData(IC.progression, 'BigKey', 0x98, 'A big key to the mire', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Misery Mire'),
'Compass (Misery Mire)': ItemData(False, 'Compass', 0x88, 'Now you can find the boss of the mire!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Misery Mire'), 'Compass (Misery Mire)': ItemData(IC.filler, 'Compass', 0x88, 'Now you can find the boss of the mire!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Misery Mire'),
'Map (Misery Mire)': ItemData(False, 'Map', 0x78, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Misery Mire'), 'Map (Misery Mire)': ItemData(IC.filler, 'Map', 0x78, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Misery Mire'),
'Small Key (Turtle Rock)': ItemData(True, 'SmallKey', 0xAC, 'A small key to the pipe maze', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Turtle Rock'), 'Small Key (Turtle Rock)': ItemData(IC.progression, 'SmallKey', 0xAC, 'A small key to the pipe maze', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Turtle Rock'),
'Big Key (Turtle Rock)': ItemData(True, 'BigKey', 0x93, 'A big key to the pipe maze', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Turtle Rock'), 'Big Key (Turtle Rock)': ItemData(IC.progression, 'BigKey', 0x93, 'A big key to the pipe maze', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Turtle Rock'),
'Compass (Turtle Rock)': ItemData(False, 'Compass', 0x83, 'Now you can find the boss of the pipe maze!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Turtle Rock'), 'Compass (Turtle Rock)': ItemData(IC.filler, 'Compass', 0x83, 'Now you can find the boss of the pipe maze!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Turtle Rock'),
'Map (Turtle Rock)': ItemData(False, 'Map', 0x73, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Turtle Rock'), 'Map (Turtle Rock)': ItemData(IC.filler, 'Map', 0x73, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Turtle Rock'),
'Small Key (Ganons Tower)': ItemData(True, 'SmallKey', 0xAD, 'A small key to the evil tower', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Ganon\'s Tower'), 'Small Key (Ganons Tower)': ItemData(IC.progression, 'SmallKey', 0xAD, 'A small key to the evil tower', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key to Ganon\'s Tower'),
'Big Key (Ganons Tower)': ItemData(True, 'BigKey', 0x92, 'A big key to the evil tower', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Ganon\'s Tower'), 'Big Key (Ganons Tower)': ItemData(IC.progression, 'BigKey', 0x92, 'A big key to the evil tower', 'and the big key', 'the big-unlock kid', 'big key for sale', 'face key fungus', 'key boy opens chest again', 'a big key to Ganon\'s Tower'),
'Compass (Ganons Tower)': ItemData(False, 'Compass', 0x82, 'Now you can find the boss of the evil tower!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Ganon\'s Tower'), 'Compass (Ganons Tower)': ItemData(IC.filler, 'Compass', 0x82, 'Now you can find the boss of the evil tower!', 'and the compass', 'the magnetic kid', 'compass for sale', 'magnetic fungus', 'compass boy finds boss again', 'a compass to Ganon\'s Tower'),
'Map (Ganons Tower)': ItemData(False, 'Map', 0x72, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Ganon\'s Tower'), 'Map (Ganons Tower)': ItemData(IC.filler, 'Map', 0x72, 'A tightly folded map rests here', 'and the map', 'cartography kid', 'map for sale', 'a map to shrooms', 'map boy navigates again', 'a map to Ganon\'s Tower'),
'Small Key (Universal)': ItemData(False, None, 0xAF, 'A small key for any door', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key'), 'Small Key (Universal)': ItemData(IC.filler, None, 0xAF, 'A small key for any door', 'and the key', 'the unlocking kid', 'keys for sale', 'unlock the fungus', 'key boy opens door again', 'a small key'),
'Nothing': ItemData(False, None, 0x5A, 'Some Hot Air', 'and the Nothing', 'the zen kid', 'outright theft', 'shroom theft', 'empty boy is bored again', 'nothing'), 'Nothing': ItemData(IC.trap, None, 0x5A, 'Some Hot Air', 'and the Nothing', 'the zen kid', 'outright theft', 'shroom theft', 'empty boy is bored again', 'nothing'),
'Bee Trap': ItemData(False, None, 0xB0, 'We will sting your face a whole lot!', 'and the sting buddies', 'the beekeeper kid', 'insects for sale', 'shroom pollenation', 'bottle boy has mad bees again', 'Friendship', True), 'Bee Trap': ItemData(IC.trap, None, 0xB0, 'We will sting your face a whole lot!', 'and the sting buddies', 'the beekeeper kid', 'insects for sale', 'shroom pollenation', 'bottle boy has mad bees again', 'Friendship'),
'Faerie': ItemData(False, None, 0xB1, 'Save me and I will revive you', 'and the captive', 'the tingle kid','hostage for sale', 'fairy dust and shrooms', 'bottle boy has friend again', 'a faerie'), 'Faerie': ItemData(IC.filler, None, 0xB1, 'Save me and I will revive you', 'and the captive', 'the tingle kid','hostage for sale', 'fairy dust and shrooms', 'bottle boy has friend again', 'a faerie'),
'Good Bee': ItemData(False, None, 0xB2, 'Save me and I will sting you (sometimes)', 'and the captive', 'the tingle kid','hostage for sale', 'good dust and shrooms', 'bottle boy has friend again', 'a bee'), 'Good Bee': ItemData(IC.filler, None, 0xB2, 'Save me and I will sting you (sometimes)', 'and the captive', 'the tingle kid','hostage for sale', 'good dust and shrooms', 'bottle boy has friend again', 'a bee'),
'Magic Jar': ItemData(False, None, 0xB3, '', '', '','', '', '', ''), 'Magic Jar': ItemData(IC.filler, None, 0xB3, '', '', '','', '', '', ''),
'Apple': ItemData(False, None, 0xB4, '', '', '','', '', '', ''), 'Apple': ItemData(IC.filler, None, 0xB4, '', '', '','', '', '', ''),
# 'Hint': ItemData(False, None, 0xB5, '', '', '','', '', '', ''), # 'Hint': ItemData(IC.filler, None, 0xB5, '', '', '','', '', '', ''),
# 'Bomb Trap': ItemData(False, None, 0xB6, '', '', '','', '', '', ''), # 'Bomb Trap': ItemData(IC.filler, None, 0xB6, '', '', '','', '', '', ''),
'Red Potion': ItemData(False, None, 0x2E, 'Hearty red goop!', 'and the red goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has red goo again', 'a red potion'), 'Red Potion': ItemData(IC.filler, None, 0x2E, 'Hearty red goop!', 'and the red goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has red goo again', 'a red potion'),
'Green Potion': ItemData(False, None, 0x2F, 'Refreshing green goop!', 'and the green goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has green goo again', 'a green potion'), 'Green Potion': ItemData(IC.filler, None, 0x2F, 'Refreshing green goop!', 'and the green goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has green goo again', 'a green potion'),
'Blue Potion': ItemData(False, None, 0x30, 'Delicious blue goop!', 'and the blue goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has blue goo again', 'a blue potion'), 'Blue Potion': ItemData(IC.filler, None, 0x30, 'Delicious blue goop!', 'and the blue goo', 'the liquid kid', 'potion for sale', 'free samples', 'bottle boy has blue goo again', 'a blue potion'),
'Bee': ItemData(False, None, 0x0E, 'I will sting your foes a few times', 'and the sting buddy', 'the beekeeper kid', 'insect for sale', 'shroom pollenation', 'bottle boy has mad bee again', 'a bee', True), 'Bee': ItemData(IC.trap, None, 0x0E, 'I will sting your foes a few times', 'and the sting buddy', 'the beekeeper kid', 'insect for sale', 'shroom pollenation', 'bottle boy has mad bee again', 'a bee'),
'Small Heart': ItemData(False, None, 0x42, 'Just a little\npiece of love!', 'and the heart', 'the life-giving kid', 'little love for sale', 'fungus for life', 'life boy feels some love again', 'a heart'), 'Small Heart': ItemData(IC.filler, None, 0x42, 'Just a little\npiece of love!', 'and the heart', 'the life-giving kid', 'little love for sale', 'fungus for life', 'life boy feels some love again', 'a heart'),
'Activated Flute': ItemData(True, None, 0x4A, 'Save the duck\nand fly to\nfreedom!', 'and the duck call', 'the duck-call kid', 'duck call for sale', 'duck-calls for trade', 'flute boy plays again', 'the Flute'), 'Activated Flute': ItemData(IC.progression, None, 0x4A, 'Save the duck\nand fly to\nfreedom!', 'and the duck call', 'the duck-call kid', 'duck call for sale', 'duck-calls for trade', 'flute boy plays again', 'the Flute'),
'Beat Agahnim 1': ItemData(True, 'Event', None, None, None, None, None, None, None, None), 'Beat Agahnim 1': ItemData(IC.progression, 'Event', None, None, None, None, None, None, None, None),
'Beat Agahnim 2': ItemData(True, 'Event', None, None, None, None, None, None, None, None), 'Beat Agahnim 2': ItemData(IC.progression, 'Event', None, None, None, None, None, None, None, None),
'Get Frog': ItemData(True, 'Event', None, None, None, None, None, None, None, None), 'Get Frog': ItemData(IC.progression, 'Event', None, None, None, None, None, None, None, None),
'Return Smith': ItemData(True, 'Event', None, None, None, None, None, None, None, None), 'Return Smith': ItemData(IC.progression, 'Event', None, None, None, None, None, None, None, None),
'Pick Up Purple Chest': ItemData(True, 'Event', None, None, None, None, None, None, None, None), 'Pick Up Purple Chest': ItemData(IC.progression, 'Event', None, None, None, None, None, None, None, None),
'Open Floodgate': ItemData(True, 'Event', None, None, None, None, None, None, None, None), 'Open Floodgate': ItemData(IC.progression, 'Event', None, None, None, None, None, None, None, None),
} }
as_dict_item_table = {name: data._asdict() for name, data in item_table.items()} as_dict_item_table = {name: data._asdict() for name, data in item_table.items()}
@ -276,8 +275,10 @@ for basename, substring in _simple_groups:
del (_simple_groups) del (_simple_groups)
progression_items = {name for name, data in item_table.items() if type(data.item_code) == int and data.advancement}
everything = {name for name, data in item_table.items() if type(data.item_code) == int} everything = {name for name, data in item_table.items() if type(data.item_code) == int}
progression_items = {name for name in everything if
item_table[name].classification in {IC.progression, IC.progression_skip_balancing}}
item_name_groups['Progression Items'] = progression_items item_name_groups['Progression Items'] = progression_items
item_name_groups['Non Progression Items'] = everything - progression_items item_name_groups['Non Progression Items'] = everything - progression_items

View File

@ -249,7 +249,7 @@ def ShopSlotFill(world):
if location.item.game != "A Link to the Past": if location.item.game != "A Link to the Past":
if location.item.advancement: if location.item.advancement:
price = world.random.randrange(8, 56) price = world.random.randrange(8, 56)
elif location.item.never_exclude: elif location.item.useful:
price = world.random.randrange(4, 28) price = world.random.randrange(4, 28)
else: else:
price = world.random.randrange(2, 14) price = world.random.randrange(2, 14)

View File

@ -1,7 +1,7 @@
"""Module extending BaseClasses.py for aLttP""" """Module extending BaseClasses.py for aLttP"""
from typing import Optional from typing import Optional
from BaseClasses import Location, Item from BaseClasses import Location, Item, ItemClassification
class ALttPLocation(Location): class ALttPLocation(Location):
@ -20,10 +20,10 @@ class ALttPItem(Item):
game: str = "A Link to the Past" game: str = "A Link to the Past"
dungeon = None dungeon = None
def __init__(self, name, player, advancement=False, type=None, item_code=None, pedestal_hint=None, def __init__(self, name, player, classification=ItemClassification.filler, type=None, item_code=None, pedestal_hint=None,
pedestal_credit=None, sick_kid_credit=None, zora_credit=None, witch_credit=None, pedestal_credit=None, sick_kid_credit=None, zora_credit=None, witch_credit=None,
flute_boy_credit=None, hint_text=None, trap=False): flute_boy_credit=None, hint_text=None):
super(ALttPItem, self).__init__(name, advancement, item_code, player) super(ALttPItem, self).__init__(name, classification, item_code, player)
self.type = type self.type = type
self._pedestal_hint_text = pedestal_hint self._pedestal_hint_text = pedestal_hint
self.pedestal_credit_text = pedestal_credit self.pedestal_credit_text = pedestal_credit
@ -32,8 +32,6 @@ class ALttPItem(Item):
self.magicshop_credit_text = witch_credit self.magicshop_credit_text = witch_credit
self.fluteboy_credit_text = flute_boy_credit self.fluteboy_credit_text = flute_boy_credit
self._hint_text = hint_text self._hint_text = hint_text
if trap:
self.trap = trap
@property @property
def crystal(self) -> bool: def crystal(self) -> bool:

View File

@ -1,4 +1,4 @@
from BaseClasses import Item, MultiWorld, Region, Location, Entrance, Tutorial from BaseClasses import Item, MultiWorld, Region, Location, Entrance, Tutorial, ItemClassification, RegionType
from .Items import item_table from .Items import item_table
from .Rules import set_rules from .Rules import set_rules
from ..AutoWorld import World, WebWorld from ..AutoWorld import World, WebWorld
@ -47,7 +47,7 @@ class ArchipIDLEWorld(World):
for i in range(100): for i in range(100):
item = Item( item = Item(
item_table_copy[i], item_table_copy[i],
i < 20, ItemClassification.progression if i < 20 else ItemClassification.filler,
self.item_name_to_id[item_table_copy[i]], self.item_name_to_id[item_table_copy[i]],
self.player self.player
) )
@ -60,7 +60,7 @@ class ArchipIDLEWorld(World):
set_rules(self.world, self.player) set_rules(self.world, self.player)
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
return Item(name, True, self.item_name_to_id[name], self.player) return Item(name, ItemClassification.progression, self.item_name_to_id[name], self.player)
def create_regions(self): def create_regions(self):
self.world.regions += [ self.world.regions += [
@ -75,8 +75,9 @@ class ArchipIDLEWorld(World):
def get_filler_item_name(self) -> str: def get_filler_item_name(self) -> str:
return self.world.random.choice(item_table) return self.world.random.choice(item_table)
def create_region(world: MultiWorld, player: int, name: str, locations=None, exits=None): def create_region(world: MultiWorld, player: int, name: str, locations=None, exits=None):
region = Region(name, None, name, player) region = Region(name, RegionType.Generic, name, player)
region.world = world region.world = world
if locations: if locations:
for location_name in locations.keys(): for location_name in locations.keys():

View File

@ -1,16 +1,9 @@
import os from BaseClasses import Region, Entrance, Item, Tutorial, ItemClassification, RegionType
import json
from base64 import b64encode, b64decode
from math import ceil
from .Items import ChecksFinderItem, item_table, required_items from .Items import ChecksFinderItem, item_table, required_items
from .Locations import ChecksFinderAdvancement, advancement_table, exclusion_table from .Locations import ChecksFinderAdvancement, advancement_table, exclusion_table
from .Options import checksfinder_options
from .Regions import checksfinder_regions, link_checksfinder_structures from .Regions import checksfinder_regions, link_checksfinder_structures
from .Rules import set_rules, set_completion_rules from .Rules import set_rules, set_completion_rules
from worlds.generic.Rules import exclusion_rules
from BaseClasses import Region, Entrance, Item, Tutorial
from .Options import checksfinder_options
from ..AutoWorld import World, WebWorld from ..AutoWorld import World, WebWorld
client_version = 7 client_version = 7
@ -68,9 +61,6 @@ class ChecksFinderWorld(World):
# Convert itempool into real items # Convert itempool into real items
itempool = [item for item in map(lambda name: self.create_item(name), itempool)] itempool = [item for item in map(lambda name: self.create_item(name), itempool)]
# Choose locations to automatically exclude based on settings
exclusion_pool = set()
self.world.itempool += itempool self.world.itempool += itempool
def set_rules(self): def set_rules(self):
@ -79,7 +69,7 @@ class ChecksFinderWorld(World):
def create_regions(self): def create_regions(self):
def ChecksFinderRegion(region_name: str, exits=[]): def ChecksFinderRegion(region_name: str, exits=[]):
ret = Region(region_name, None, region_name, self.player, self.world) ret = Region(region_name, RegionType.Generic, region_name, self.player, self.world)
ret.locations = [ChecksFinderAdvancement(self.player, loc_name, loc_data.id, ret) ret.locations = [ChecksFinderAdvancement(self.player, loc_name, loc_data.id, ret)
for loc_name, loc_data in advancement_table.items() for loc_name, loc_data in advancement_table.items()
if loc_data.region == region_name] if loc_data.region == region_name]
@ -100,5 +90,7 @@ class ChecksFinderWorld(World):
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
item_data = item_table[name] item_data = item_table[name]
item = ChecksFinderItem(name, item_data.progression, item_data.code, self.player) item = ChecksFinderItem(name,
ItemClassification.progression if item_data.progression else ItemClassification.filler,
item_data.code, self.player)
return item return item

View File

@ -3,7 +3,7 @@ import typing
from ..AutoWorld import World, WebWorld from ..AutoWorld import World, WebWorld
from BaseClasses import Region, Entrance, Location, Item, RegionType, Tutorial from BaseClasses import Region, Entrance, Location, Item, RegionType, Tutorial, ItemClassification
from .Technologies import base_tech_table, recipe_sources, base_technology_table, \ from .Technologies import base_tech_table, recipe_sources, base_technology_table, \
all_ingredient_names, all_product_sources, required_technologies, get_rocket_requirements, rocket_recipes, \ all_ingredient_names, all_product_sources, required_technologies, get_rocket_requirements, rocket_recipes, \
progressive_technology_table, common_tech_table, tech_to_progressive_lookup, progressive_tech_table, \ progressive_technology_table, common_tech_table, tech_to_progressive_lookup, progressive_tech_table, \
@ -115,7 +115,7 @@ class Factorio(World):
location = Location(player, "Rocket Launch", None, nauvis) location = Location(player, "Rocket Launch", None, nauvis)
nauvis.locations.append(location) nauvis.locations.append(location)
location.game = "Factorio" location.game = "Factorio"
event = Item("Victory", True, None, player) event = FactorioItem("Victory", ItemClassification.progression, None, player)
event.game = "Factorio" event.game = "Factorio"
self.world.push_item(location, event, False) self.world.push_item(location, event, False)
location.event = location.locked = True location.event = location.locked = True
@ -123,7 +123,7 @@ class Factorio(World):
location = Location(player, f"Automate {ingredient}", None, nauvis) location = Location(player, f"Automate {ingredient}", None, nauvis)
location.game = "Factorio" location.game = "Factorio"
nauvis.locations.append(location) nauvis.locations.append(location)
event = Item(f"Automated {ingredient}", True, None, player) event = FactorioItem(f"Automated {ingredient}", ItemClassification.progression, None, player)
self.world.push_item(location, event, False) self.world.push_item(location, event, False)
location.event = location.locked = True location.event = location.locked = True
crash.connect(nauvis) crash.connect(nauvis)
@ -385,12 +385,17 @@ class Factorio(World):
prog_add.add(tech_to_progressive_lookup[tech]) prog_add.add(tech_to_progressive_lookup[tech])
self.advancement_technologies |= prog_add self.advancement_technologies |= prog_add
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> FactorioItem:
if name in tech_table: if name in tech_table: # is a Technology
return FactorioItem(name, name in self.advancement_technologies, if name in self.advancement_technologies:
classification = ItemClassification.progression
else:
classification = ItemClassification.filler
return FactorioItem(name,
classification,
tech_table[name], self.player) tech_table[name], self.player)
item = FactorioItem(name, False, all_items[name], self.player) item = FactorioItem(name,
if "Trap" in name: ItemClassification.trap if "Trap" in name else ItemClassification.filler,
item.trap = True all_items[name], self.player)
return item return item

View File

@ -2,7 +2,7 @@ import json
from pathlib import Path from pathlib import Path
from typing import Dict, Set, NamedTuple, List from typing import Dict, Set, NamedTuple, List
from BaseClasses import Item from BaseClasses import Item, ItemClassification
class ItemData(NamedTuple): class ItemData(NamedTuple):
@ -62,7 +62,8 @@ class FF1Items:
def generate_item(self, name: str, player: int) -> Item: def generate_item(self, name: str, player: int) -> Item:
item = self._get_item_table_lookup().get(name) item = self._get_item_table_lookup().get(name)
return Item(name, item.progression, item.code, player) return Item(name, ItemClassification.progression if item.progression else ItemClassification.filler,
item.code, player)
def get_item_name_to_code_dict(self) -> Dict[str, int]: def get_item_name_to_code_dict(self) -> Dict[str, int]:
return {name: item.code for name, item in self._get_item_table_lookup().items()} return {name: item.code for name, item in self._get_item_table_lookup().items()}

View File

@ -45,7 +45,7 @@ def exclusion_rules(world, player: int, exclude_locations: typing.Set[str]):
if loc_name not in world.worlds[player].location_name_to_id: if loc_name not in world.worlds[player].location_name_to_id:
raise Exception(f"Unable to exclude location {loc_name} in player {player}'s world.") from e raise Exception(f"Unable to exclude location {loc_name} in player {player}'s world.") from e
else: else:
add_item_rule(location, lambda i: not (i.advancement or i.never_exclude)) add_item_rule(location, lambda i: not (i.advancement or i.useful))
location.progress_type = LocationProgressType.EXCLUDED location.progress_type = LocationProgressType.EXCLUDED

View File

@ -1,7 +1,7 @@
from typing import NamedTuple, Union from typing import NamedTuple, Union
import logging import logging
from BaseClasses import Item, Tutorial from BaseClasses import Item, Tutorial, ItemClassification
from ..AutoWorld import World, WebWorld from ..AutoWorld import World, WebWorld
from NetUtils import SlotType from NetUtils import SlotType
@ -46,7 +46,7 @@ class GenericWorld(World):
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
if name == "Nothing": if name == "Nothing":
return Item(name, False, -1, self.player) return Item(name, ItemClassification.filler, -1, self.player)
raise KeyError(name) raise KeyError(name)

View File

@ -14,7 +14,7 @@ from .ExtractedData import locations, starts, multi_locations, location_to_regio
event_names, item_effects, connectors, one_ways event_names, item_effects, connectors, one_ways
from .Charms import names as charm_names from .Charms import names as charm_names
from BaseClasses import Region, Entrance, Location, MultiWorld, Item, RegionType, LocationProgressType, Tutorial from BaseClasses import Region, Entrance, Location, MultiWorld, Item, RegionType, LocationProgressType, Tutorial, ItemClassification
from ..AutoWorld import World, LogicMixin, WebWorld from ..AutoWorld import World, LogicMixin, WebWorld
path_of_pain_locations = { path_of_pain_locations = {
@ -385,16 +385,18 @@ class HKItem(Item):
game = "Hollow Knight" game = "Hollow Knight"
def __init__(self, name, advancement, code, type, player: int = None): def __init__(self, name, advancement, code, type, player: int = None):
super(HKItem, self).__init__(name, advancement, code if code else None, player)
self.type = type
if name == "Mimic_Grub": if name == "Mimic_Grub":
self.trap = True classification = ItemClassification.trap
elif type in ("Grub", "DreamWarrior", "Root", "Egg"):
if type in ("Grub", "DreamWarrior", "Root", "Egg"): classification = ItemClassification.progression_skip_balancing
self.skip_in_prog_balancing = True elif type == "Charm" and name not in progression_charms:
classification = ItemClassification.progression_skip_balancing
if type == "Charm" and name not in progression_charms: elif advancement:
self.skip_in_prog_balancing = True classification = ItemClassification.progression
else:
classification = ItemClassification.filler
super(HKItem, self).__init__(name, classification, code if code else None, player)
self.type = type
class HKLogicMixin(LogicMixin): class HKLogicMixin(LogicMixin):

View File

@ -5,7 +5,7 @@
import typing import typing
from BaseClasses import Item from BaseClasses import Item, ItemClassification
# pedestal_credit_text: str = "and the Unknown Item" # pedestal_credit_text: str = "and the Unknown Item"
@ -145,12 +145,14 @@ class MeritousItem(Item):
game: str = "Meritous" game: str = "Meritous"
def __init__(self, name, advancement, code, player): def __init__(self, name, advancement, code, player):
super(MeritousItem, self).__init__(name, advancement, code, player) super(MeritousItem, self).__init__(name,
ItemClassification.progression if advancement else ItemClassification.filler,
code, player)
if code is None: if code is None:
self.type = "Event" self.type = "Event"
elif "Trap" in name: elif "Trap" in name:
self.type = "Trap" self.type = "Trap"
self.trap = True self.classification = ItemClassification.trap
elif "PSI Key" in name: elif "PSI Key" in name:
self.type = "PSI Key" self.type = "PSI Key"
elif "upgrade" in name: elif "upgrade" in name:
@ -167,7 +169,7 @@ class MeritousItem(Item):
self.type = "Important Artifact" self.type = "Important Artifact"
else: else:
self.type = "Artifact" self.type = "Artifact"
self.never_exclude = True self.classification = ItemClassification.useful
if name in LttPCreditsText: if name in LttPCreditsText:
lttp = LttPCreditsText[name] lttp = LttPCreditsText[name]

View File

@ -9,7 +9,7 @@ from .Regions import mc_regions, link_minecraft_structures, default_connections
from .Rules import set_advancement_rules, set_completion_rules from .Rules import set_advancement_rules, set_completion_rules
from worlds.generic.Rules import exclusion_rules from worlds.generic.Rules import exclusion_rules
from BaseClasses import Region, Entrance, Item, Tutorial from BaseClasses import Region, Entrance, Item, Tutorial, ItemClassification
from .Options import minecraft_options from .Options import minecraft_options
from ..AutoWorld import World, WebWorld from ..AutoWorld import World, WebWorld
@ -164,12 +164,17 @@ class MinecraftWorld(World):
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
item_data = item_table[name] item_data = item_table[name]
item = MinecraftItem(name, item_data.progression, item_data.code, self.player)
nonexcluded_items = ["Sharpness III Book", "Infinity Book", "Looting III Book"]
if name in nonexcluded_items: # prevent books from going on excluded locations
item.never_exclude = True
if name == "Bee Trap": if name == "Bee Trap":
item.trap = True classification = ItemClassification.trap
# prevent books from going on excluded locations
elif name in ("Sharpness III Book", "Infinity Book", "Looting III Book"):
classification = ItemClassification.useful
elif item_data.progression:
classification = ItemClassification.progression
else:
classification = ItemClassification.filler
item = MinecraftItem(name, classification, item_data.code, self.player)
return item return item
def mc_update_output(raw_data, server, port): def mc_update_output(raw_data, server, port):

View File

@ -1,6 +1,7 @@
import typing import typing
from BaseClasses import Item from BaseClasses import Item, ItemClassification
def oot_data_to_ap_id(data, event): def oot_data_to_ap_id(data, event):
if event or data[2] is None or data[0] == 'Shop': if event or data[2] is None or data[0] == 'Shop':
@ -11,6 +12,7 @@ def oot_data_to_ap_id(data, event):
else: else:
raise Exception(f'Unexpected OOT item type found: {data[0]}') raise Exception(f'Unexpected OOT item type found: {data[0]}')
def ap_id_to_oot_data(ap_id): def ap_id_to_oot_data(ap_id):
offset = 66000 offset = 66000
val = ap_id - offset val = ap_id - offset
@ -19,25 +21,31 @@ def ap_id_to_oot_data(ap_id):
except IndexError: except IndexError:
raise Exception(f'Could not find desired item ID: {ap_id}') raise Exception(f'Could not find desired item ID: {ap_id}')
class OOTItem(Item): class OOTItem(Item):
game: str = "Ocarina of Time" game: str = "Ocarina of Time"
def __init__(self, name, player, data, event, force_not_advancement): def __init__(self, name, player, data, event, force_not_advancement):
(type, advancement, index, special) = data (type, advancement, index, special) = data
# "advancement" is True, False or None; some items are not advancement based on settings # "advancement" is True, False or None; some items are not advancement based on settings
if force_not_advancement:
classification = ItemClassification.useful
elif name == "Ice Trap":
classification = ItemClassification.trap
elif name == 'Gold Skulltula Token':
classification = ItemClassification.progression_skip_balancing
elif advancement:
classification = ItemClassification.progression
else:
classification = ItemClassification.filler
adv = bool(advancement) and not force_not_advancement adv = bool(advancement) and not force_not_advancement
super(OOTItem, self).__init__(name, adv, oot_data_to_ap_id(data, event), player) super(OOTItem, self).__init__(name, classification, oot_data_to_ap_id(data, event), player)
self.type = type self.type = type
self.index = index self.index = index
self.special = special or {} self.special = special or {}
self.looks_like_item = None self.looks_like_item = None
self.price = special.get('price', None) if special else None self.price = special.get('price', None) if special else None
self.internal = False self.internal = False
self.trap = name == 'Ice Trap'
if force_not_advancement:
self.never_exclude = True
if name == 'Gold Skulltula Token':
self.skip_in_prog_balancing = True
# The playthrough calculation calls a function that uses "sweep_for_events(key_only=True)" # The playthrough calculation calls a function that uses "sweep_for_events(key_only=True)"
# This checks if the item it's looking for is a small key, using the small key property. # This checks if the item it's looking for is a small key, using the small key property.

View File

@ -877,7 +877,7 @@ class OOTWorld(World):
if loc.player in barren_hint_players: if loc.player in barren_hint_players:
hint_area = get_hint_area(loc) hint_area = get_hint_area(loc)
items_by_region[loc.player][hint_area]['weight'] += 1 items_by_region[loc.player][hint_area]['weight'] += 1
if loc.item.advancement or loc.item.never_exclude: if loc.item.advancement or loc.item.useful:
items_by_region[loc.player][hint_area]['is_barren'] = False items_by_region[loc.player][hint_area]['is_barren'] = False
if loc.player in woth_hint_players and loc.item.advancement: if loc.player in woth_hint_players and loc.item.advancement:
# Skip item at location and see if game is still beatable # Skip item at location and see if game is still beatable

View File

@ -6,7 +6,7 @@ from .Locations import lookup_name_to_id
from .Rules import set_rules, location_rules from .Rules import set_rules, location_rules
from .Regions import locations_by_region, connectors from .Regions import locations_by_region, connectors
from .Options import options from .Options import options
from BaseClasses import Region, Item, Location, RegionType, Entrance from BaseClasses import Region, Item, Location, RegionType, Entrance, ItemClassification
class OriBlindForest(World): class OriBlindForest(World):
@ -65,7 +65,9 @@ class OriBlindForest(World):
self.world.itempool.extend([self.create_item(item_name)] * count) self.world.itempool.extend([self.create_item(item_name)] * count)
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
return Item(name, not name.startswith("EX"), item_table[name], self.player) return Item(name,
ItemClassification.progression if not name.startswith("EX") else ItemClassification.filler,
item_table[name], self.player)
class OriBlindForestLogic(LogicMixin): class OriBlindForestLogic(LogicMixin):

View File

@ -9,7 +9,7 @@ from .Regions import create_regions, getConnectionName
from .Rules import set_rules from .Rules import set_rules
from .Options import raft_options from .Options import raft_options
from BaseClasses import Region, RegionType, Entrance, Location, MultiWorld, Item, Tutorial from BaseClasses import Region, RegionType, Entrance, Location, MultiWorld, Item, ItemClassification, Tutorial
from ..AutoWorld import World, WebWorld from ..AutoWorld import World, WebWorld
@ -106,10 +106,11 @@ class RaftWorld(World):
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
item = lookup_name_to_item[name] item = lookup_name_to_item[name]
return RaftItem(name, item["progression"], self.item_name_to_id[name], player=self.player) return RaftItem(name, ItemClassification.progression if item["progression"] else ItemClassification.filler,
self.item_name_to_id[name], player=self.player)
def create_resourcePack(self, rpName: str) -> Item: def create_resourcePack(self, rpName: str) -> Item:
return RaftItem(rpName, False, self.item_name_to_id[rpName], player=self.player) return RaftItem(rpName, ItemClassification.filler, self.item_name_to_id[rpName], player=self.player)
def collect_item(self, state, item, remove=False): def collect_item(self, state, item, remove=False):
if item.name in progressive_item_list: if item.name in progressive_item_list:
@ -138,7 +139,7 @@ class RaftWorld(World):
self.setLocationItemFromRegion("CaravanIsland", "Tangaroa Frequency") self.setLocationItemFromRegion("CaravanIsland", "Tangaroa Frequency")
# Victory item # Victory item
self.world.get_location("Tangaroa Next Frequency", self.player).place_locked_item( self.world.get_location("Tangaroa Next Frequency", self.player).place_locked_item(
RaftItem("Victory", True, None, player=self.player)) RaftItem("Victory", ItemClassification.progression, None, player=self.player))
def setLocationItem(self, location: str, itemName: str): def setLocationItem(self, location: str, itemName: str):
itemToUse = next(filter(lambda itm: itm.name == itemName, self.world.itempool)) itemToUse = next(filter(lambda itm: itm.name == itemName, self.world.itempool))

View File

@ -14,9 +14,6 @@ class ItemData(typing.NamedTuple):
class LegacyItem(Item): class LegacyItem(Item):
game: str = "Rogue Legacy" game: str = "Rogue Legacy"
def __init__(self, name, advancement: bool = False, code: int = None, player: int = None):
super(LegacyItem, self).__init__(name, advancement, code, player)
# Separate tables for each type of item. # Separate tables for each type of item.
vendors_table = { vendors_table = {

View File

@ -1,10 +1,12 @@
import typing import typing
from BaseClasses import MultiWorld, Region, Entrance from BaseClasses import MultiWorld, Region, RegionType, Entrance, ItemClassification
from .Items import LegacyItem from .Items import LegacyItem
from .Locations import LegacyLocation, diary_location_table, location_table, base_location_table from .Locations import LegacyLocation, diary_location_table, location_table, base_location_table
from .Names import LocationName, ItemName from .Names import LocationName, ItemName
prog = ItemClassification.progression
def create_regions(world, player: int): def create_regions(world, player: int):
@ -47,16 +49,16 @@ def create_regions(world, player: int):
# Connect entrances and set up events. # Connect entrances and set up events.
world.get_entrance(LocationName.outside, player).connect(world.get_region(LocationName.castle, player)) world.get_entrance(LocationName.outside, player).connect(world.get_region(LocationName.castle, player))
world.get_location(LocationName.castle, player).place_locked_item(LegacyItem(ItemName.boss_castle, True, None, player)) world.get_location(LocationName.castle, player).place_locked_item(LegacyItem(ItemName.boss_castle, prog, None, player))
world.get_location(LocationName.garden, player).place_locked_item(LegacyItem(ItemName.boss_forest, True, None, player)) world.get_location(LocationName.garden, player).place_locked_item(LegacyItem(ItemName.boss_forest, prog, None, player))
world.get_location(LocationName.tower, player).place_locked_item(LegacyItem(ItemName.boss_tower, True, None, player)) world.get_location(LocationName.tower, player).place_locked_item(LegacyItem(ItemName.boss_tower, prog, None, player))
world.get_location(LocationName.dungeon, player).place_locked_item(LegacyItem(ItemName.boss_dungeon, True, None, player)) world.get_location(LocationName.dungeon, player).place_locked_item(LegacyItem(ItemName.boss_dungeon, prog, None, player))
world.get_location(LocationName.fountain, player).place_locked_item(LegacyItem(ItemName.boss_fountain, True, None, player)) world.get_location(LocationName.fountain, player).place_locked_item(LegacyItem(ItemName.boss_fountain, prog, None, player))
def create_region(world: MultiWorld, player: int, name: str, locations=None, exits=None): def create_region(world: MultiWorld, player: int, name: str, locations=None, exits=None):
# Shamelessly stolen from the ROR2 definition, lol # Shamelessly stolen from the ROR2 definition, lol
ret = Region(name, None, name, player) ret = Region(name, RegionType.Generic, name, player)
ret.world = world ret.world = world
if locations: if locations:
for location in locations: for location in locations:

View File

@ -1,6 +1,6 @@
import typing import typing
from BaseClasses import Item, MultiWorld, Tutorial from BaseClasses import Item, ItemClassification, Tutorial
from .Items import LegacyItem, ItemData, item_table, vendors_table, static_classes_table, progressive_classes_table, \ from .Items import LegacyItem, ItemData, item_table, vendors_table, static_classes_table, progressive_classes_table, \
skill_unlocks_table, blueprints_table, runes_table, misc_items_table skill_unlocks_table, blueprints_table, runes_table, misc_items_table
from .Locations import LegacyLocation, location_table, base_location_table from .Locations import LegacyLocation, location_table, base_location_table
@ -169,7 +169,7 @@ class LegacyWorld(World):
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
data = item_table[name] data = item_table[name]
return LegacyItem(name, data.progression, data.code, self.player) return LegacyItem(name, ItemClassification.progression if data.progression else ItemClassification.filler, data.code, self.player)
def set_rules(self): def set_rules(self):
set_rules(self.world, self.player) set_rules(self.world, self.player)

View File

@ -3,7 +3,7 @@ from .Items import RiskOfRainItem, item_table, item_pool_weights
from .Locations import location_table, RiskOfRainLocation, base_location_table from .Locations import location_table, RiskOfRainLocation, base_location_table
from .Rules import set_rules from .Rules import set_rules
from BaseClasses import Region, Entrance, Item, MultiWorld, Tutorial from BaseClasses import Region, RegionType, Entrance, Item, ItemClassification, MultiWorld, Tutorial
from .Options import ror2_options from .Options import ror2_options
from ..AutoWorld import World, WebWorld from ..AutoWorld import World, WebWorld
@ -115,7 +115,9 @@ class RiskOfRainWorld(World):
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
item_id = item_table[name] item_id = item_table[name]
item = RiskOfRainItem(name, name == "Dio's Best Friend", item_id, self.player) item = RiskOfRainItem(name,
ItemClassification.useful if name == "Dio's Best Friend" else ItemClassification.filler,
item_id, self.player)
return item return item
@ -125,7 +127,7 @@ def create_events(world: MultiWorld, player: int, total_locations: int):
num_of_events -= 1 num_of_events -= 1
for i in range(num_of_events): for i in range(num_of_events):
event_loc = RiskOfRainLocation(player, f"Pickup{(i + 1) * 25}", None, world.get_region('Petrichor V', player)) event_loc = RiskOfRainLocation(player, f"Pickup{(i + 1) * 25}", None, world.get_region('Petrichor V', player))
event_loc.place_locked_item(RiskOfRainItem(f"Pickup{(i + 1) * 25}", True, None, player)) event_loc.place_locked_item(RiskOfRainItem(f"Pickup{(i + 1) * 25}", ItemClassification.progression, None, player))
event_loc.access_rule(lambda state, i=i: state.can_reach(f"ItemPickup{((i + 1) * 25) - 1}", player)) event_loc.access_rule(lambda state, i=i: state.can_reach(f"ItemPickup{((i + 1) * 25) - 1}", player))
world.get_region('Petrichor V', player).locations.append(event_loc) world.get_region('Petrichor V', player).locations.append(event_loc)
@ -140,11 +142,12 @@ def create_regions(world, player: int):
] ]
world.get_entrance("Lobby", player).connect(world.get_region("Petrichor V", player)) world.get_entrance("Lobby", player).connect(world.get_region("Petrichor V", player))
world.get_location("Victory", player).place_locked_item(RiskOfRainItem("Victory", True, None, player)) world.get_location("Victory", player).place_locked_item(RiskOfRainItem("Victory", ItemClassification.progression,
None, player))
def create_region(world: MultiWorld, player: int, name: str, locations=None, exits=None): def create_region(world: MultiWorld, player: int, name: str, locations=None, exits=None):
ret = Region(name, None, name, player) ret = Region(name, RegionType.Generic, name, player)
ret.world = world ret.world = world
if locations: if locations:
for location in locations: for location in locations:

View File

@ -1,6 +1,6 @@
import typing import typing
from BaseClasses import Item from BaseClasses import Item, ItemClassification
from .Names import ItemName from .Names import ItemName
@ -14,8 +14,8 @@ class ItemData(typing.NamedTuple):
class SA2BItem(Item): class SA2BItem(Item):
game: str = "Sonic Adventure 2: Battle" game: str = "Sonic Adventure 2: Battle"
def __init__(self, name, advancement: bool = False, code: int = None, player: int = None): def __init__(self, name, classification: ItemClassification, code: int = None, player: int = None):
super(SA2BItem, self).__init__(name, advancement, code, player) super(SA2BItem, self).__init__(name, classification, code, player)
if self.name == ItemName.sonic_light_shoes or self.name == ItemName.shadow_air_shoes: if self.name == ItemName.sonic_light_shoes or self.name == ItemName.shadow_air_shoes:
self.pedestal_credit_text = "and the Soap Shoes" self.pedestal_credit_text = "and the Soap Shoes"

View File

@ -1,8 +1,7 @@
import os
import typing import typing
import math import math
from BaseClasses import Item, MultiWorld, Tutorial from BaseClasses import Item, MultiWorld, Tutorial, ItemClassification
from .Items import SA2BItem, ItemData, item_table, upgrades_table from .Items import SA2BItem, ItemData, item_table, upgrades_table
from .Locations import SA2BLocation, all_locations, setup_locations from .Locations import SA2BLocation, all_locations, setup_locations
from .Options import sa2b_options from .Options import sa2b_options
@ -11,7 +10,6 @@ from .Regions import create_regions, shuffleable_regions, connect_regions, Level
from .Rules import set_rules from .Rules import set_rules
from .Names import ItemName, LocationName from .Names import ItemName, LocationName
from ..AutoWorld import WebWorld, World from ..AutoWorld import WebWorld, World
import Patch
class SA2BWeb(WebWorld): class SA2BWeb(WebWorld):
@ -205,11 +203,18 @@ class SA2BWorld(World):
def create_item(self, name: str, force_non_progression=False) -> Item: def create_item(self, name: str, force_non_progression=False) -> Item:
data = item_table[name] data = item_table[name]
created_item = SA2BItem(name, data.progression, data.code, self.player)
if name == ItemName.emblem: if name == ItemName.emblem:
created_item.skip_in_prog_balancing = True classification = ItemClassification.progression_skip_balancing
if force_non_progression: elif force_non_progression:
created_item.advancement = False classification = ItemClassification.filler
elif data.progression:
classification = ItemClassification.progression
else:
classification = ItemClassification.filler
created_item = SA2BItem(name, classification, data.code, self.player)
return created_item return created_item
def set_rules(self): def set_rules(self):

View File

@ -1,4 +1,4 @@
from BaseClasses import Item from BaseClasses import Item, ItemClassification
import typing import typing
@ -6,17 +6,13 @@ class ItemData(typing.NamedTuple):
code: typing.Optional[int] code: typing.Optional[int]
type: typing.Optional[str] type: typing.Optional[str]
number: typing.Optional[int] number: typing.Optional[int]
progression: bool = False classification: ItemClassification = ItemClassification.filler
never_exclude: bool = True
quantity: int = 1 quantity: int = 1
class StarcraftWoLItem(Item): class StarcraftWoLItem(Item):
game: str = "Starcraft 2 Wings of Liberty" game: str = "Starcraft 2 Wings of Liberty"
def __init__(self, name, advancement: bool = False, code: int = None, player: int = None):
super(StarcraftWoLItem, self).__init__(name, advancement, code, player)
def get_full_item_list(): def get_full_item_list():
return item_table return item_table
@ -25,84 +21,84 @@ def get_full_item_list():
SC2WOL_ITEM_ID_OFFSET = 1000 SC2WOL_ITEM_ID_OFFSET = 1000
item_table = { item_table = {
"Marine": ItemData(0+SC2WOL_ITEM_ID_OFFSET, "Unit", 0, progression=True), "Marine": ItemData(0 + SC2WOL_ITEM_ID_OFFSET, "Unit", 0, classification=ItemClassification.progression),
"Medic": ItemData(1+SC2WOL_ITEM_ID_OFFSET, "Unit", 1, progression=True), "Medic": ItemData(1 + SC2WOL_ITEM_ID_OFFSET, "Unit", 1, classification=ItemClassification.progression),
"Firebat": ItemData(2+SC2WOL_ITEM_ID_OFFSET, "Unit", 2, progression=True), "Firebat": ItemData(2 + SC2WOL_ITEM_ID_OFFSET, "Unit", 2, classification=ItemClassification.progression),
"Marauder": ItemData(3+SC2WOL_ITEM_ID_OFFSET, "Unit", 3, progression=True), "Marauder": ItemData(3 + SC2WOL_ITEM_ID_OFFSET, "Unit", 3, classification=ItemClassification.progression),
"Reaper": ItemData(4+SC2WOL_ITEM_ID_OFFSET, "Unit", 4, progression=True), "Reaper": ItemData(4 + SC2WOL_ITEM_ID_OFFSET, "Unit", 4, classification=ItemClassification.progression),
"Hellion": ItemData(5+SC2WOL_ITEM_ID_OFFSET, "Unit", 5, progression=True), "Hellion": ItemData(5 + SC2WOL_ITEM_ID_OFFSET, "Unit", 5, classification=ItemClassification.progression),
"Vulture": ItemData(6+SC2WOL_ITEM_ID_OFFSET, "Unit", 6, progression=True), "Vulture": ItemData(6 + SC2WOL_ITEM_ID_OFFSET, "Unit", 6, classification=ItemClassification.progression),
"Goliath": ItemData(7+SC2WOL_ITEM_ID_OFFSET, "Unit", 7, progression=True), "Goliath": ItemData(7 + SC2WOL_ITEM_ID_OFFSET, "Unit", 7, classification=ItemClassification.progression),
"Diamondback": ItemData(8+SC2WOL_ITEM_ID_OFFSET, "Unit", 8, progression=True), "Diamondback": ItemData(8 + SC2WOL_ITEM_ID_OFFSET, "Unit", 8, classification=ItemClassification.progression),
"Siege Tank": ItemData(9+SC2WOL_ITEM_ID_OFFSET, "Unit", 9, progression=True), "Siege Tank": ItemData(9 + SC2WOL_ITEM_ID_OFFSET, "Unit", 9, classification=ItemClassification.progression),
"Medivac": ItemData(10+SC2WOL_ITEM_ID_OFFSET, "Unit", 10, progression=True), "Medivac": ItemData(10 + SC2WOL_ITEM_ID_OFFSET, "Unit", 10, classification=ItemClassification.progression),
"Wraith": ItemData(11+SC2WOL_ITEM_ID_OFFSET, "Unit", 11, progression=True), "Wraith": ItemData(11 + SC2WOL_ITEM_ID_OFFSET, "Unit", 11, classification=ItemClassification.progression),
"Viking": ItemData(12+SC2WOL_ITEM_ID_OFFSET, "Unit", 12, progression=True), "Viking": ItemData(12 + SC2WOL_ITEM_ID_OFFSET, "Unit", 12, classification=ItemClassification.progression),
"Banshee": ItemData(13+SC2WOL_ITEM_ID_OFFSET, "Unit", 13, progression=True), "Banshee": ItemData(13 + SC2WOL_ITEM_ID_OFFSET, "Unit", 13, classification=ItemClassification.progression),
"Battlecruiser": ItemData(14+SC2WOL_ITEM_ID_OFFSET, "Unit", 14, progression=True), "Battlecruiser": ItemData(14 + SC2WOL_ITEM_ID_OFFSET, "Unit", 14, classification=ItemClassification.progression),
"Ghost": ItemData(15+SC2WOL_ITEM_ID_OFFSET, "Unit", 15, progression=True), "Ghost": ItemData(15 + SC2WOL_ITEM_ID_OFFSET, "Unit", 15, classification=ItemClassification.progression),
"Spectre": ItemData(16+SC2WOL_ITEM_ID_OFFSET, "Unit", 16, progression=True), "Spectre": ItemData(16 + SC2WOL_ITEM_ID_OFFSET, "Unit", 16, classification=ItemClassification.progression),
"Thor": ItemData(17+SC2WOL_ITEM_ID_OFFSET, "Unit", 17, progression=True), "Thor": ItemData(17 + SC2WOL_ITEM_ID_OFFSET, "Unit", 17, classification=ItemClassification.progression),
"Progressive Infantry Weapon": ItemData (100+SC2WOL_ITEM_ID_OFFSET, "Upgrade", 0, quantity=3), "Progressive Infantry Weapon": ItemData(100 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 0, quantity=3),
"Progressive Infantry Armor": ItemData (102+SC2WOL_ITEM_ID_OFFSET, "Upgrade", 2, quantity=3), "Progressive Infantry Armor": ItemData(102 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 2, quantity=3),
"Progressive Vehicle Weapon": ItemData (103+SC2WOL_ITEM_ID_OFFSET, "Upgrade", 4, quantity=3), "Progressive Vehicle Weapon": ItemData(103 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 4, quantity=3),
"Progressive Vehicle Armor": ItemData (104+SC2WOL_ITEM_ID_OFFSET, "Upgrade", 6, quantity=3), "Progressive Vehicle Armor": ItemData(104 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 6, quantity=3),
"Progressive Ship Weapon": ItemData (105+SC2WOL_ITEM_ID_OFFSET, "Upgrade", 8, quantity=3), "Progressive Ship Weapon": ItemData(105 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 8, quantity=3),
"Progressive Ship Armor": ItemData (106+SC2WOL_ITEM_ID_OFFSET, "Upgrade", 10, quantity=3), "Progressive Ship Armor": ItemData(106 + SC2WOL_ITEM_ID_OFFSET, "Upgrade", 10, quantity=3),
"Projectile Accelerator (Bunker)": ItemData (200+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 0), "Projectile Accelerator (Bunker)": ItemData(200 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 0),
"Neosteel Bunker (Bunker)": ItemData (201+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 1), "Neosteel Bunker (Bunker)": ItemData(201 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 1),
"Titanium Housing (Missile Turret)": ItemData (202+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 2), "Titanium Housing (Missile Turret)": ItemData(202 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 2),
"Hellstorm Batteries (Missile Turret)": ItemData (203+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 3), "Hellstorm Batteries (Missile Turret)": ItemData(203 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 3),
"Advanced Construction (SCV)": ItemData (204+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 4), "Advanced Construction (SCV)": ItemData(204 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 4),
"Dual-Fusion Welders (SCV)": ItemData (205+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 5), "Dual-Fusion Welders (SCV)": ItemData(205 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 5),
"Fire-Suppression System (Building)": ItemData (206+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 6), "Fire-Suppression System (Building)": ItemData(206 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 6),
"Orbital Command (Building)": ItemData (207+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 7), "Orbital Command (Building)": ItemData(207 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 7),
"Stimpack (Marine)": ItemData (208+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 8), "Stimpack (Marine)": ItemData(208 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 8),
"Combat Shield (Marine)": ItemData (209+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 9), "Combat Shield (Marine)": ItemData(209 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 9),
"Advanced Medic Facilities (Medic)": ItemData (210+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 10), "Advanced Medic Facilities (Medic)": ItemData(210 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 10),
"Stabilizer Medpacks (Medic)": ItemData (211+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 11), "Stabilizer Medpacks (Medic)": ItemData(211 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 11),
"Incinerator Gauntlets (Firebat)": ItemData (212+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 12, never_exclude=False), "Incinerator Gauntlets (Firebat)": ItemData(212 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 12, classification=ItemClassification.useful),
"Juggernaut Plating (Firebat)": ItemData (213+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 13), "Juggernaut Plating (Firebat)": ItemData(213 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 13),
"Concussive Shells (Marauder)": ItemData (214+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 14), "Concussive Shells (Marauder)": ItemData(214 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 14),
"Kinetic Foam (Marauder)": ItemData (215+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 15), "Kinetic Foam (Marauder)": ItemData(215 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 15),
"U-238 Rounds (Reaper)": ItemData (216+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 16), "U-238 Rounds (Reaper)": ItemData(216 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 16),
"G-4 Clusterbomb (Reaper)": ItemData (217+SC2WOL_ITEM_ID_OFFSET, "Armory 1", 17, never_exclude=False), "G-4 Clusterbomb (Reaper)": ItemData(217 + SC2WOL_ITEM_ID_OFFSET, "Armory 1", 17, classification=ItemClassification.useful),
"Twin-Linked Flamethrower (Hellion)": ItemData(300+SC2WOL_ITEM_ID_OFFSET, "Armory 2", 0, never_exclude=False), "Twin-Linked Flamethrower (Hellion)": ItemData(300 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 0, classification=ItemClassification.useful),
"Thermite Filaments (Hellion)": ItemData(301+SC2WOL_ITEM_ID_OFFSET, "Armory 2", 1), "Thermite Filaments (Hellion)": ItemData(301 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 1),
"Cerberus Mine (Vulture)": ItemData(302 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 2), "Cerberus Mine (Vulture)": ItemData(302 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 2),
"Replenishable Magazine (Vulture)": ItemData(303 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 3), "Replenishable Magazine (Vulture)": ItemData(303 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 3),
"Multi-Lock Weapons System (Goliath)": ItemData(304 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 4), "Multi-Lock Weapons System (Goliath)": ItemData(304 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 4),
"Ares-Class Targeting System (Goliath)": ItemData(305 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 5), "Ares-Class Targeting System (Goliath)": ItemData(305 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 5),
"Tri-Lithium Power Cell (Diamondback)": ItemData(306 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 6, never_exclude=False), "Tri-Lithium Power Cell (Diamondback)": ItemData(306 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 6, classification=ItemClassification.useful),
"Shaped Hull (Diamondback)": ItemData(307 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 7, never_exclude=False), "Shaped Hull (Diamondback)": ItemData(307 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 7, classification=ItemClassification.useful),
"Maelstrom Rounds (Siege Tank)": ItemData(308 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 8), "Maelstrom Rounds (Siege Tank)": ItemData(308 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 8),
"Shaped Blast (Siege Tank)": ItemData(309 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 9), "Shaped Blast (Siege Tank)": ItemData(309 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 9),
"Rapid Deployment Tube (Medivac)": ItemData(310 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 10, never_exclude=False), "Rapid Deployment Tube (Medivac)": ItemData(310 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 10, classification=ItemClassification.useful),
"Advanced Healing AI (Medivac)": ItemData(311 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 11), "Advanced Healing AI (Medivac)": ItemData(311 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 11),
"Tomahawk Power Cells (Wraith)": ItemData(312 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 12, never_exclude=False), "Tomahawk Power Cells (Wraith)": ItemData(312 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 12, classification=ItemClassification.useful),
"Displacement Field (Wraith)": ItemData(313 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 13), "Displacement Field (Wraith)": ItemData(313 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 13),
"Ripwave Missiles (Viking)": ItemData(314 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 14), "Ripwave Missiles (Viking)": ItemData(314 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 14),
"Phobos-Class Weapons System (Viking)": ItemData(315 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 15), "Phobos-Class Weapons System (Viking)": ItemData(315 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 15),
"Cross-Spectrum Dampeners (Banshee)": ItemData(316 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 16, never_exclude=False), "Cross-Spectrum Dampeners (Banshee)": ItemData(316 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 16, classification=ItemClassification.useful),
"Shockwave Missile Battery (Banshee)": ItemData(317 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 17), "Shockwave Missile Battery (Banshee)": ItemData(317 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 17),
"Missile Pods (Battlecruiser)": ItemData(318 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 18, never_exclude=False), "Missile Pods (Battlecruiser)": ItemData(318 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 18, classification=ItemClassification.useful),
"Defensive Matrix (Battlecruiser)": ItemData(319 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 19, never_exclude=False), "Defensive Matrix (Battlecruiser)": ItemData(319 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 19, classification=ItemClassification.useful),
"Ocular Implants (Ghost)": ItemData(320 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 20), "Ocular Implants (Ghost)": ItemData(320 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 20),
"Crius Suit (Ghost)": ItemData(321 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 21), "Crius Suit (Ghost)": ItemData(321 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 21),
"Psionic Lash (Spectre)": ItemData(322 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 22), "Psionic Lash (Spectre)": ItemData(322 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 22),
"Nyx-Class Cloaking Module (Spectre)": ItemData(323 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 23), "Nyx-Class Cloaking Module (Spectre)": ItemData(323 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 23),
"330mm Barrage Cannon (Thor)": ItemData(324 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 24, never_exclude=False), "330mm Barrage Cannon (Thor)": ItemData(324 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 24, classification=ItemClassification.useful),
"Immortality Protocol (Thor)": ItemData(325 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 25, never_exclude=False), "Immortality Protocol (Thor)": ItemData(325 + SC2WOL_ITEM_ID_OFFSET, "Armory 2", 25, classification=ItemClassification.useful),
"Bunker": ItemData (400+SC2WOL_ITEM_ID_OFFSET, "Building", 0, progression=True), "Bunker": ItemData(400 + SC2WOL_ITEM_ID_OFFSET, "Building", 0, classification=ItemClassification.progression),
"Missile Turret": ItemData (401+SC2WOL_ITEM_ID_OFFSET, "Building", 1, progression=True), "Missile Turret": ItemData(401 + SC2WOL_ITEM_ID_OFFSET, "Building", 1, classification=ItemClassification.progression),
"Sensor Tower": ItemData (402+SC2WOL_ITEM_ID_OFFSET, "Building", 2), "Sensor Tower": ItemData(402 + SC2WOL_ITEM_ID_OFFSET, "Building", 2),
"War Pigs": ItemData (500 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 0), "War Pigs": ItemData(500 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 0),
"Devil Dogs": ItemData(501 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 1, never_exclude=False), "Devil Dogs": ItemData(501 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 1, classification=ItemClassification.useful),
"Hammer Securities": ItemData(502 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 2), "Hammer Securities": ItemData(502 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 2),
"Spartan Company": ItemData(503 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 3), "Spartan Company": ItemData(503 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 3),
"Siege Breakers": ItemData(504 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 4), "Siege Breakers": ItemData(504 + SC2WOL_ITEM_ID_OFFSET, "Mercenary", 4),
@ -117,33 +113,33 @@ item_table = {
"Automated Refinery": ItemData(604 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 4), "Automated Refinery": ItemData(604 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 4),
"Command Center Reactor": ItemData(605 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 5), "Command Center Reactor": ItemData(605 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 5),
"Raven": ItemData(606 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 6), "Raven": ItemData(606 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 6),
"Science Vessel": ItemData(607 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 7, progression=True), "Science Vessel": ItemData(607 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 7, classification=ItemClassification.progression),
"Tech Reactor": ItemData(608 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 8), "Tech Reactor": ItemData(608 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 8),
"Orbital Strike": ItemData(609 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 9), "Orbital Strike": ItemData(609 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 9),
"Shrike Turret": ItemData(610 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 10), "Shrike Turret": ItemData(610 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 10),
"Fortified Bunker": ItemData(611 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 11), "Fortified Bunker": ItemData(611 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 11),
"Planetary Fortress": ItemData(612 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 12), "Planetary Fortress": ItemData(612 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 12),
"Perdition Turret": ItemData(613 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 13), "Perdition Turret": ItemData(613 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 13),
"Predator": ItemData(614 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 14, never_exclude=False), "Predator": ItemData(614 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 14, classification=ItemClassification.useful),
"Hercules": ItemData(615 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 15, progression=True), "Hercules": ItemData(615 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 15, classification=ItemClassification.progression),
"Cellular Reactor": ItemData(616 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 16, never_exclude=False), "Cellular Reactor": ItemData(616 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 16, classification=ItemClassification.useful),
"Regenerative Bio-Steel": ItemData(617 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 17, never_exclude=False), "Regenerative Bio-Steel": ItemData(617 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 17, classification=ItemClassification.useful),
"Hive Mind Emulator": ItemData(618 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 18), "Hive Mind Emulator": ItemData(618 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 18),
"Psi Disrupter": ItemData(619 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 19, never_exclude=False), "Psi Disrupter": ItemData(619 + SC2WOL_ITEM_ID_OFFSET, "Laboratory", 19, classification=ItemClassification.useful),
"Zealot": ItemData(700 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 0, progression=True), "Zealot": ItemData(700 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 0, classification=ItemClassification.progression),
"Stalker": ItemData(701 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 1, progression=True), "Stalker": ItemData(701 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 1, classification=ItemClassification.progression),
"High Templar": ItemData(702 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 2, progression=True), "High Templar": ItemData(702 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 2, classification=ItemClassification.progression),
"Dark Templar": ItemData(703 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 3, progression=True), "Dark Templar": ItemData(703 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 3, classification=ItemClassification.progression),
"Immortal": ItemData(704 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 4, progression=True), "Immortal": ItemData(704 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 4, classification=ItemClassification.progression),
"Colossus": ItemData(705 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 5, progression=True), "Colossus": ItemData(705 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 5, classification=ItemClassification.progression),
"Phoenix": ItemData(706 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 6, progression=True), "Phoenix": ItemData(706 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 6, classification=ItemClassification.progression),
"Void Ray": ItemData(707 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 7, progression=True), "Void Ray": ItemData(707 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 7, classification=ItemClassification.progression),
"Carrier": ItemData(708 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 8, progression=True), "Carrier": ItemData(708 + SC2WOL_ITEM_ID_OFFSET, "Protoss", 8, classification=ItemClassification.progression),
"+15 Starting Minerals": ItemData(800+SC2WOL_ITEM_ID_OFFSET, "Minerals", 15, quantity=0, never_exclude=False), "+15 Starting Minerals": ItemData(800 + SC2WOL_ITEM_ID_OFFSET, "Minerals", 15, quantity=0),
"+15 Starting Vespene": ItemData(801+SC2WOL_ITEM_ID_OFFSET, "Vespene", 15, quantity=0, never_exclude=False), "+15 Starting Vespene": ItemData(801 + SC2WOL_ITEM_ID_OFFSET, "Vespene", 15, quantity=0),
"+2 Starting Supply": ItemData(802+SC2WOL_ITEM_ID_OFFSET, "Supply", 2, quantity=0, never_exclude=False), "+2 Starting Supply": ItemData(802 + SC2WOL_ITEM_ID_OFFSET, "Supply", 2, quantity=0),
} }
basic_unit: typing.Tuple[str, ...] = ( basic_unit: typing.Tuple[str, ...] = (
@ -154,7 +150,6 @@ basic_unit: typing.Tuple[str, ...] = (
'Vulture' 'Vulture'
) )
item_name_groups = {} item_name_groups = {}
for item, data in item_table.items(): for item, data in item_table.items():
item_name_groups.setdefault(data.type, []).append(item) item_name_groups.setdefault(data.type, []).append(item)
@ -170,4 +165,5 @@ filler_items: typing.Tuple[str, ...] = (
'+15 Starting Vespene' '+15 Starting Vespene'
) )
lookup_id_to_name: typing.Dict[int, str] = {data.code: item_name for item_name, data in get_full_item_list().items() if data.code} lookup_id_to_name: typing.Dict[int, str] = {data.code: item_name for item_name, data in get_full_item_list().items() if
data.code}

View File

@ -1,8 +1,8 @@
import typing import typing
from typing import List, Set, Tuple, NamedTuple from typing import List, Set, Tuple, NamedTuple
from BaseClasses import Item, MultiWorld, Location, Tutorial from BaseClasses import Item, MultiWorld, Location, Tutorial, ItemClassification
from ..AutoWorld import World, WebWorld from ..AutoWorld import WebWorld
from .Items import StarcraftWoLItem, item_table, filler_items, item_name_groups, get_full_item_list, \ from .Items import StarcraftWoLItem, item_table, filler_items, item_name_groups, get_full_item_list, \
basic_unit basic_unit
from .Locations import get_locations from .Locations import get_locations
@ -55,7 +55,7 @@ class SC2WoLWorld(World):
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
data = get_full_item_list()[name] data = get_full_item_list()[name]
return StarcraftWoLItem(name, data.progression, data.code, self.player) return StarcraftWoLItem(name, data.classification, data.code, self.player)
def create_regions(self): def create_regions(self):
self.mission_req_table = create_regions(self.world, self.player, get_locations(self.world, self.player), self.mission_req_table = create_regions(self.world, self.player, get_locations(self.world, self.player),
@ -96,8 +96,8 @@ class SC2WoLWorld(World):
def setup_events(world: MultiWorld, player: int, locked_locations: typing.List[str], location_cache: typing.List[Location]): def setup_events(world: MultiWorld, player: int, locked_locations: typing.List[str], location_cache: typing.List[Location]):
for location in location_cache: for location in location_cache:
if location.address == None: if location.address is None:
item = Item(location.name, True, None, player) item = Item(location.name, ItemClassification.progression, None, player)
locked_locations.append(location.name) locked_locations.append(location.name)
@ -178,10 +178,6 @@ def fill_item_pool_with_dummy_items(self: SC2WoLWorld, world: MultiWorld, player
def create_item_with_correct_settings(world: MultiWorld, player: int, name: str) -> Item: def create_item_with_correct_settings(world: MultiWorld, player: int, name: str) -> Item:
data = item_table[name] data = item_table[name]
item = Item(name, data.progression, data.code, player) item = Item(name, data.classification, data.code, player)
item.never_exclude = data.never_exclude
if not item.advancement:
return item
return item return item

View File

@ -17,7 +17,7 @@ from .Options import sm_options
from .Rom import get_base_rom_path, ROM_PLAYER_LIMIT, SMDeltaPatch from .Rom import get_base_rom_path, ROM_PLAYER_LIMIT, SMDeltaPatch
import Utils import Utils
from BaseClasses import Region, Entrance, Location, MultiWorld, Item, RegionType, CollectionState, Tutorial from BaseClasses import Region, Entrance, Location, MultiWorld, Item, ItemClassification, RegionType, CollectionState, Tutorial
from ..AutoWorld import World, AutoLogicRegister, WebWorld from ..AutoWorld import World, AutoLogicRegister, WebWorld
from logic.smboolmanager import SMBoolManager from logic.smboolmanager import SMBoolManager
@ -164,7 +164,8 @@ class SMWorld(World):
isAdvancement = False isAdvancement = False
itemClass = ItemManager.Items[item.Type].Class itemClass = ItemManager.Items[item.Type].Class
smitem = SMItem(item.Name, isAdvancement, item.Type, None if itemClass == 'Boss' else self.item_name_to_id[item.Name], player = self.player) smitem = SMItem(item.Name, ItemClassification.progression if isAdvancement else ItemClassification.filler,
item.Type, None if itemClass == 'Boss' else self.item_name_to_id[item.Name], player=self.player)
if itemClass == 'Boss': if itemClass == 'Boss':
self.locked_items[item.Name] = smitem self.locked_items[item.Name] = smitem
elif item.Category == 'Nothing': elif item.Category == 'Nothing':
@ -526,7 +527,8 @@ class SMWorld(World):
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
item = next(x for x in ItemManager.Items.values() if x.Name == name) item = next(x for x in ItemManager.Items.values() if x.Name == name)
return SMItem(item.Name, True, item.Type, self.item_name_to_id[item.Name], player = self.player) return SMItem(item.Name, ItemClassification.progression, item.Type, self.item_name_to_id[item.Name],
player=self.player)
def get_filler_item_name(self) -> str: def get_filler_item_name(self) -> str:
if self.world.random.randint(0, 100) < self.world.minor_qty[self.player].value: if self.world.random.randint(0, 100) < self.world.minor_qty[self.player].value:
@ -660,9 +662,10 @@ class SMLocation(Location):
return True return True
return False return False
class SMItem(Item): class SMItem(Item):
game = "Super Metroid" game = "Super Metroid"
def __init__(self, name, advancement, type, code, player: int = None): def __init__(self, name, classification, type, code, player: int = None):
super(SMItem, self).__init__(name, advancement, code, player) super(SMItem, self).__init__(name, classification, code, player)
self.type = type self.type = type

View File

@ -1,8 +1,10 @@
from BaseClasses import Item from BaseClasses import Item
class SM64Item(Item): class SM64Item(Item):
game: str = "Super Mario 64" game: str = "Super Mario 64"
generic_item_table = { generic_item_table = {
"Power Star": 3626000, "Power Star": 3626000,
"Basement Key": 3626178, "Basement Key": 3626178,

View File

@ -6,7 +6,7 @@ from .Locations import location_table, SM64Location
from .Options import sm64_options from .Options import sm64_options
from .Rules import set_rules from .Rules import set_rules
from .Regions import create_regions, sm64courses from .Regions import create_regions, sm64courses
from BaseClasses import Region, RegionType, Entrance, Item, MultiWorld, Tutorial from BaseClasses import Item, Tutorial, ItemClassification
from ..AutoWorld import World, WebWorld from ..AutoWorld import World, WebWorld
client_version = 1 client_version = 1
@ -63,9 +63,14 @@ class SM64World(World):
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
item_id = item_table[name] item_id = item_table[name]
item = SM64Item(name, name != "1Up Mushroom", item_id, self.player) if name == "1Up Mushroom":
if name == "Power Star": classification = ItemClassification.filler
item.skip_in_prog_balancing = True elif name == "Power Star":
classification = ItemClassification.progression_skip_balancing
else:
classification = ItemClassification.progression
item = SM64Item(name, classification, item_id, self.player)
return item return item
def generate_basic(self): def generate_basic(self):

View File

@ -5,7 +5,8 @@ import random
import threading import threading
from typing import Dict, Set, TextIO from typing import Dict, Set, TextIO
from BaseClasses import Region, Entrance, Location, MultiWorld, Item, RegionType, CollectionState, Tutorial from BaseClasses import Region, Entrance, Location, MultiWorld, Item, ItemClassification, RegionType, CollectionState, \
Tutorial
from worlds.generic.Rules import set_rule from worlds.generic.Rules import set_rule
import worlds.smz3.TotalSMZ3.Item as TotalSMZ3Item import worlds.smz3.TotalSMZ3.Item as TotalSMZ3Item
from worlds.smz3.TotalSMZ3.World import World as TotalSMZ3World from worlds.smz3.TotalSMZ3.World import World as TotalSMZ3World
@ -111,11 +112,11 @@ class SMZ3World(World):
else: else:
progressionItems = self.progression progressionItems = self.progression
for item in self.keyCardsItems: for item in self.keyCardsItems:
self.world.push_precollected(SMZ3Item(item.Type.name, False, item.Type, self.item_name_to_id[item.Type.name], self.player, item)) self.world.push_precollected(SMZ3Item(item.Type.name, ItemClassification.filler, item.Type, self.item_name_to_id[item.Type.name], self.player, item))
itemPool = [SMZ3Item(item.Type.name, True, item.Type, self.item_name_to_id[item.Type.name], self.player, item) for item in progressionItems] + \ itemPool = [SMZ3Item(item.Type.name, ItemClassification.progression, item.Type, self.item_name_to_id[item.Type.name], self.player, item) for item in progressionItems] + \
[SMZ3Item(item.Type.name, False, item.Type, self.item_name_to_id[item.Type.name], self.player, item) for item in allJunkItems] [SMZ3Item(item.Type.name, ItemClassification.filler, item.Type, self.item_name_to_id[item.Type.name], self.player, item) for item in allJunkItems]
self.smz3DungeonItems = [SMZ3Item(item.Type.name, True, item.Type, self.item_name_to_id[item.Type.name], self.player, item) for item in self.dungeon] self.smz3DungeonItems = [SMZ3Item(item.Type.name, ItemClassification.progression, item.Type, self.item_name_to_id[item.Type.name], self.player, item) for item in self.dungeon]
self.world.itempool += itemPool self.world.itempool += itemPool
def set_rules(self): def set_rules(self):
@ -260,7 +261,7 @@ class SMZ3World(World):
self.world.seed, self.world.seed,
self.local_random, self.local_random,
self.world.world_name_lookup, self.world.world_name_lookup,
next(iter(loc.player for loc in self.world.get_locations() if loc.item == self.create_item("SilverArrows")))) next(iter(loc.player for loc in self.world.get_locations() if (loc.item.name == "SilverArrows" and loc.item.player == self.player))))
patches = patcher.Create(self.smz3World.Config) patches = patcher.Create(self.smz3World.Config)
patches.update(self.apply_sm_custom_sprite()) patches.update(self.apply_sm_custom_sprite())
patches.update(self.apply_item_names()) patches.update(self.apply_item_names())
@ -328,7 +329,8 @@ class SMZ3World(World):
return False return False
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
return SMZ3Item(name, True, TotalSMZ3Item.ItemType[name], self.item_name_to_id[name], player = self.player) return SMZ3Item(name, ItemClassification.progression,
TotalSMZ3Item.ItemType[name], self.item_name_to_id[name], player = self.player)
def pre_fill(self): def pre_fill(self):
from Fill import fill_restrictive from Fill import fill_restrictive
@ -351,7 +353,7 @@ class SMZ3World(World):
exception_item = [TotalSMZ3Item.ItemType.BigKeySW, TotalSMZ3Item.ItemType.BigKeySP, TotalSMZ3Item.ItemType.KeyTH] exception_item = [TotalSMZ3Item.ItemType.BigKeySW, TotalSMZ3Item.ItemType.BigKeySP, TotalSMZ3Item.ItemType.KeyTH]
for item in self.smz3DungeonItems: for item in self.smz3DungeonItems:
if item.item.Type in exception_item and item.location.always_allow(all_state, item) and not all_state.can_reach(item.location): if item.item.Type in exception_item and item.location.always_allow(all_state, item) and not all_state.can_reach(item.location):
item.advancement = False item.classification = ItemClassification.filler
item.item.Progression = False item.item.Progression = False
item.location.event = False item.location.event = False
self.unreachable.append(item.location) self.unreachable.append(item.location)
@ -446,7 +448,7 @@ class SMZ3Location(Location):
class SMZ3Item(Item): class SMZ3Item(Item):
game = "SMZ3" game = "SMZ3"
def __init__(self, name, advancement, type, code, player: int = None, item = None): def __init__(self, name, classification, type, code, player: int = None, item=None):
self.type = type self.type = type
self.item = item self.item = item
super(SMZ3Item, self).__init__(name, advancement, code, player) super(SMZ3Item, self).__init__(name, classification, code, player)

View File

@ -1,6 +1,6 @@
from ..AutoWorld import World, WebWorld from ..AutoWorld import World, WebWorld
from ..generic.Rules import set_rule from ..generic.Rules import set_rule
from BaseClasses import Region, Location, Entrance, Item, RegionType, Tutorial from BaseClasses import Region, Location, Entrance, Item, RegionType, Tutorial, ItemClassification
from Utils import output_path from Utils import output_path
import typing import typing
import os import os
@ -173,15 +173,19 @@ class SoEWorld(World):
super(SoEWorld, self).__init__(*args, **kwargs) super(SoEWorld, self).__init__(*args, **kwargs)
def create_event(self, event: str) -> Item: def create_event(self, event: str) -> Item:
progression = True return SoEItem(event, ItemClassification.progression, None, self.player)
return SoEItem(event, progression, None, self.player)
def create_item(self, item: typing.Union[pyevermizer.Item, str]) -> Item: def create_item(self, item: typing.Union[pyevermizer.Item, str]) -> Item:
if type(item) is str: if type(item) is str:
item = self.item_id_to_raw[self.item_name_to_id[item]] item = self.item_id_to_raw[self.item_name_to_id[item]]
res = SoEItem(item.name, item.progression, self.item_name_to_id[item.name], self.player) if item.type == pyevermizer.CHECK_TRAP:
res.trap = item.type == pyevermizer.CHECK_TRAP classification = ItemClassification.trap
return res elif item.progression:
classification = ItemClassification.progression
else:
classification = ItemClassification.filler
return SoEItem(item.name, classification, self.item_name_to_id[item.name], self.player)
@classmethod @classmethod
def stage_assert_generate(cls, world): def stage_assert_generate(cls, world):
@ -339,6 +343,7 @@ class SoEWorld(World):
def get_filler_item_name(self) -> str: def get_filler_item_name(self) -> str:
return self.world.random.choice(list(self.item_name_groups["Ingredients"])) return self.world.random.choice(list(self.item_name_groups["Ingredients"]))
class SoEItem(Item): class SoEItem(Item):
game: str = "Secret of Evermore" game: str = "Secret of Evermore"

View File

@ -1,6 +1,6 @@
import string import string
from BaseClasses import Item, MultiWorld, Region, Location, Entrance, Tutorial from BaseClasses import Item, MultiWorld, Region, Location, Entrance, Tutorial, ItemClassification, RegionType
from .Items import item_table, item_pool, event_item_pairs from .Items import item_table, item_pool, event_item_pairs
from .Locations import location_table from .Locations import location_table
from .Regions import create_regions from .Regions import create_regions
@ -12,7 +12,8 @@ from .Options import spire_options
class SpireWeb(WebWorld): class SpireWeb(WebWorld):
tutorials = [Tutorial( tutorials = [Tutorial(
"Multiworld Setup Guide", "Multiworld Setup Guide",
"A guide to setting up Slay the Spire for Archipelago. This guide covers single-player, multiworld, and related software.", "A guide to setting up Slay the Spire for Archipelago. "
"This guide covers single-player, multiworld, and related software.",
"English", "English",
"slay-the-spire_en.md", "slay-the-spire_en.md",
"slay-the-spire/en", "slay-the-spire/en",
@ -45,20 +46,7 @@ class SpireWorld(World):
pool = [] pool = []
for name, data in item_table.items(): for name, data in item_table.items():
if not data.event: if not data.event:
if name in item_pool: for amount in range(item_pool.get(name, 1)):
card_draw = 0
for amount in range(item_pool[name]):
item = SpireItem(name, self.player)
# This feels wrong but it makes our failure rate drop dramatically
# makes all but 7 basic card draws trash fill
if item.name == "Card Draw":
card_draw += 1
if card_draw > 7:
item.advancement = False
pool.append(item)
else:
item = SpireItem(name, self.player) item = SpireItem(name, self.player)
pool.append(item) pool.append(item)
@ -77,8 +65,7 @@ class SpireWorld(World):
set_rules(self.world, self.player) set_rules(self.world, self.player)
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
item_data = item_table[name] return SpireItem(name, self.player)
return Item(name, item_data.progression, item_data.code, self.player)
def create_regions(self): def create_regions(self):
create_regions(self.world, self.player) create_regions(self.world, self.player)
@ -95,7 +82,7 @@ class SpireWorld(World):
def create_region(world: MultiWorld, player: int, name: str, locations=None, exits=None): def create_region(world: MultiWorld, player: int, name: str, locations=None, exits=None):
ret = Region(name, None, name, player) ret = Region(name, RegionType.Generic, name, player)
ret.world = world ret.world = world
if locations: if locations:
for location in locations: for location in locations:
@ -124,4 +111,8 @@ class SpireItem(Item):
def __init__(self, name, player: int = None): def __init__(self, name, player: int = None):
item_data = item_table[name] item_data = item_table[name]
super(SpireItem, self).__init__(name, item_data.progression, item_data.code, player) super(SpireItem, self).__init__(
name,
ItemClassification.progression if item_data.progression else ItemClassification.filler,
item_data.code, player
)

View File

@ -11,7 +11,7 @@ from .Regions import create_regions
from .Rules import set_rules from .Rules import set_rules
from .Options import options from .Options import options
from BaseClasses import Region, Entrance, Location, MultiWorld, Item, Tutorial from BaseClasses import Region, Entrance, Location, MultiWorld, Item, Tutorial, ItemClassification, RegionType
from ..AutoWorld import World, WebWorld from ..AutoWorld import World, WebWorld
@ -74,7 +74,7 @@ class SubnauticaWorld(World):
self.world.get_location("Aurora - Captain Data Terminal", self.player).place_locked_item( self.world.get_location("Aurora - Captain Data Terminal", self.player).place_locked_item(
neptune_launch_platform) neptune_launch_platform)
self.world.get_location("Neptune Launch", self.player).place_locked_item( self.world.get_location("Neptune Launch", self.player).place_locked_item(
SubnauticaItem("Victory", True, None, player=self.player)) SubnauticaItem("Victory", ItemClassification.progression, None, player=self.player))
def set_rules(self): def set_rules(self):
set_rules(self.world, self.player) set_rules(self.world, self.player)
@ -88,10 +88,13 @@ class SubnauticaWorld(World):
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
item = lookup_name_to_item[name] item = lookup_name_to_item[name]
return SubnauticaItem(name, item["progression"], item["id"], player=self.player) return SubnauticaItem(name,
ItemClassification.progression if item["progression"] else ItemClassification.filler,
item["id"], player=self.player)
def create_region(world: MultiWorld, player: int, name: str, locations=None, exits=None): def create_region(world: MultiWorld, player: int, name: str, locations=None, exits=None):
ret = Region(name, None, name, player) ret = Region(name, RegionType.Generic, name, player)
ret.world = world ret.world = world
if locations: if locations:
for location in locations: for location in locations:

View File

@ -5,11 +5,11 @@ class ItemData(NamedTuple):
code: int code: int
count: int = 1 count: int = 1
progression: bool = False progression: bool = False
never_exclude: bool = False useful: bool = False
# A lot of items arent normally dropped by the randomizer as they are mostly enemy drops, but they can be enabled if desired # A lot of items arent normally dropped by the randomizer as they are mostly enemy drops, but they can be enabled if desired
item_table: Dict[str, ItemData] = { item_table: Dict[str, ItemData] = {
'Eternal Crown': ItemData('Equipment', 1337000, never_exclude=True), 'Eternal Crown': ItemData('Equipment', 1337000, useful=True),
'Security Visor': ItemData('Equipment', 1337001, 0), 'Security Visor': ItemData('Equipment', 1337001, 0),
'Engineer Goggles': ItemData('Equipment', 1337002, 0), 'Engineer Goggles': ItemData('Equipment', 1337002, 0),
'Leather Helmet': ItemData('Equipment', 1337003, 0), 'Leather Helmet': ItemData('Equipment', 1337003, 0),
@ -40,24 +40,24 @@ item_table: Dict[str, ItemData] = {
'Lab Coat': ItemData('Equipment', 1337028), 'Lab Coat': ItemData('Equipment', 1337028),
'Empress Robe': ItemData('Equipment', 1337029), 'Empress Robe': ItemData('Equipment', 1337029),
'Princess Dress': ItemData('Equipment', 1337030), 'Princess Dress': ItemData('Equipment', 1337030),
'Eternal Coat': ItemData('Equipment', 1337031, never_exclude=True), 'Eternal Coat': ItemData('Equipment', 1337031, useful=True),
'Synthetic Plume': ItemData('Equipment', 1337032, 0), 'Synthetic Plume': ItemData('Equipment', 1337032, 0),
'Cheveur Plume': ItemData('Equipment', 1337033, 0), 'Cheveur Plume': ItemData('Equipment', 1337033, 0),
'Metal Wristband': ItemData('Equipment', 1337034), 'Metal Wristband': ItemData('Equipment', 1337034),
'Nymph Hairband': ItemData('Equipment', 1337035, 0), 'Nymph Hairband': ItemData('Equipment', 1337035, 0),
'Mother o\' Pearl': ItemData('Equipment', 1337036, 0), 'Mother o\' Pearl': ItemData('Equipment', 1337036, 0),
'Bird Statue': ItemData('Equipment', 1337037, never_exclude=True), 'Bird Statue': ItemData('Equipment', 1337037, useful=True),
'Chaos Stole': ItemData('Equipment', 1337038, 0), 'Chaos Stole': ItemData('Equipment', 1337038, 0),
'Pendulum': ItemData('Equipment', 1337039, never_exclude=True), 'Pendulum': ItemData('Equipment', 1337039, useful=True),
'Chaos Horn': ItemData('Equipment', 1337040, 0), 'Chaos Horn': ItemData('Equipment', 1337040, 0),
'Filigree Clasp': ItemData('Equipment', 1337041), 'Filigree Clasp': ItemData('Equipment', 1337041),
'Azure Stole': ItemData('Equipment', 1337042, 0), 'Azure Stole': ItemData('Equipment', 1337042, 0),
'Ancient Coin': ItemData('Equipment', 1337043), 'Ancient Coin': ItemData('Equipment', 1337043),
'Shiny Rock': ItemData('Equipment', 1337044), 'Shiny Rock': ItemData('Equipment', 1337044),
'Galaxy Earrings': ItemData('Equipment', 1337045, never_exclude=True), 'Galaxy Earrings': ItemData('Equipment', 1337045, useful=True),
'Selen\'s Bangle': ItemData('Equipment', 1337046, never_exclude=True), 'Selen\'s Bangle': ItemData('Equipment', 1337046, useful=True),
'Glass Pumpkin': ItemData('Equipment', 1337047, never_exclude=True), 'Glass Pumpkin': ItemData('Equipment', 1337047, useful=True),
'Gilded Egg': ItemData('Equipment', 1337048, never_exclude=True), 'Gilded Egg': ItemData('Equipment', 1337048, useful=True),
'Meyef': ItemData('Familiar', 1337049), 'Meyef': ItemData('Familiar', 1337049),
'Griffin': ItemData('Familiar', 1337050), 'Griffin': ItemData('Familiar', 1337050),
'Merchant Crow': ItemData('Familiar', 1337051, progression=True), 'Merchant Crow': ItemData('Familiar', 1337051, progression=True),
@ -135,7 +135,7 @@ item_table: Dict[str, ItemData] = {
'Library Keycard V': ItemData('Relic', 1337123, progression=True), 'Library Keycard V': ItemData('Relic', 1337123, progression=True),
'Tablet': ItemData('Relic', 1337124, progression=True), 'Tablet': ItemData('Relic', 1337124, progression=True),
'Elevator Keycard': ItemData('Relic', 1337125, progression=True), 'Elevator Keycard': ItemData('Relic', 1337125, progression=True),
'Jewelry Box': ItemData('Relic', 1337126, never_exclude=True), 'Jewelry Box': ItemData('Relic', 1337126, useful=True),
'Goddess Brooch': ItemData('Relic', 1337127), 'Goddess Brooch': ItemData('Relic', 1337127),
'Wyrm Brooch': ItemData('Relic', 1337128), 'Wyrm Brooch': ItemData('Relic', 1337128),
'Greed Brooch': ItemData('Relic', 1337129), 'Greed Brooch': ItemData('Relic', 1337129),
@ -172,7 +172,7 @@ item_table: Dict[str, ItemData] = {
'Bombardment': ItemData('Orb Spell', 1337160), 'Bombardment': ItemData('Orb Spell', 1337160),
'Corruption': ItemData('Orb Spell', 1337161), 'Corruption': ItemData('Orb Spell', 1337161),
'Lightwall': ItemData('Orb Spell', 1337162, progression=True), 'Lightwall': ItemData('Orb Spell', 1337162, progression=True),
'Bleak Ring': ItemData('Orb Passive', 1337163, never_exclude=True), 'Bleak Ring': ItemData('Orb Passive', 1337163, useful=True),
'Scythe Ring': ItemData('Orb Passive', 1337164), 'Scythe Ring': ItemData('Orb Passive', 1337164),
'Pyro Ring': ItemData('Orb Passive', 1337165, progression=True), 'Pyro Ring': ItemData('Orb Passive', 1337165, progression=True),
'Royal Ring': ItemData('Orb Passive', 1337166, progression=True), 'Royal Ring': ItemData('Orb Passive', 1337166, progression=True),
@ -181,12 +181,12 @@ item_table: Dict[str, ItemData] = {
'Tailwind Ring': ItemData('Orb Passive', 1337169), 'Tailwind Ring': ItemData('Orb Passive', 1337169),
'Economizer Ring': ItemData('Orb Passive', 1337170), 'Economizer Ring': ItemData('Orb Passive', 1337170),
'Dusk Ring': ItemData('Orb Passive', 1337171), 'Dusk Ring': ItemData('Orb Passive', 1337171),
'Star of Lachiem': ItemData('Orb Passive', 1337172, never_exclude=True), 'Star of Lachiem': ItemData('Orb Passive', 1337172, useful=True),
'Oculus Ring': ItemData('Orb Passive', 1337173, progression=True), 'Oculus Ring': ItemData('Orb Passive', 1337173, progression=True),
'Sanguine Ring': ItemData('Orb Passive', 1337174), 'Sanguine Ring': ItemData('Orb Passive', 1337174),
'Sun Ring': ItemData('Orb Passive', 1337175), 'Sun Ring': ItemData('Orb Passive', 1337175),
'Silence Ring': ItemData('Orb Passive', 1337176), 'Silence Ring': ItemData('Orb Passive', 1337176),
'Shadow Seal': ItemData('Orb Passive', 1337177, never_exclude=True), 'Shadow Seal': ItemData('Orb Passive', 1337177, useful=True),
'Hope Ring': ItemData('Orb Passive', 1337178), 'Hope Ring': ItemData('Orb Passive', 1337178),
'Max HP': ItemData('Stat', 1337179, 12), 'Max HP': ItemData('Stat', 1337179, 12),
'Max Aura': ItemData('Stat', 1337180, 13), 'Max Aura': ItemData('Stat', 1337180, 13),

View File

@ -1,12 +1,15 @@
from typing import Dict, List, Set, Tuple, TextIO from typing import Dict, List, Set, Tuple, TextIO
from BaseClasses import Item, MultiWorld, Location, Tutorial
from ..AutoWorld import World, WebWorld from BaseClasses import Item, MultiWorld, Location, Tutorial, ItemClassification
from .LogicMixin import TimespinnerLogic from .Items import get_item_names_per_category, item_table, starter_melee_weapons, starter_spells, \
from .Items import get_item_names_per_category, item_table, starter_melee_weapons, starter_spells, starter_progression_items, filler_items starter_progression_items, filler_items
from .Locations import get_locations, starter_progression_locations, EventId from .Locations import get_locations, starter_progression_locations, EventId
from .Regions import create_regions from .LogicMixin import TimespinnerLogic
from .Options import is_option_enabled, get_option_value, timespinner_options from .Options import is_option_enabled, get_option_value, timespinner_options
from .PyramidKeys import get_pyramid_keys_unlock from .PyramidKeys import get_pyramid_keys_unlock
from .Regions import create_regions
from ..AutoWorld import World, WebWorld
class TimespinnerWebWorld(WebWorld): class TimespinnerWebWorld(WebWorld):
theme = "ice" theme = "ice"
@ -30,6 +33,7 @@ class TimespinnerWebWorld(WebWorld):
tutorials = [setup, setup_de] tutorials = [setup, setup_de]
class TimespinnerWorld(World): class TimespinnerWorld(World):
""" """
Timespinner is a beautiful metroidvania inspired by classic 90s action-platformers. Timespinner is a beautiful metroidvania inspired by classic 90s action-platformers.
@ -58,7 +62,6 @@ class TimespinnerWorld(World):
self.location_cache = [] self.location_cache = []
self.pyramid_keys_unlock = get_pyramid_keys_unlock(world, player) self.pyramid_keys_unlock = get_pyramid_keys_unlock(world, player)
def generate_early(self): def generate_early(self):
# in generate_early the start_inventory isnt copied over to precollected_items yet, so we can still modify the options directly # in generate_early the start_inventory isnt copied over to precollected_items yet, so we can still modify the options directly
if self.world.start_inventory[self.player].value.pop('Meyef', 0) > 0: if self.world.start_inventory[self.player].value.pop('Meyef', 0) > 0:
@ -68,12 +71,10 @@ class TimespinnerWorld(World):
if self.world.start_inventory[self.player].value.pop('Jewelry Box', 0) > 0: if self.world.start_inventory[self.player].value.pop('Jewelry Box', 0) > 0:
self.world.StartWithJewelryBox[self.player].value = self.world.StartWithJewelryBox[self.player].option_true self.world.StartWithJewelryBox[self.player].value = self.world.StartWithJewelryBox[self.player].option_true
def create_regions(self): def create_regions(self):
create_regions(self.world, self.player, get_locations(self.world, self.player), create_regions(self.world, self.player, get_locations(self.world, self.player),
self.location_cache, self.pyramid_keys_unlock) self.location_cache, self.pyramid_keys_unlock)
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
return create_item_with_correct_settings(self.world, self.player, name) return create_item_with_correct_settings(self.world, self.player, name)
@ -81,11 +82,10 @@ class TimespinnerWorld(World):
return self.world.random.choice(filler_items) return self.world.random.choice(filler_items)
def set_rules(self): def set_rules(self):
setup_events(self.world, self.player, self.locked_locations, self.location_cache) setup_events(self.player, self.locked_locations, self.location_cache)
self.world.completion_condition[self.player] = lambda state: state.has('Killed Nightmare', self.player) self.world.completion_condition[self.player] = lambda state: state.has('Killed Nightmare', self.player)
def generate_basic(self): def generate_basic(self):
excluded_items = get_excluded_items(self, self.world, self.player) excluded_items = get_excluded_items(self, self.world, self.player)
@ -100,7 +100,6 @@ class TimespinnerWorld(World):
self.world.itempool += pool self.world.itempool += pool
def fill_slot_data(self) -> Dict[str, object]: def fill_slot_data(self) -> Dict[str, object]:
slot_data: Dict[str, object] = {} slot_data: Dict[str, object] = {}
@ -115,7 +114,6 @@ class TimespinnerWorld(World):
return slot_data return slot_data
def write_spoiler_header(self, spoiler_handle: TextIO): def write_spoiler_header(self, spoiler_handle: TextIO):
spoiler_handle.write('Twin Pyramid Keys unlock: %s\n' % (self.pyramid_keys_unlock)) spoiler_handle.write('Twin Pyramid Keys unlock: %s\n' % (self.pyramid_keys_unlock))
@ -176,7 +174,7 @@ def get_item_pool(world: MultiWorld, player: int, excluded_items: Set[str]) -> L
pool: List[Item] = [] pool: List[Item] = []
for name, data in item_table.items(): for name, data in item_table.items():
if not name in excluded_items: if name not in excluded_items:
for _ in range(data.count): for _ in range(data.count):
item = create_item_with_correct_settings(world, player, name) item = create_item_with_correct_settings(world, player, name)
pool.append(item) pool.append(item)
@ -217,27 +215,31 @@ def place_first_progression_item(world: MultiWorld, player: int, excluded_items:
def create_item_with_correct_settings(world: MultiWorld, player: int, name: str) -> Item: def create_item_with_correct_settings(world: MultiWorld, player: int, name: str) -> Item:
data = item_table[name] data = item_table[name]
if data.useful:
item = Item(name, data.progression, data.code, player) classification = ItemClassification.useful
item.never_exclude = data.never_exclude elif data.progression:
classification = ItemClassification.progression
else:
classification = ItemClassification.filler
item = Item(name, classification, data.code, player)
if not item.advancement: if not item.advancement:
return item return item
if (name == 'Tablet' or name == 'Library Keycard V') and not is_option_enabled(world, player, "DownloadableItems"): if (name == 'Tablet' or name == 'Library Keycard V') and not is_option_enabled(world, player, "DownloadableItems"):
item.advancement = False item.classification = ItemClassification.filler
elif name == 'Oculus Ring' and not is_option_enabled(world, player, "FacebookMode"): elif name == 'Oculus Ring' and not is_option_enabled(world, player, "FacebookMode"):
item.advancement = False item.classification = ItemClassification.filler
elif (name == 'Kobo' or name == 'Merchant Crow') and not is_option_enabled(world, player, "GyreArchives"): elif (name == 'Kobo' or name == 'Merchant Crow') and not is_option_enabled(world, player, "GyreArchives"):
item.advancement = False item.classification = ItemClassification.filler
return item return item
def setup_events(world: MultiWorld, player: int, locked_locations: List[str], location_cache: List[Location]): def setup_events(player: int, locked_locations: List[str], location_cache: List[Location]):
for location in location_cache: for location in location_cache:
if location.address == EventId: if location.address == EventId:
item = Item(location.name, True, EventId, player) item = Item(location.name, ItemClassification.progression, EventId, player)
locked_locations.append(location.name) locked_locations.append(location.name)

View File

@ -5,7 +5,7 @@ from .Locations import location_table, V6Location
from .Options import v6_options from .Options import v6_options
from .Rules import set_rules from .Rules import set_rules
from .Regions import create_regions from .Regions import create_regions
from BaseClasses import Region, RegionType, Entrance, Item, MultiWorld, Tutorial from BaseClasses import Item, ItemClassification, Tutorial
from ..AutoWorld import World, WebWorld from ..AutoWorld import World, WebWorld
client_version = 1 client_version = 1
@ -53,7 +53,7 @@ class V6World(World):
set_rules(self.world, self.player, self.area_connections, self.area_cost_map) set_rules(self.world, self.player, self.area_connections, self.area_cost_map)
def create_item(self, name: str) -> Item: def create_item(self, name: str) -> Item:
return V6Item(name, True, item_table[name], self.player) return V6Item(name, ItemClassification.progression, item_table[name], self.player)
def generate_basic(self): def generate_basic(self):
trinkets = [self.create_item("Trinket " + str(i+1).zfill(2)) for i in range(0,20)] trinkets = [self.create_item("Trinket " + str(i+1).zfill(2)) for i in range(0,20)]

View File

@ -4,7 +4,7 @@ Archipelago init file for The Witness
import typing import typing
from BaseClasses import Region, RegionType, Location, MultiWorld, Item, Entrance, Tutorial from BaseClasses import Region, RegionType, Location, MultiWorld, Item, Entrance, Tutorial, ItemClassification
from ..AutoWorld import World, WebWorld from ..AutoWorld import World, WebWorld
from .player_logic import StaticWitnessLogic, WitnessPlayerLogic from .player_logic import StaticWitnessLogic, WitnessPlayerLogic
from .locations import WitnessPlayerLocations, StaticWitnessLocations from .locations import WitnessPlayerLocations, StaticWitnessLocations
@ -98,8 +98,6 @@ class WitnessWorld(World):
# Put in junk items to fill the rest # Put in junk items to fill the rest
junk_size = len(self.locat.CHECK_LOCATION_TABLE) - len(pool) - len(self.locat.EVENT_LOCATION_TABLE) - less_junk junk_size = len(self.locat.CHECK_LOCATION_TABLE) - len(pool) - len(self.locat.EVENT_LOCATION_TABLE) - less_junk
print(junk_size)
for i in range(0, junk_size): for i in range(0, junk_size):
pool.append(self.create_item(self.get_filler_item_name())) pool.append(self.create_item(self.get_filler_item_name()))
@ -138,12 +136,18 @@ class WitnessWorld(World):
else: else:
item = StaticWitnessItems.ALL_ITEM_TABLE[name] item = StaticWitnessItems.ALL_ITEM_TABLE[name]
if item.trap:
classification = ItemClassification.trap
elif item.progression:
classification = ItemClassification.progression
elif item.never_exclude:
classification = ItemClassification.useful
else:
classification = ItemClassification.filler
new_item = WitnessItem( new_item = WitnessItem(
name, item.progression, item.code, player=self.player name, classification, item.code, player=self.player
) )
new_item.trap = item.trap
if item.never_exclude:
new_item.never_exclude = True
return new_item return new_item
def get_filler_item_name(self) -> str: # Used by itemlinks def get_filler_item_name(self) -> str: # Used by itemlinks