|
|
@ -8,7 +8,7 @@ from utility.data import exclusive_choice_pokemon |
|
|
from utility.functions import get_shiftable_forms, get_shiftable_forms_bidirectional, parse_pfic, sanitize_filename |
|
|
from utility.functions import get_shiftable_forms, get_shiftable_forms_bidirectional, parse_pfic, sanitize_filename |
|
|
|
|
|
|
|
|
class GeneratePlanWorkerSignals(QObject): |
|
|
class GeneratePlanWorkerSignals(QObject): |
|
|
finished = pyqtSignal(dict) |
|
|
finished = pyqtSignal(list) |
|
|
|
|
|
|
|
|
class GeneratePlanWorker(QRunnable): |
|
|
class GeneratePlanWorker(QRunnable): |
|
|
def __init__(self): |
|
|
def __init__(self): |
|
|
@ -54,7 +54,7 @@ class GeneratePlanWorker(QRunnable): |
|
|
if not found: |
|
|
if not found: |
|
|
print(home_pokemon) |
|
|
print(home_pokemon) |
|
|
|
|
|
|
|
|
return {} |
|
|
return self.game_plan |
|
|
|
|
|
|
|
|
def plan_for_group(self, group): |
|
|
def plan_for_group(self, group): |
|
|
group_plan = [] |
|
|
group_plan = [] |
|
|
@ -287,6 +287,7 @@ class GeneratePlanWorker(QRunnable): |
|
|
pokemon_to_catch = {} |
|
|
pokemon_to_catch = {} |
|
|
pokemon_to_breed = {} |
|
|
pokemon_to_breed = {} |
|
|
pokemon_map = {} |
|
|
pokemon_map = {} |
|
|
|
|
|
other_map = {} |
|
|
|
|
|
|
|
|
def record_catch(pfic, gender, to_get): |
|
|
def record_catch(pfic, gender, to_get): |
|
|
if pfic not in encounters_in_game: |
|
|
if pfic not in encounters_in_game: |
|
|
@ -305,6 +306,11 @@ class GeneratePlanWorker(QRunnable): |
|
|
pokemon_map[to_get] = {} |
|
|
pokemon_map[to_get] = {} |
|
|
|
|
|
|
|
|
pokemon_map[to_get]["ByEvolving"] = pfic |
|
|
pokemon_map[to_get]["ByEvolving"] = pfic |
|
|
|
|
|
if pfic not in other_map: |
|
|
|
|
|
other_map[pfic] = {} |
|
|
|
|
|
other_map[pfic]["EvolveTo"] = [] |
|
|
|
|
|
other_map[pfic]["BreedFor"] = [] |
|
|
|
|
|
other_map[pfic]["EvolveTo"].append(to_get) |
|
|
|
|
|
|
|
|
def record_breed(pfic, gender, to_get): |
|
|
def record_breed(pfic, gender, to_get): |
|
|
if pfic not in pokemon_to_breed: |
|
|
if pfic not in pokemon_to_breed: |
|
|
@ -320,6 +326,11 @@ class GeneratePlanWorker(QRunnable): |
|
|
pokemon_map[to_get] = {} |
|
|
pokemon_map[to_get] = {} |
|
|
|
|
|
|
|
|
pokemon_map[to_get]["ByBreeding"] = pfic |
|
|
pokemon_map[to_get]["ByBreeding"] = pfic |
|
|
|
|
|
if pfic not in other_map: |
|
|
|
|
|
other_map[pfic] = {} |
|
|
|
|
|
other_map[pfic]["EvolveTo"] = [] |
|
|
|
|
|
other_map[pfic]["BreedFor"] = [] |
|
|
|
|
|
other_map[pfic]["BreedFor"].append(to_get) |
|
|
|
|
|
|
|
|
# TODO: Move this to a last pass |
|
|
# TODO: Move this to a last pass |
|
|
#if pfic not in pokemon_to_catch: |
|
|
#if pfic not in pokemon_to_catch: |
|
|
@ -402,6 +413,7 @@ class GeneratePlanWorker(QRunnable): |
|
|
game_plan["pokemon_to_catch"] = pokemon_to_catch |
|
|
game_plan["pokemon_to_catch"] = pokemon_to_catch |
|
|
game_plan["pokemon_to_breed"] = pokemon_to_breed |
|
|
game_plan["pokemon_to_breed"] = pokemon_to_breed |
|
|
game_plan["pokemon_map"] = pokemon_map |
|
|
game_plan["pokemon_map"] = pokemon_map |
|
|
|
|
|
game_plan["other_map"] = other_map |
|
|
|
|
|
|
|
|
for required in required_pokemon: |
|
|
for required in required_pokemon: |
|
|
if required not in pokemon_map: |
|
|
if required not in pokemon_map: |
|
|
|