|
|
|
@ -1,6 +1,8 @@ |
|
|
|
import networkx as nx |
|
|
|
from networkx import Graph |
|
|
|
|
|
|
|
from Routes.pokemon_game_desc import PokemonGameDesc |
|
|
|
|
|
|
|
NEW_BARK_TOWN = 'New Bark Town' |
|
|
|
CHERRYGROVE_CITY = 'Cherrygrove City' |
|
|
|
VIOLET_CITY = 'Violet City' |
|
|
|
@ -44,6 +46,7 @@ CINNABAR_ISLAND = 'Cinnabar Island' |
|
|
|
MT_SILVER = 'Mt. Silver' |
|
|
|
SAFARI_ZONE = 'Safari Zone' |
|
|
|
TOHJO_FALLS = 'Tohjo Falls' |
|
|
|
POWER_PLANT = 'Power Plant' |
|
|
|
|
|
|
|
CUT = 'Cut' |
|
|
|
SURF = 'Surf' |
|
|
|
@ -62,13 +65,46 @@ MINERAL_BADGE = 'Mineral Badge' |
|
|
|
GLACIER_BADGE = 'Glacier Badge' |
|
|
|
RISING_BADGE = 'Rising Badge' |
|
|
|
|
|
|
|
BOULDER_BADGE = 'Boulder Badge' |
|
|
|
CASCADE_BADGE = 'Cascade Badge' |
|
|
|
THUNDER_BADGE = 'Thunder Badge' |
|
|
|
RAINBOW_BADGE = 'Rainbow Badge' |
|
|
|
MARSH_BADGE = 'Marsh Badge' |
|
|
|
SOUL_BADGE = 'Soul Badge' |
|
|
|
VOLCANO_BADGE = 'Volcano Badge' |
|
|
|
EARTH_BADGE = 'Earth Badge' |
|
|
|
|
|
|
|
SQUIRTBOTTLE = 'Squirt bottle' |
|
|
|
MEDICINE = 'Medicine' |
|
|
|
CATCH_RED_GYRADOS = 'Catch Red Gryados' |
|
|
|
ROCKET_DEAFEATED = 'Rocket Defeated' |
|
|
|
OBTAIN_WING = 'Obtain Wing' |
|
|
|
PKMN_WING = 'Gold Silver Wing' |
|
|
|
JOHTO_CHAMPION = 'Johto Champion' |
|
|
|
S_S_TICKET = 'S.S. Ticket' |
|
|
|
WOKE_SNORLAX = 'Woke Snorlax' |
|
|
|
EXPN_CARD = 'Expn card' |
|
|
|
POWER_RESTORED = 'Power restored' |
|
|
|
MACHINE_PART = 'Machine Part' |
|
|
|
CLEFAIRY_DOLL = 'Clefairy Doll' |
|
|
|
RAIL_PASS = 'Rail Pass' |
|
|
|
MISTY_FOUND = 'Misty Found' |
|
|
|
FLUTE_CHANNEL = 'Flute Channel' |
|
|
|
|
|
|
|
FLY = 'Fly' |
|
|
|
|
|
|
|
FLY_OUT_OF_BATTLE = 'Fly out of battle' |
|
|
|
|
|
|
|
def get_gold_silver_desc() -> PokemonGameDesc: |
|
|
|
desc: PokemonGameDesc = PokemonGameDesc() |
|
|
|
desc.graph = get_gold_silver_route() |
|
|
|
desc.game_name = "Gold/Silver" |
|
|
|
desc.towns_and_cities = [NEW_BARK_TOWN, CHERRYGROVE_CITY, VIOLET_CITY, AZALEA_TOWN, GOLDENROD_CITY, ECRUTEAK_CITY, OLIVINE_CITY, CIANWOOD_CITY, MAHOGANY_TOWN, BLACKTHORN_CITY, PALLET_TOWN, VIRIDIAN_CITY, PEWTER_CITY, CERULEAN_CITY, SAFFRON_CITY, CELADON_CITY, VERMILION_CITY, FUCHSIA_CITY, CINNABAR_ISLAND] |
|
|
|
desc.badges = [ZEPHYR_BADGE, HIVE_BADGE, PLAIN_BADGE, FOG_BADGE, STORM_BADGE, MINERAL_BADGE, GLACIER_BADGE, RISING_BADGE, BOULDER_BADGE, CASCADE_BADGE, THUNDER_BADGE, RAINBOW_BADGE, MARSH_BADGE, SOUL_BADGE, VOLCANO_BADGE, EARTH_BADGE] |
|
|
|
desc.hms = [CUT, SURF, FLASH, STRENGTH, FLY, WATERFALL, WHIRLPOOL] |
|
|
|
desc.starting_town = NEW_BARK_TOWN |
|
|
|
desc.end_goal = MT_SILVER |
|
|
|
|
|
|
|
return desc |
|
|
|
|
|
|
|
def get_gold_silver_route() -> Graph: |
|
|
|
G = nx.Graph() |
|
|
|
@ -176,6 +212,10 @@ def get_gold_silver_route() -> Graph: |
|
|
|
G.add_edge(VICTORY_ROAD, INDIGO_PLATEAU, condition=None) |
|
|
|
G.add_edge('Route 22', 'Route 27', condition=None) |
|
|
|
|
|
|
|
G.add_edge(SS_AQUA, VERMILION_CITY, condition=None) |
|
|
|
G.add_edge(SAFFRON_CITY, GOLDENROD_CITY, condition=[POWER_RESTORED, RAIL_PASS]) |
|
|
|
G.add_edge(DIGLETTS_CAVE, 'Route 11', condition=[WOKE_SNORLAX]) |
|
|
|
|
|
|
|
G.nodes[NEW_BARK_TOWN]['grants_conditions'] = [ |
|
|
|
{'condition': S_S_TICKET, 'required_conditions': [JOHTO_CHAMPION]} |
|
|
|
] |
|
|
|
@ -227,5 +267,40 @@ def get_gold_silver_route() -> Graph: |
|
|
|
G.nodes[INDIGO_PLATEAU]['grants_conditions'] = [ |
|
|
|
{'condition': JOHTO_CHAMPION, 'required_conditions': []} |
|
|
|
] |
|
|
|
G.nodes[VERMILION_CITY]['grants_conditions'] = [ |
|
|
|
{'condition': THUNDER_BADGE, 'required_conditions': []}, |
|
|
|
{'condition': FLUTE_CHANNEL, 'required_conditions': [EXPN_CARD]}, |
|
|
|
{'condition': CLEFAIRY_DOLL, 'required_conditions': [POWER_RESTORED]}, |
|
|
|
] |
|
|
|
G.nodes[SAFFRON_CITY]['grants_conditions'] = [ |
|
|
|
{'condition': MARSH_BADGE, 'required_conditions': []}, |
|
|
|
{'condition': RAIL_PASS, 'required_conditions': [CLEFAIRY_DOLL]}, |
|
|
|
] |
|
|
|
G.nodes[LAVENDER_TOWN]['grants_conditions'] = [ |
|
|
|
{'condition': EXPN_CARD, 'required_conditions': [POWER_RESTORED]} |
|
|
|
] |
|
|
|
G.nodes[POWER_PLANT]['grants_conditions'] = [ |
|
|
|
{'condition': POWER_RESTORED, 'required_conditions': [MACHINE_PART]} |
|
|
|
] |
|
|
|
G.nodes[CERULEAN_CITY]['grants_conditions'] = [ |
|
|
|
{'condition': CASCADE_BADGE, 'required_conditions': [MISTY_FOUND]} |
|
|
|
] |
|
|
|
G.nodes['Route 25']['grants_conditions'] = [ |
|
|
|
{'condition': MISTY_FOUND, 'required_conditions': []} |
|
|
|
] |
|
|
|
G.nodes[CELADON_CITY]['grants_conditions'] = [ |
|
|
|
{'condition': RAINBOW_BADGE, 'required_conditions': []} |
|
|
|
] |
|
|
|
G.nodes[FUCHSIA_CITY]['grants_conditions'] = [ |
|
|
|
{'condition': FOG_BADGE, 'required_conditions': []} |
|
|
|
] |
|
|
|
G.nodes['Route 11']['grants_conditions'] = [ |
|
|
|
{'condition': WOKE_SNORLAX, 'required_conditions': [FLUTE_CHANNEL]} |
|
|
|
] |
|
|
|
G.nodes[PEWTER_CITY]['grants_conditions'] = [ |
|
|
|
{'condition': BOULDER_BADGE, 'required_conditions': []}, |
|
|
|
{'condition': PKMN_WING, 'required_conditions': []}, |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
return G |