Files
Archipelago/worlds/gl/Items.py
T
jamesbrq f110a7efbc Gauntlet Legends: Implement New Game (#3499)
* Update GauntletLegendsClient.py

* Continuation of obelisk update

* APPP Implementation Groundwork.

* Continuation of APPP Implementation

* Create Pain.asm

* ROM verification modified since crc32 hash can no longer be calculated.

* Initial upload of barrel/chest locations.

* Finished adding and naming all chests/barrels.

* Continued locations.

* Added new yaml options

* Work on mirror shards

* Python 3.8 compatibility

* Finalized location names. Fixed lambda bug.

* v1.0

* Removed excess Docs and Changed item counts.

* Update Archipelago Unittests.run.xml

* Started working on Docs.

* Updated item arrays for client

* Fix client bugs

* Flake8 fixes + Yaml fix

* Update speed boots

* v1.1

* Update GauntletLegendsClient.py

* Update GauntletLegendsClient.py

* Update GauntletLegendsClient.py

* Update GauntletLegendsClient.py

* v1.0.4

* Initial Ruff format

* Formatting part-2

* More formatting + Doc changes

* Updated Docs

* Move client to root

* Update Client Name

* Make Imports Relative

* Add new yaml options + rename obelisks

* v1.1 Initial Upload

* v1.1.0 + some additions

* Client Update

* Client Updates

* pre-v1.1.1

* Update GauntletLegendsClient.py

* pre-1.2

* 1.2.0

* v1.2.1

* Client fixes

* v1.3.0

* v1.4.0

* v1.4.1

* Merged Changes

* Experimental

* pre-v1.5.0

* Changes

* v1.5.0

* Update GauntletLegendsClient.py

* Death Update

* pre v1.5.1

* Obelisk rule changes

* pre-v1.5.1

* Update GauntletLegendsClient.py

* v1.5.1

* v1.5.1

* Update GauntletLegendsClient.py

* Small fix

* Update GauntletLegendsClient.py

* v1.5.2

* pre-v1.6.0

* pre-v1.6.0

* v1.6.0

* Update

* Update GauntletLegendsClient.py

* Test

* pre-v1.6.0

* Client Updtaes

* Update GauntletLegendsClient.py

* Update GauntletLegendsClient.py

* Update GauntletLegendsClient.py

* Update Rom.py

* Update GauntletLegendsClient.py

* Update Rom.py

* Added Logging on stage enter

* v1.6.2

* v1.6.2

* Update Rom.py

* Update GauntletLegendsClient.py

* v1.6.3

* Small Update

* Update GauntletLegendsClient.py

* Update GauntletLegendsClient.py

* Update GauntletLegendsClient.py

* Changes ready for review

* Update Rom.py

* Remove root client

* Update inno_setup.iss

* Update client

* Initial Review Refactor

* Update Arrays.py

* Review refactor

* Update __init__.py

* Small tweaks after test generations

* Update GauntletLegendsClient.py

* Implement new check_locations() function

* Add name for Skorn to level_names Dict

* Fix for #4671

* Update __init__.py

* Adjust item frequency + Place 50% of filler as local

* Oops I modified the itempool after create_items teehee

* Update __init__.py

* Check MD5 hash before patching ROM

* Update __init__.py

* Fix get_filler_item_name()

* Update MD5 check to built in method in FilePath

* Update Rom.py

* Update worlds/gl/Rom.py

Co-authored-by: qwint <qwint.42@gmail.com>

* WIP Generation fixes

* v1.7.1

* Update Archipelago Unittests.run.xml

* 0.7.2

* Update GauntletLegendsClient.py

* Review Edits

* Update World description

* Fuzz fixes

* Update GauntletLegendsClient.py

* Make static data immutable

* Update option comparisons since no longer a Choice

* Update worlds/gl/Rom.py

Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>

* Update __init__.py

* Initial Update commit

* Progress

* Remove un-used import + Add manifest

* Add missing docstring for client command

* Progress

* pre-v2.0.0-BETA

* Updates

* Progress

* Working Generations

* Working IN-Game

* v2.0.0-BETA

* Create archipelago.json

* v2.0.1

* v2.0.1 FINAL

* pre v2.0.2

* Delete report.json

* Cleanup

* pre v2.0.2

* v2.0.2

* PR Ready

* Update Items.py

* Delete fuzz.py

* Update Items.py

* Update GauntletLegendsClient.py

* Fix scouting disabled locations

* Client Updates

* v2.0.3

* Increment World Version

* Docstring + slot_data updates

* Option name update + Remove redundant option

* Code Cleanup

* Trenches is level 24

* Frequencies

* More cleanup and removal of stale code. MISSING BASEPATCH

* v2.1.0

* Minor enemy changes

* Small fix

* Update Rom.py

* v2.1.1

* Small fixes

* Update basepatch.bsdiff4

* Update GauntletLegendsClient.py

* Socket error clarity

* Delete settings.local.json

* Update GauntletLegendsClient.py

* v2.1.2 fixes

* Boss portal fix

* Small client fix + Item Frequencies

* Update archipelago.json

* Fix for games playing with max difficulty lower than 4 not sending locations

* Update archipelago.json

* v2.1.5

* Fix for Chimera's lair mirror shard

* Update archipelago.json

* Mod Re-Base + Queue limits + Item Receiving fixes

* Options cleanup and newlines for some files

* Include v2.x features in docs

* Make sure players has at least 1 item

* v2.1.6

* Update archipelago.json

* Review Edits + Client Tweaks

---------

Co-authored-by: qwint <qwint.42@gmail.com>
Co-authored-by: Doug Hoskisson <beauxq@users.noreply.github.com>
Co-authored-by: Fabian Dill <Berserker66@users.noreply.github.com>
Co-authored-by: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com>
2026-07-11 19:26:27 +02:00

44 lines
1.3 KiB
Python

from collections.abc import Mapping
from types import MappingProxyType
from typing import Final
from BaseClasses import Item, ItemClassification
from .Data import portals, obelisks, mirror_shards
class ItemData:
id: int
item_name: str
progression: ItemClassification
rom_id: int
frequency: int
def __init__(self, id: int | None = 0, item_name: str = "", progression: int = 0, rom_id: str = "0x0", frequency: int = 1):
self.id = id
self.item_name = item_name
self.progression = ItemClassification(progression)
self.rom_id = int(rom_id, 16)
self.frequency = frequency
class GLItem(Item):
game: str = "Gauntlet Legends"
def import_items() -> tuple[ItemData, ...]:
import orjson
import pkgutil
return tuple(ItemData(**item) for item in orjson.loads(pkgutil.get_data(__name__, "json/items.json").decode("utf-8")))
item_list: Final[tuple[ItemData, ...]] = import_items()
item_table: Final[Mapping[str, ItemData]] = MappingProxyType({item.item_name: item for item in item_list})
items_by_id: Final[Mapping[int, ItemData]] = MappingProxyType({item.id: item for item in item_list})
gauntlet_item_name_groups = {
"Runestone": [f"Runestone {i}" for i in range(1, 14)],
"Portal": portals.keys(),
"Obelisk": obelisks,
"Mirror Shard": mirror_shards
}