Core: add Item.trap property

This commit is contained in:
Fabian Dill
2021-09-29 05:21:33 +02:00
parent 0afbe7988e
commit bde02f696b
5 changed files with 22 additions and 9 deletions

View File

@@ -766,7 +766,10 @@ def patch_rom(world, rom, player, enemized):
if location.item is not None:
if not location.native_item:
itemid = get_nonnative_item_sprite(location.item.game)
if location.item.trap:
itemid = 0x5A # Nothing, which disguises
else:
itemid = get_nonnative_item_sprite(location.item.name)
# Keys in their native dungeon should use the orignal item code for keys
elif location.parent_region.dungeon:
if location.parent_region.dungeon.is_dungeon_item(location.item):