FIx source files' tm_bitfields and update New_Personal_Table with those values

This commit is contained in:
AarCon
2024-01-24 21:29:59 -07:00
parent 94ba192928
commit a5fd13537c
786 changed files with 5805 additions and 5794 deletions
File diff suppressed because it is too large Load Diff
+10 -4
View File
@@ -45,6 +45,7 @@ def get_pokemon_tm_learnsets():
tm_items = full_data["item_table"]
tm_moves = tm_items["WazaMachine"]
pokemon_tm_learnsets = {}
print("Gathering TM Learnsets from PokeApi...")
for index, tm in enumerate(tm_moves):
if index > 104:
break
@@ -53,7 +54,8 @@ def get_pokemon_tm_learnsets():
try:
api_move = pokebase.move(tm_move_no)
pokemon_list = api_move.learned_by_pokemon
print(f"Move Pokemon List succesfully retrieved for {api_move.name}")
# Enable this for Debug
# print(f"Move Pokemon List succesfully retrieved for {api_move.name}")
except Exception as e:
print(f"Error: {e}")
@@ -67,6 +69,7 @@ def get_pokemon_tm_learnsets():
print(f"Error: {e}")
with open(os.path.join(debug_file_path, "pokemon_api_learnsets.json"), "w", encoding="utf-8") as json_file:
json.dump(pokemon_tm_learnsets, json_file, ensure_ascii=False, indent=2)
print(f"Successfully wrote PokeApi TM Learnsets to {os.path.join(debug_file_path, 'pokemon_api_learnsets.json')}!")
return pokemon_tm_learnsets
def get_pokemon_stats(pokemon_name, pokemonId, monsno, counter=0):
@@ -156,6 +159,7 @@ def get_pokemon_stats(pokemon_name, pokemonId, monsno, counter=0):
return
def write_pokeapi_data_to_file():
print("Writing PokeApi data to file...")
new_personal_table = copy.deepcopy(full_data["personal_table"])
new_personal_data = new_personal_table["Personal"]
for filename in os.listdir(stats_file_path):
@@ -229,8 +233,10 @@ def write_pokeapi_data_to_file():
with open(os.path.join(debug_file_path, "New_Personal_Table.json"), "w") as json_file:
json.dump(new_personal_table, json_file, ensure_ascii=False, indent=4)
print(f"Successfully wrote PokeApi data to {os.path.join(debug_file_path, 'New_Personal_Table.json')}")
def get_all_api_mon_data():
print("Gathering all Pokemon data via PokeApi...")
for pokemonId, mon in enumerate(personal_table):
if mon["monsno"] <= 493:
continue
@@ -238,9 +244,9 @@ def get_all_api_mon_data():
get_pokemon_stats(mons_name, pokemonId, mon["monsno"])
def full_run():
# get_pokemon_tm_learnsets()
# clear_logs()
# get_all_api_mon_data()
get_pokemon_tm_learnsets()
clear_logs()
get_all_api_mon_data()
write_pokeapi_data_to_file()
if __name__ == "__main__":
+4 -4
View File
@@ -51,9 +51,9 @@
451
],
"tm_bitfields": [
1797488642,
2198880291,
134218256,
0
897695745,
1116219409,
101843208,
16
]
}
+3 -3
View File
@@ -48,9 +48,9 @@
164
],
"tm_bitfields": [
5216768,
2097155,
4243476,
2608384,
34605569,
35807242,
0
]
}
+3 -3
View File
@@ -46,9 +46,9 @@
164
],
"tm_bitfields": [
2147930112,
4194561,
51476,
1073965056,
35654272,
33711242,
0
]
}
+4 -4
View File
@@ -48,9 +48,9 @@
523
],
"tm_bitfields": [
335714304,
161,
643220,
0
167857152,
33557072,
33744970,
32
]
}
+3 -3
View File
@@ -49,9 +49,9 @@
164
],
"tm_bitfields": [
537106432,
2684616779,
49172,
268553216,
1375865381,
37904394,
0
]
}
+3 -3
View File
@@ -57,9 +57,9 @@
19
],
"tm_bitfields": [
2483197988,
201855305,
1107542162,
1241598994,
100928164,
596107337,
0
]
}
+4 -4
View File
@@ -61,9 +61,9 @@
451
],
"tm_bitfields": [
3777204240,
326177027,
273820178,
0
4035037192,
179865729,
171906313,
16
]
}
+4 -4
View File
@@ -58,9 +58,9 @@
523
],
"tm_bitfields": [
2554501414,
403965001,
34097170,
4
1277250707,
252316196,
50471945,
34
]
}
+4 -4
View File
@@ -55,9 +55,9 @@
451
],
"tm_bitfields": [
56856596,
168037383,
167791120,
0
27379722,
117575171,
118629640,
16
]
}
+4 -4
View File
@@ -56,9 +56,9 @@
57
],
"tm_bitfields": [
2416373768,
20988161,
2152384784,
8
1208186884,
44051072,
1109615752,
36
]
}
+4 -4
View File
@@ -82,9 +82,9 @@
57
],
"tm_bitfields": [
1945627730,
318846027,
2422219328,
0
3120297513,
159423013,
1249251616,
144
]
}
+4 -4
View File
@@ -51,9 +51,9 @@
432
],
"tm_bitfields": [
2286848512,
69206273,
5253136,
2
1143424256,
34605696,
44700680,
1
]
}
+3 -3
View File
@@ -59,9 +59,9 @@
15
],
"tm_bitfields": [
5999168,
2105345,
543172688,
2151532320,
34609664,
308417576,
0
]
}
+4 -4
View File
@@ -58,9 +58,9 @@
57
],
"tm_bitfields": [
454856,
8527873,
2684354576,
8
2147711588,
37820928,
1380057096,
4
]
}
+4 -4
View File
@@ -40,9 +40,9 @@
57
],
"tm_bitfields": [
417800,
1,
2147483648,
8
208900,
33556992,
1107427328,
4
]
}
+4 -4
View File
@@ -54,9 +54,9 @@
526
],
"tm_bitfields": [
2420276226,
553935049,
37815552,
0
1210137601,
310524516,
52593280,
128
]
}
+4 -4
View File
@@ -75,9 +75,9 @@
526
],
"tm_bitfields": [
3024264546,
554984137,
38339732,
5
3659615921,
311049060,
2204271178,
162
]
}
+4 -4
View File
@@ -62,9 +62,9 @@
526
],
"tm_bitfields": [
3024289024,
554983625,
38339988,
0
1512144000,
311048804,
52593354,
160
]
}

Some files were not shown because too many files have changed in this diff Show More