Archipelago/worlds/yugioh06/locations.py

214 lines
7.3 KiB
Python
Raw Normal View History

Yu-Gi-oh! 2006: implement new game (#2795) * Initial implementation of Yu-Gi-Oh! WC 2006 * Added Opponents and banlists * Initial implementation of Yu-Gi-Oh! WC 2006 * Added Opponents and banlists * Added Campaign Logic * Added Bonuses Logic * Added challenge logic * fixed yugioh client * ygo06 rom cleanup and include lua * ygo06 patch cleanup * ygo06 move client to world folder * lots of small changes * bug fixes * implemented filler item for yugioh06 * BizHawkClient: Add client and connector * BizHawkClient: Add launcher component and inno_setup lines * BizHawkClient: Misc stability updates and small improvements Bad commit organization a consequence of working with two different branches and not keeping the commits separated * BizHawkClient: Add docstrings * BizHawkClient: Pull in changes from other branch * BizHawkClient: Fix no handler message not displaying after changed ROMs * BizHawkClient: Remove extra print statement from lua * BizHawkClient: Change version command to use raw strings * BizHawkClient: Change script version to single integer * YGO06: added logic for "all expect type forbidden" limited duels * YGO06: Structure Deck choice now affects logic. Fixed a bug with tier 5 campaign opponents. Added logic for TD16 Union. * BizHawkClient: Add newline to version for lua script * BizHawkClient: Call send_connect from BizHawkClient's watcher loop * BizHawkClient: Add handling for failed request getting script version * BizHawkClient: Have base64.lua check lua version explicitly for bit operations On 2.9, it would detect LuaJIT and flood the console with deprecation warnings * BizHawkClient: Update connector script for slightly better errors and address Gambatte frame sync issue * BizHawkClient: Remove accidentally added print statements * BizHawkClient: Fix connector server not closing correctly * BizHawkClient: Move some connector code around, some linting * BizHawkClient: Small cleanup in lua * BizHawkClient: Lua linting * BizHawkClient: Remove outdated sentences in docstrings * YGO06: Logic additions and bug fixes * BizHawkClient: Correctly null check patch file arg * BizHawkClient: Initialize logging * BizHawkClient: Move code to worlds/_bizhawk Also splits out BizHawk communication functions to their own file for use outside this client * BizHawkClient: Add license to connector lua, add types to docs * BizHawkClient: Add module docstrings * YGO06: Logic additions * BizHawkClient: Allow clients to define multiple systems * BizHawkClient: Better logging and handling of interruptions to connection to script * YGO06: Logic additions * YGO06: Added text to options * YGO06: Ported to bizhawk client * YGO06: fix goal not being detected * YGO06: fix access item rule for tier 5 column 1 and 2 * YGO06: docu and bug fixes * YGO06: change name * YGO06: some fixes * YGO06: fix starting opponent and booster not applying * YGO06: added option to reduce the amount of challenges and remove the no ban list from pool. * YGO06: added rom being asked for on first use * YGO06: fix rules for challenges * YGO06: create proper rules for TD04 Ritual Summon * YGO06: mark most banlists as usefull instead of progression * YGO06: reduce the required core boosters across the board * YGO06: fix client not loading if another game already loaded the bizhawk client * YGO06: fix client not finding the bizhawk client. * YGO06: fix TD08 Draw not giving out an item * YGO06: small text changes * YGO06: update to version 0.4.4 * YGO06: logic mixin clean-up * YGO06: added option for campaign opponents as goal * Pokemon Emerald add encounter table randomization * Pokemon Emerald: Item ball randomization working * Pokemon Emerald: Clean up code a little * Pokemon Emerald: Partial rework of region/location creation * Pokemon Emerald: Dedupe items and add more readable names * Refactor region creation to manually defined regions * Split region json * Use new data.json with flattened constants and add HM locations * YGO06: bug fixes * YGO06: bug fix * YGO06: changes default options to be more beginner friendly * YGO06: attempt at universal tracker support. Settings are stored in slot data now. * YGO06: fix for older python versions * YGO06: fix slot data * YGO06: added diiferent opponents to the campaign * YGO06: fix small bug with opponent icons * YGO06: fix unwanted changes * YGO06: repair merge with main * YGO06: map out all of the opponents * YGO06: added opponent shuffle * YGO06: added logic to opponent shuffle * YGO06: added option to use ocg art * YGO06: bug_fixes * YGO06: removed todos, since they are not needed anymore * YGO06: added draft mode * YGO06: added logic to draft mode * YGO06: Added Money multiplier when you lose * YGO06: Fixed Unit Test errors * YGO06: Added Random deck option * YGO06: Bug fix with registering client * YGO06: client clean-up * YGO06: fixed card misspellings * YGO06: removed unused imports and other small changes * YGO06: small changes * YGO06: fix generation error when the combination of starting with "No Banlist" and not adding "No Banlist" to the pool is selected * YGO06: fix ocg art path overwriting Huge Revolution bugfix * YGO06: added comments and other minor changes * YGO06: fixed byte length in client for money * YGO06: fixes for webhost and options * YGO06: use the proper random function * YGO06: change settings to options * YGO06: move to procedure patch * YGO06: fix imports * YGO06: fix download link for patch not showing * YGO06: remove unnecessary Optional * YGO06: fix universal tracker stuff * YGO06: add typings * YGO06: small cleanup * yugioh06: small change to setup Co-authored-by: Scipio Wright <scipiowright@gmail.com> * YGO06: remove logic mixin * YGO06: fix create item and implement create filler and get filler item name * YGO06: remove double lambdas * YGO06: use pkgutil.get_data instaed pf zipFile * YGO06: fix starting items being duplicated * YGO06: lots of small changes * YGO06: moved functions to match execution order * YGO06: run ruff * YGO06: run ruff format * YGO06: fix ruff errors * YGO06: undo ruff format for rules * YGO06: move import to prevent circular dependency * YGO06: remove unused class * YGO06: optimizing rules * YGO06: some optimization and small bug fix --------- Co-authored-by: Zunawe <gyroscope15@gmail.com> Co-authored-by: Scipio Wright <scipiowright@gmail.com>
2024-05-17 17:23:05 +00:00
Bonuses = {
"Duelist Bonus Level 1": 1,
"Duelist Bonus Level 2": 2,
"Duelist Bonus Level 3": 3,
"Duelist Bonus Level 4": 4,
"Duelist Bonus Level 5": 5,
"Battle Damage": 6,
"Battle Damage Only Bonus": 7,
"Max ATK Bonus": 8,
"Max Damage Bonus": 9,
"Destroyed in Battle Bonus": 10,
"Spell Card Bonus": 11,
"Trap Card Bonus": 12,
"Tribute Summon Bonus": 13,
"Fusion Summon Bonus": 14,
"Ritual Summon Bonus": 15,
"No Special Summon Bonus": 16,
"No Spell Cards Bonus": 17,
"No Trap Cards Bonus": 18,
"No Damage Bonus": 19,
"Over 20000 LP Bonus": 20,
"Low LP Bonus": 21,
"Extremely Low LP Bonus": 22,
"Low Deck Bonus": 23,
"Extremely Low Deck Bonus": 24,
"Effect Damage Only Bonus": 25,
"No More Cards Bonus": 26,
"Opponent's Turn Finish Bonus": 27,
"Exactly 0 LP Bonus": 28,
"Reversal Finish Bonus": 29,
"Quick Finish Bonus": 30,
"Exodia Finish Bonus": 31,
"Last Turn Finish Bonus": 32,
"Final Countdown Finish Bonus": 33,
"Destiny Board Finish Bonus": 34,
"Yata-Garasu Finish Bonus": 35,
"Skull Servant Finish Bonus": 36,
"Konami Bonus": 37,
}
Limited_Duels = {
"LD01 All except Level 4 forbidden": 38,
"LD02 Medium/high Level forbidden": 39,
"LD03 ATK 1500 or more forbidden": 40,
"LD04 Flip Effects forbidden": 41,
"LD05 Tributes forbidden": 42,
"LD06 Traps forbidden": 43,
"LD07 Large Deck A": 44,
"LD08 Large Deck B": 45,
"LD09 Sets Forbidden": 46,
"LD10 All except LV monsters forbidden": 47,
"LD11 All except Fairies forbidden": 48,
"LD12 All except Wind forbidden": 49,
"LD13 All except monsters forbidden": 50,
"LD14 Level 3 or below forbidden": 51,
"LD15 DEF 1500 or less forbidden": 52,
"LD16 Effect Monsters forbidden": 53,
"LD17 Spells forbidden": 54,
"LD18 Attacks forbidden": 55,
"LD19 All except E-Hero's forbidden": 56,
"LD20 All except Warriors forbidden": 57,
"LD21 All except Dark forbidden": 58,
"LD22 All limited cards forbidden": 59,
"LD23 Refer to Mar 05 Banlist": 60,
"LD24 Refer to Sept 04 Banlist": 61,
"LD25 Low Life Points": 62,
"LD26 All except Toons forbidden": 63,
"LD27 All except Spirits forbidden": 64,
"LD28 All except Dragons forbidden": 65,
"LD29 All except Spellcasters forbidden": 66,
"LD30 All except Light forbidden": 67,
"LD31 All except Fire forbidden": 68,
"LD32 Decks with multiples forbidden": 69,
"LD33 Special Summons forbidden": 70,
"LD34 Normal Summons forbidden": 71,
"LD35 All except Zombies forbidden": 72,
"LD36 All except Earth forbidden": 73,
"LD37 All except Water forbidden": 74,
"LD38 Refer to Mar 04 Banlist": 75,
"LD39 Monsters forbidden": 76,
"LD40 Refer to Sept 05 Banlist": 77,
"LD41 Refer to Sept 03 Banlist": 78,
}
Theme_Duels = {
"TD01 Battle Damage": 79,
"TD02 Deflected Damage": 80,
"TD03 Normal Summon": 81,
"TD04 Ritual Summon": 82,
"TD05 Special Summon A": 83,
"TD06 20x Spell": 84,
"TD07 10x Trap": 85,
"TD08 Draw": 86,
"TD09 Hand Destruction": 87,
"TD10 During Opponent's Turn": 88,
"TD11 Recover": 89,
"TD12 Remove Monsters by Effect": 90,
"TD13 Flip Summon": 91,
"TD14 Special Summon B": 92,
"TD15 Token": 93,
"TD16 Union": 94,
"TD17 10x Quick Spell": 95,
"TD18 The Forbidden": 96,
"TD19 20 Turns": 97,
"TD20 Deck Destruction": 98,
"TD21 Victory D.": 99,
"TD22 The Preventers Fight Back": 100,
"TD23 Huge Revolution": 101,
"TD24 Victory in 5 Turns": 102,
"TD25 Moth Grows Up": 103,
"TD26 Magnetic Power": 104,
"TD27 Dark Sage": 105,
"TD28 Direct Damage": 106,
"TD29 Destroy Monsters in Battle": 107,
"TD30 Tribute Summon": 108,
"TD31 Special Summon C": 109,
"TD32 Toon": 110,
"TD33 10x Counter": 111,
"TD34 Destiny Board": 112,
"TD35 Huge Damage in a Turn": 113,
"TD36 V-Z In the House": 114,
"TD37 Uria, Lord of Searing Flames": 115,
"TD38 Hamon, Lord of Striking Thunder": 116,
"TD39 Raviel, Lord of Phantasms": 117,
"TD40 Make a Chain": 118,
"TD41 The Gatekeeper Stands Tall": 119,
"TD42 Serious Damage": 120,
"TD43 Return Monsters with Effects": 121,
"TD44 Fusion Summon": 122,
"TD45 Big Damage at once": 123,
"TD46 XYZ In the House": 124,
"TD47 Spell Counter": 125,
"TD48 Destroy Monsters with Effects": 126,
"TD49 Plunder": 127,
"TD50 Dark Scorpion Combination": 128,
}
Campaign_Opponents = {
"Campaign Tier 1: 1 Win": 129,
"Campaign Tier 1: 3 Wins A": 130,
"Campaign Tier 1: 3 Wins B": 131,
"Campaign Tier 1: 5 Wins A": 132,
"Campaign Tier 1: 5 Wins B": 133,
"Campaign Tier 2: 1 Win": 134,
"Campaign Tier 2: 3 Wins A": 135,
"Campaign Tier 2: 3 Wins B": 136,
"Campaign Tier 2: 5 Wins A": 137,
"Campaign Tier 2: 5 Wins B": 138,
"Campaign Tier 3: 1 Win": 139,
"Campaign Tier 3: 3 Wins A": 140,
"Campaign Tier 3: 3 Wins B": 141,
"Campaign Tier 3: 5 Wins A": 142,
"Campaign Tier 3: 5 Wins B": 143,
"Campaign Tier 4: 5 Wins A": 144,
"Campaign Tier 4: 5 Wins B": 145,
}
special = {
"Campaign Tier 5: Column 1 Win": 146,
"Campaign Tier 5: Column 2 Win": 147,
"Campaign Tier 5: Column 3 Win": 148,
"Campaign Tier 5: Column 4 Win": 149,
# "Campaign Final Boss Win": 150,
}
Required_Cards = {
"Obtain all pieces of Exodia": 154,
"Obtain Final Countdown": 155,
"Obtain Victory Dragon": 156,
"Obtain Ojama Delta Hurricane and its required cards": 157,
"Obtain Huge Revolution and its required cards": 158,
"Obtain Perfectly Ultimate Great Moth and its required cards": 159,
"Obtain Valkyrion the Magna Warrior and its pieces": 160,
"Obtain Dark Sage and its required cards": 161,
"Obtain Destiny Board and its letters": 162,
"Obtain all XYZ-Dragon Cannon fusions and their materials": 163,
"Obtain VWXYZ-Dragon Catapult Cannon and the fusion materials": 164,
"Obtain Hamon, Lord of Striking Thunder": 165,
"Obtain Raviel, Lord of Phantasms": 166,
"Obtain Uria, Lord of Searing Flames": 167,
"Obtain Gate Guardian and its pieces": 168,
"Obtain Dark Scorpion Combination and its required cards": 169,
}
collection_events = {
"Ojama Delta Hurricane and required cards": None,
"Huge Revolution and its required cards": None,
"Perfectly Ultimate Great Moth and its required cards": None,
"Valkyrion the Magna Warrior and its pieces": None,
"Dark Sage and its required cards": None,
"Destiny Board and its letters": None,
"XYZ-Dragon Cannon fusions and their materials": None,
"VWXYZ-Dragon Catapult Cannon and the fusion materials": None,
"Gate Guardian and its pieces": None,
"Dark Scorpion Combination and its required cards": None,
"Can Exodia Win": None,
"Can Yata Lock": None,
"Can Stall with Monsters": None,
"Can Stall with ST": None,
"Can Last Turn Win": None,
"Has Back-row removal": None,
}
def get_beat_challenge_events(self):
beat_events = {}
for limited in Limited_Duels.keys():
if limited not in self.removed_challenges:
beat_events[limited + " Complete"] = None
for theme in Theme_Duels.keys():
if theme not in self.removed_challenges:
beat_events[theme + " Complete"] = None
return beat_events