383 lines
		
	
	
		
			8.7 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
		
		
			
		
	
	
			383 lines
		
	
	
		
			8.7 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
|   | from typing import Dict | ||
|  | 
 | ||
|  | enemy_id_to_name: Dict[int, str] = { | ||
|  |     0x00: "a Goblin", | ||
|  |     0x01: "an Armor goblin", | ||
|  |     0x02: "a Regal Goblin", | ||
|  |     0x03: "a Goblin Mage", | ||
|  |     0x04: "a Troll", | ||
|  |     0x05: "an Ork", | ||
|  |     0x06: "a Fighter ork", | ||
|  |     0x07: "an Ork Mage", | ||
|  |     0x08: "a Lizardman", | ||
|  |     0x09: "a Skull Lizard", | ||
|  |     0x0A: "an Armour Dait", | ||
|  |     0x0B: "a Dragonian", | ||
|  |     0x0C: "a Cyclops", | ||
|  |     0x0D: "a Mega Cyclops", | ||
|  |     0x0E: "a Flame genie", | ||
|  |     0x0F: "a Well Genie", | ||
|  |     0x10: "a Wind Genie", | ||
|  |     0x11: "an Earth Genie", | ||
|  |     0x12: "a Cobalt", | ||
|  |     0x13: "a Merman", | ||
|  |     0x14: "an Aqualoi", | ||
|  |     0x15: "an Imp", | ||
|  |     0x16: "a Fiend", | ||
|  |     0x17: "an Archfiend", | ||
|  |     0x18: "a Hound", | ||
|  |     0x19: "a Doben", | ||
|  |     0x1A: "a Winger", | ||
|  |     0x1B: "a Serfaco", | ||
|  |     0x1C: "a Pug", | ||
|  |     0x1D: "a Salamander", | ||
|  |     0x1E: "a Brinz Lizard", | ||
|  |     0x1F: "a Seahorse", | ||
|  |     0x20: "a Seirein", | ||
|  |     0x21: "an Earth Viper", | ||
|  |     0x22: "a Gnome", | ||
|  |     0x23: "a Wispy", | ||
|  |     0x24: "a Thunderbeast", | ||
|  |     0x25: "a Lunar bear", | ||
|  |     0x26: "a Shadowfly", | ||
|  |     0x27: "a Shadow", | ||
|  |     0x28: "a Lion", | ||
|  |     0x29: "a Sphinx", | ||
|  |     0x2A: "a Mad horse", | ||
|  |     0x2B: "an Armor horse", | ||
|  |     0x2C: "a Buffalo", | ||
|  |     0x2D: "a Bruse", | ||
|  |     0x2E: "a Bat", | ||
|  |     0x2F: "a Big Bat", | ||
|  |     0x30: "a Red Bat", | ||
|  |     0x31: "an Eagle", | ||
|  |     0x32: "a Hawk", | ||
|  |     0x33: "a Crow", | ||
|  |     0x34: "a Baby Frog", | ||
|  |     0x35: "a King Frog", | ||
|  |     0x36: "a Lizard", | ||
|  |     0x37: "a Newt", | ||
|  |     0x38: "a Needle Lizard", | ||
|  |     0x39: "a Poison Lizard", | ||
|  |     0x3A: "a Medusa", | ||
|  |     0x3B: "a Ramia", | ||
|  |     0x3C: "a Basilisk", | ||
|  |     0x3D: "a Cokatoris", | ||
|  |     0x3E: "a Scorpion", | ||
|  |     0x3F: "an Antares", | ||
|  |     0x40: "a Small Crab", | ||
|  |     0x41: "a Big Crab", | ||
|  |     0x42: "a Red Lobster", | ||
|  |     0x43: "a Spider", | ||
|  |     0x44: "a Web Spider", | ||
|  |     0x45: "a Beetle", | ||
|  |     0x46: "a Poison Beetle", | ||
|  |     0x47: "a Mosquito", | ||
|  |     0x48: "a Coridras", | ||
|  |     0x49: "a Spinner", | ||
|  |     0x4A: "a Tartona", | ||
|  |     0x4B: "an Armour Nail", | ||
|  |     0x4C: "a Moth", | ||
|  |     0x4D: "a Mega  Moth", | ||
|  |     0x4E: "a Big Bee", | ||
|  |     0x4F: "a Dark Fly", | ||
|  |     0x50: "a Stinger", | ||
|  |     0x51: "an Armor Bee", | ||
|  |     0x52: "a Sentopez", | ||
|  |     0x53: "a Cancer", | ||
|  |     0x54: "a Garbost", | ||
|  |     0x55: "a Bolt Fish", | ||
|  |     0x56: "a Moray", | ||
|  |     0x57: "a She Viper", | ||
|  |     0x58: "an Angler fish", | ||
|  |     0x59: "a Unicorn", | ||
|  |     0x5A: "an Evil Shell", | ||
|  |     0x5B: "a Drill Shell", | ||
|  |     0x5C: "a Snell", | ||
|  |     0x5D: "an Ammonite", | ||
|  |     0x5E: "an Evil Fish", | ||
|  |     0x5F: "a Squid", | ||
|  |     0x60: "a Kraken", | ||
|  |     0x61: "a Killer Whale", | ||
|  |     0x62: "a White Whale", | ||
|  |     0x63: "a Grianos", | ||
|  |     0x64: "a Behemoth", | ||
|  |     0x65: "a Perch", | ||
|  |     0x66: "a Current", | ||
|  |     0x67: "a Vampire Rose", | ||
|  |     0x68: "a Desert Rose", | ||
|  |     0x69: "a Venus Fly", | ||
|  |     0x6A: "a Moray Vine", | ||
|  |     0x6B: "a Torrent", | ||
|  |     0x6C: "a Mad Ent", | ||
|  |     0x6D: "a Crow Kelp", | ||
|  |     0x6E: "a Red Plant", | ||
|  |     0x6F: "La Fleshia", | ||
|  |     0x70: "a Wheel Eel", | ||
|  |     0x71: "a Skeleton", | ||
|  |     0x72: "a Ghoul", | ||
|  |     0x73: "a Zombie", | ||
|  |     0x74: "a Specter", | ||
|  |     0x75: "a Dark Spirit", | ||
|  |     0x76: "a Snatcher", | ||
|  |     0x77: "a Jurahan", | ||
|  |     0x78: "a Demise", | ||
|  |     0x79: "a Leech", | ||
|  |     0x7A: "a Necromancer", | ||
|  |     0x7B: "a Hade Chariot", | ||
|  |     0x7C: "a Hades", | ||
|  |     0x7D: "a Dark Skull", | ||
|  |     0x7E: "a Hades Skull", | ||
|  |     0x7F: "a Mummy", | ||
|  |     0x80: "a Vampire", | ||
|  |     0x81: "a Nosferato", | ||
|  |     0x82: "a Ghost Ship", | ||
|  |     0x83: "a Deadly Sword", | ||
|  |     0x84: "a Deadly Armor", | ||
|  |     0x85: "a T Rex", | ||
|  |     0x86: "a Brokion", | ||
|  |     0x87: "a Pumpkin Head", | ||
|  |     0x88: "a Mad Head", | ||
|  |     0x89: "a Snow Gas", | ||
|  |     0x8A: "a Great Coca", | ||
|  |     0x8B: "a Gargoyle", | ||
|  |     0x8C: "a Rogue Shape", | ||
|  |     0x8D: "a Bone Gorem", | ||
|  |     0x8E: "a Nuborg", | ||
|  |     0x8F: "a Wood Gorem", | ||
|  |     0x90: "a Mad Gorem", | ||
|  |     0x91: "a Green Clay", | ||
|  |     0x92: "a Sand Gorem", | ||
|  |     0x93: "a Magma Gorem", | ||
|  |     0x94: "an Iron Gorem", | ||
|  |     0x95: "a Gold Gorem", | ||
|  |     0x96: "a Hidora", | ||
|  |     0x97: "a Sea Hidora", | ||
|  |     0x98: "a High Hidora", | ||
|  |     0x99: "a King Hidora", | ||
|  |     0x9A: "an Orky", | ||
|  |     0x9B: "a Waiban", | ||
|  |     0x9C: "a White Dragon", | ||
|  |     0x9D: "a Red Dragon", | ||
|  |     0x9E: "a Blue Dragon", | ||
|  |     0x9F: "a Green Dragon", | ||
|  |     0xA0: "a Black Dragon", | ||
|  |     0xA1: "a Copper Dragon", | ||
|  |     0xA2: "a Silver Dragon", | ||
|  |     0xA3: "a Gold Dragon", | ||
|  |     0xA4: "a Red Jelly", | ||
|  |     0xA5: "a Blue Jelly", | ||
|  |     0xA6: "a Bili Jelly", | ||
|  |     0xA7: "a Red Core", | ||
|  |     0xA8: "a Blue Core", | ||
|  |     0xA9: "a Green Core", | ||
|  |     0xAA: "a No Core", | ||
|  |     0xAB: "a Mimic", | ||
|  |     0xAC: "a Blue Mimic", | ||
|  |     0xAD: "an Ice Roge", | ||
|  |     0xAE: "a Mushroom", | ||
|  |     0xAF: "a Big Mushr'm", | ||
|  |     0xB0: "a Minataurus", | ||
|  |     0xB1: "a Gorgon", | ||
|  |     0xB2: "a Ninja", | ||
|  |     0xB3: "an Asashin", | ||
|  |     0xB4: "a Samurai", | ||
|  |     0xB5: "a Dark Warrior", | ||
|  |     0xB6: "an Ochi Warrior", | ||
|  |     0xB7: "a Sly Fox", | ||
|  |     0xB8: "a Tengu", | ||
|  |     0xB9: "a Warm Eye", | ||
|  |     0xBA: "a Wizard", | ||
|  |     0xBB: "a Dark Sum'ner", | ||
|  |     0xBC: "the Big Catfish", | ||
|  |     0xBD: "a Follower", | ||
|  |     0xBE: "the Tarantula", | ||
|  |     0xBF: "Pierre", | ||
|  |     0xC0: "Daniele", | ||
|  |     0xC1: "the Venge Ghost", | ||
|  |     0xC2: "the Fire Dragon", | ||
|  |     0xC3: "the Tank", | ||
|  |     0xC4: "Idura", | ||
|  |     0xC5: "Camu", | ||
|  |     0xC6: "Gades", | ||
|  |     0xC7: "Amon", | ||
|  |     0xC8: "Erim", | ||
|  |     0xC9: "Daos", | ||
|  |     0xCA: "a Lizard Man", | ||
|  |     0xCB: "a Goblin", | ||
|  |     0xCC: "a Skeleton", | ||
|  |     0xCD: "a Regal Goblin", | ||
|  |     0xCE: "a Goblin", | ||
|  |     0xCF: "a Goblin Mage", | ||
|  |     0xD0: "a Slave", | ||
|  |     0xD1: "a Follower", | ||
|  |     0xD2: "a Groupie", | ||
|  |     0xD3: "the Egg Dragon", | ||
|  |     0xD4: "a Mummy", | ||
|  |     0xD5: "a Troll", | ||
|  |     0xD6: "Gades", | ||
|  |     0xD7: "Idura", | ||
|  |     0xD8: "a Lion", | ||
|  |     0xD9: "the Rogue Flower", | ||
|  |     0xDA: "a Gargoyle", | ||
|  |     0xDB: "a Ghost Ship", | ||
|  |     0xDC: "Idura", | ||
|  |     0xDD: "a Soldier", | ||
|  |     0xDE: "Gades", | ||
|  |     0xDF: "the Master", | ||
|  | } | ||
|  | 
 | ||
|  | enemy_name_to_sprite: Dict[str, int] = { | ||
|  |     "Ammonite": 0x81, | ||
|  |     "Antares": 0x8B, | ||
|  |     "Archfiend": 0xBD, | ||
|  |     "Armor Bee": 0x98, | ||
|  |     "Armor goblin": 0x9D, | ||
|  |     "Armour Dait": 0xEF, | ||
|  |     "Armour Nail": 0xEB, | ||
|  |     "Asashin": 0x82, | ||
|  |     "Baby Frog": 0xBE, | ||
|  |     "Basilisk": 0xB6, | ||
|  |     "Bat": 0x8F, | ||
|  |     "Beetle": 0x86, | ||
|  |     "Behemoth": 0xB6, | ||
|  |     "Big Bat": 0x8F, | ||
|  |     "Big Mushr'm": 0xDB, | ||
|  |     "Bili Jelly": 0xDE, | ||
|  |     "Black Dragon": 0xC0, | ||
|  |     "Blue Core": 0x95, | ||
|  |     "Blue Dragon": 0xC0, | ||
|  |     "Blue Jelly": 0xDD, | ||
|  |     "Blue Mimic": 0xF0, | ||
|  |     "Bone Gorem": 0xA0, | ||
|  |     "Brinz Lizard": 0xEE, | ||
|  |     "Brokion": 0xD3, | ||
|  |     "Buffalo": 0x84, | ||
|  |     "Cobalt": 0xA6, | ||
|  |     "Cokatoris": 0xD2, | ||
|  |     "Copper Dragon": 0xC0, | ||
|  |     "Coridras": 0xEA, | ||
|  |     "Crow": 0xB4, | ||
|  |     "Crow Kelp": 0xBC, | ||
|  |     "Cyclops": 0xB9, | ||
|  |     "Dark Skull": 0xB5, | ||
|  |     "Dark Spirit": 0xE7, | ||
|  |     "Dark Sum'ner": 0xAB, | ||
|  |     "Dark Warrior": 0xB0, | ||
|  |     "Deadly Armor": 0x99, | ||
|  |     "Deadly Sword": 0x90, | ||
|  |     "Demise": 0xAD, | ||
|  |     "Desert Rose": 0x96, | ||
|  |     "Dragonian": 0xEF, | ||
|  |     "Drill Shell": 0x81, | ||
|  |     "Eagle": 0xB4, | ||
|  |     "Earth Genie": 0xB9, | ||
|  |     "Earth Viper": 0xB3, | ||
|  |     "Evil Fish": 0x80, | ||
|  |     "Fiend": 0xBD, | ||
|  |     "Fighter ork": 0xA5, | ||
|  |     "Flame genie": 0xB9, | ||
|  |     "Garbost": 0xD8, | ||
|  |     "Ghost Ship": 0xD1, | ||
|  |     "Ghoul": 0xE1, | ||
|  |     "Gnome": 0xA5, | ||
|  |     "Goblin": 0x9D, | ||
|  |     "Gold Dragon": 0xC0, | ||
|  |     "Gold Gorem": 0xE2, | ||
|  |     "Gorgon": 0xAA, | ||
|  |     "Great Coca": 0xD2, | ||
|  |     "Green Core": 0x95, | ||
|  |     "Green Dragon": 0xC0, | ||
|  |     "Grianos": 0xB6, | ||
|  |     "Hade Chariot": 0xBA, | ||
|  |     "Hades": 0xBA, | ||
|  |     "Hades Skull": 0xB5, | ||
|  |     "Hidora": 0xBF, | ||
|  |     "High Hidora": 0xBF, | ||
|  |     "Hound": 0x8A, | ||
|  |     "Ice Roge": 0xBD, | ||
|  |     "Imp": 0xAC, | ||
|  |     "Iron Gorem": 0xA1, | ||
|  |     "Jurahan": 0xD5, | ||
|  |     "Leech": 0xAD, | ||
|  |     "Lion": 0xB7, | ||
|  |     "Lizard": 0x83, | ||
|  |     "Lizardman": 0x9E, | ||
|  |     "Lunar bear": 0x9B, | ||
|  |     "Mad Ent": 0x8E, | ||
|  |     "Mad Gorem": 0xA3, | ||
|  |     "Mad Head": 0xAF, | ||
|  |     "Mad horse": 0x85, | ||
|  |     "Magma Gorem": 0xE3, | ||
|  |     "Medusa": 0x9C, | ||
|  |     "Mega  Moth": 0xDC, | ||
|  |     "Mega Cyclops": 0xB9, | ||
|  |     "Mimic": 0xA4, | ||
|  |     "Minataurus": 0xAA, | ||
|  |     "Moray Vine": 0x9A, | ||
|  |     "Mosquito": 0x92, | ||
|  |     "Moth": 0x93, | ||
|  |     "Mummy": 0xA8, | ||
|  |     "Mushroom": 0x8C, | ||
|  |     "Necromancer": 0xAB, | ||
|  |     "Needle Lizard": 0xD6, | ||
|  |     "Newt": 0x83, | ||
|  |     "Ninja": 0x82, | ||
|  |     "No Core": 0x95, | ||
|  |     "Nosferato": 0x9F, | ||
|  |     "Nuborg": 0xE5, | ||
|  |     "Ochi Warrior": 0xB0, | ||
|  |     "Ork": 0xA5, | ||
|  |     "Orky": 0xBF, | ||
|  |     "Poison Beetle": 0xD7, | ||
|  |     "Pug": 0x8D, | ||
|  |     "Pumpkin Head": 0xAF, | ||
|  |     "Ramia": 0xAE, | ||
|  |     "Red Bat": 0x8F, | ||
|  |     "Red Core": 0x95, | ||
|  |     "Red Dragon": 0xC0, | ||
|  |     "Red Jelly": 0x94, | ||
|  |     "Red Plant": 0xEC, | ||
|  |     "Regal Goblin": 0x9D, | ||
|  |     "Rogue Shape": 0xC4, | ||
|  |     "Salamander": 0xC1, | ||
|  |     "Samurai": 0xB0, | ||
|  |     "Sand Gorem": 0xE4, | ||
|  |     "Scorpion": 0x8B, | ||
|  |     "Sea Hidora": 0xBF, | ||
|  |     "Seirein": 0xAE, | ||
|  |     "Sentopez": 0xDA, | ||
|  |     "Serfaco": 0xE8, | ||
|  |     "Shadow": 0xB2, | ||
|  |     "Silver Dragon": 0xC0, | ||
|  |     "Skeleton": 0xA0, | ||
|  |     "Skull Lizard": 0x9E, | ||
|  |     "Sly Fox": 0xED, | ||
|  |     "Snow Gas": 0xD2, | ||
|  |     "Specter": 0xE7, | ||
|  |     "Sphinx": 0xB7, | ||
|  |     "Spider": 0xD9, | ||
|  |     "Spinner": 0xE9, | ||
|  |     "Squid": 0x80, | ||
|  |     "Stinger": 0x98, | ||
|  |     "T Rex": 0xD3, | ||
|  |     "Tartona": 0xB8, | ||
|  |     "Tengu": 0xD4, | ||
|  |     "Thunderbeast": 0x9B, | ||
|  |     "Troll": 0xA9, | ||
|  |     "Vampire": 0x9F, | ||
|  |     "Vampire Rose": 0x96, | ||
|  |     "Venus Fly": 0xE0, | ||
|  |     "Waiban": 0xC3, | ||
|  |     "Warm Eye": 0x88, | ||
|  |     "Well Genie": 0xB9, | ||
|  |     "Wheel Eel": 0x97, | ||
|  |     "White Dragon": 0xC3, | ||
|  |     "Wind Genie": 0xB9, | ||
|  |     "Winger": 0xB1, | ||
|  |     "Wispy": 0x91, | ||
|  |     "Wizard": 0xAB, | ||
|  |     "Wood Gorem": 0xA2, | ||
|  |     "Zombie": 0xA7, | ||
|  | } |