-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpadvalues.py
More file actions
628 lines (584 loc) · 16.3 KB
/
padvalues.py
File metadata and controls
628 lines (584 loc) · 16.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
atts = {
-1: None,
0: 'Fire',
1: 'Water',
2: 'Wood',
3: 'Light',
4: 'Dark',
5: 'Heart',
6: 'Jammer',
7: 'Poison',
8: 'Mortal Poison', # Speculated.
9: 'Bomb',
}
types = {
-1: None,
0: 'Evo Material',
1: 'Balanced',
2: 'Physical',
3: 'Healer',
4: 'Dragon',
5: 'God',
6: 'Attacker',
7: 'Devil',
8: 'Machine',
12: 'Awaken Material',
14: 'Enhance Material',
15: 'Redeemable Material',
#? Protected?
}
stacktypes = {
0, #Evo
12, #Awaken
14, #Enhance
}
awakensDict = {
# 0: None, # No need.
1: 'Enhanced HP',
2: 'Enhanced Attack',
3: 'Enhanced Heal',
4: 'Reduced Fire Damage',
5: 'Reduced Water Damage',
6: 'Reduced Wood Damage',
7: 'Reduced Light Damage',
8: 'Reduced Dark Damage',
9: 'Auto-Recover',
10: 'Resistance-Bind',
11: 'Resistance-Dark',
12: 'Resistance-Jammers',
13: 'Resistance-Poison',
14: 'Enhanced Fire Orbs',
15: 'Enhanced Water Orbs',
16: 'Enhanced Wood Orbs',
17: 'Enhanced Light Orbs',
18: 'Enhanced Dark Orbs',
19: 'Extended Move Time',
20: 'Recover Bind',
21: 'Skill Boost',
22: 'Enhanced Fire Att.',
23: 'Enhanced Water Att.',
24: 'Enhanced Wood Att.',
25: 'Enhanced Light Att.',
26: 'Enhanced Dark Att.',
27: 'Two-Pronged Attack',
28: 'Resistance-Skill Bind',
29: 'Enhanced Heart Orbs',
30: 'Multi Boost',
31: 'Dragon Killer',
32: 'God Killer',
33: 'Devil Killer',
34: 'Machine Killer',
35: 'Balanced Killer',
36: 'Attacker Killer',
37: 'Physical Killer',
38: 'Healer Killer',
# 39: 'Evo Material Killer',
# 40: 'Awaken Material Killer',
# 41: 'Enhance Material Killer',
# 42: 'Redeemable Material Killer',
39: 'Evo Killer',
40: 'Awaken Killer',
41: 'Enhance Killer',
42: 'Redeemable Killer',
43: 'Enhanced Combos',
44: 'Guard Break',
45: 'Bonus Attack',
46: 'Enhanced Team HP',
47: 'Enhanced Team Recovery',
48: 'Damage Void Piercer',
49: 'Awoken Assist',
50: 'Super Bonus Attack',
51: 'Skill Charge',
52: 'Resistance-Bind+',
53: 'Extended Move Time+',
54: 'Resistance-Clouds',
55: 'Resistance-Immobility',
56: 'Skill Boost+',
57: '80% or more HP Enhanced',
58: '50% or less HP Enhanced',
59: '[L] Heal Matching',
60: '[L] Increased Attack',
61: 'Super Enhanced Combos',
62: 'Combo Orbs',
63: 'Skill Voice',
64: 'Dungeon Bonus',
65: 'Reduced HP',
66: 'Reduced Attack',
67: 'Reduced Recovery',
68: 'Resistance-Blind+',
69: 'Resistance-Jammers+',
70: 'Resistance-Poison+',
71: 'Blessing of Jammers',
72: 'Blessing of Poison Orbs',
}
# Ugh I didn't update this with new strings.
awakensList = """
None
Enhanced HP
Enhanced Attack
Enhanced Heal
Reduce Fire Damage
Reduce Water Damage
Reduce Wood Damage
Reduce Light Damage
Reduce Dark Damage
Auto-Recover
Resistance-Bind
Resistance-Dark
Resistance-Jammers
Resistance-Poison
Enhanced Fire Orbs
Enhanced Water Orbs
Enhanced Wood Orbs
Enhanced Light Orbs
Enhanced Dark Orbs
Extend Time
Recover Bind
Skill Boost
Enhanced Fire Att.
Enhanced Water Att.
Enhanced Wood Att.
Enhanced Light Att.
Enhanced Dark Att.
Two-Pronged Attack
Resistance-Skill Bind
Enhanced Heal Orbs
Multi Boost
Dragon Killer
God Killer
Devil Killer
Machine Killer
Balanced Killer
Attacker Killer
Physical Killer
Healer Killer
Evo Killer
Awaken Killer
Enhance Killer
Redeemable Killer
Enhanced Combos
Guard Break
Bonus Attack
Enhanced Team HP
Enhanced Team RCV
Damage Void Piercer
Awoken Assist
Super Bonus Attack
Skill Charge
Resistance-Bind+
Extended Move Time+
Resistance-Clouds
Resistance-Immobility
Skill Boost+
80% or more HP Enhanced
50% or less HP Enhanced
[L] Damage Reduction
[L] Increased Attack
""".strip().splitlines()
awskills = awkns = awakeningskills = awakenings = awokenskills = awakensDict
latents = [
None,
'Imp. HP',
'Imp. ATK',
'Imp. RCV',
'Ext. Move Time',
'Auto-Heal',
'Fire Dmg. Red.',
'Water Dmg. Red.',
'Wood Dmg. Red.',
'Light Dmg. Red.',
'Dark Dmg. Red.',
'Skill Delay Resist.',
]
# From the names of the latent tamas.
# In order of tamas.
latents = {
0: None,
1: 'Imp. HP',
2: 'Imp. ATK',
3: 'Imp. RCV',
5: 'Auto-RCV',
4: 'Ext. Move Time',
6: 'Fire Dmg. Red.',
7: 'Water Dmg. Red.',
8: 'Wood Dmg. Red.',
9: 'Light Dmg. Red.',
10: 'Dark Dmg. Red.',
11: 'Skill Delay Resist.',
12: 'All Stats Imp.',
20: 'God Killer',
21: 'Dragon Killer',
22: 'Devil Killer',
23: 'Machine Killer',
24: 'Balanced Killer',
25: 'Attacker Killer',
26: 'Physical Killer',
27: 'Healer Killer',
28: 'Imp. HP+',
29: 'Imp. ATK+',
30: 'Imp. RCV+',
31: 'Ext. Move Time+',
16: 'Evo Material Killer',
17: 'Awoken Material Killer',
18: 'Enhanced Material Killer',
19: 'Redeemable Material Killer',
32: 'Fire Dmg. Red.+',
33: 'Water Dmg. Red.+',
34: 'Wood Dmg. Red.+',
35: 'Light Dmg. Red.+',
36: 'Dark Dmg. Red.+',
# 0: 'Extra Slot',
13: 'Leader Change Resist.',
14: 'Jammer Surge Resist.',
15: 'Poison Surge Resist.',
37: 'Damage Void Piercer',
38: 'Att. Absorption Piercer'
}
latent_names_official = [
None,
'Improved HP',
'Improved Attack',
'Improved Healing',
'Extended Move Time',
'Auto-Heal',
'Fire Damage Reduction',
'Water Damage Reduction',
'Wood Damage Reduction',
'Light Damage Reduction',
'Dark Damage Reduction',
'Skill Delay Resistance',
'All Stats Enhanced', #12: first double-slot.
None, #13
None, #14
None, #15
'Evo Killer',
'Awaken Killer',
'Enhance Killer',
'Redeemable Killer',
'God Killer',
'Dragon Killer',
'Devil Killer',
'Machine Killer',
'Balanced Killer',
'Attacker Killer',
'Physical Killer',
'Healer Killer',
'Improved HP+',
'Improved ATK+',
'Improved RCV+', #30
'Extended Move Time+', #31
]
latent_descs_official = [
None,
'Slightly improves HP',
'Slightly improves ATK',
'Slightly improves RCV',
'Slightly extends time to move Orbs',
'Recovers a little HP when matching Orbs\n(No effect when RCV is 0 or lower)',
'Slightly reduces damage received\nfrom Fire Att. enemies',
'Slightly reduces damage received\nfrom Water Att. enemies',
'Slightly reduces damage received\nfrom Wood Att. enemies',
'Slightly reduces damage received\nfrom Light Att. enemies',
'Slightly reduces damage received\nfrom Dark Att. enemies',
'Reduces skill delay by 1 turn for each\nAwoken Latent Skill added',
'Increases all Stats',
None, #13
None, #14
None, #15
'Increases ATK against Evo\nMaterial enemies',
'Increases ATK against Awaken\nMaterial enemies',
'Increases ATK against Enhance\nMaterial enemies',
'Increases ATK against Redeemable\nMaterial enemies',
'Increases ATK against God Types',
'Increases ATK against Dragon Types',
'Increases ATK against Devil Types',
'Increases ATK against Machine Types',
'Increases ATK against Balanced Types',
'Increases ATK against Attacker Types',
'Increases ATK against Physical Types',
'Increases ATK against Healer Types',
'Improves HP a little',
'Improves ATK a little',
'Improves RCV a little',
'Extends time to move Orbs a little',
]
collabs = NotImplemented
'''Collab notes:
? Need to decide canonical names for the collabs?
- Collabs:
0. <None>
1. RO
2. Taiko
3. ECO
4. (Plan and Brood)
5. Gunma
6. FFCD
US only has the Chocobo (& Carbuncle & Knight) cards grouped.
7. Famitsu (Necky)
Japan has the Nekkis (235 485 1177 1508 2715).
8. Punt (incl. Zell)
9. Puzzdroid
10. Shinra
11. Kapybara
12. Cathy. (Only has Cathy and her evo.)
13. (Ukai Magoroku and its evo.)
14. Eva.
15. 7-11 Collab
(not translated)
16. Clash of Clans
17. Groove Coaster.
18. RO ACE.
19. Dragon's Dogma Quest
20. Takaoka
21. Monster Hunter
22. Batman
23. Baskin Robbins
24. Angry Birds.
25. PAD Z
26. HxH
27. Hello Kitty.
28. PAD BT
29. BEAMS
30. Dragon Ball
31. Saint Seiya
- US only has #2126.
- Rest haven't been grouped.
32. GungHo Collab (only #32 Spirit?)
33. GungHo Collab (King's Gate?)
34. GungHo Collab (unknown game)
35. GungHo Collab (unknown game)
36. Bikkuriman
37. Angry Birds E-something
38. DC
39. Sangoku Tenka Trigger. (Mini 3K.)
40. FotNS. (We didn't get 1703?)
41. chibis (christmas?)
42. {Diagoldos}
43. {#1924 Magic Kaito Kid}
US: Empty.
44. more chibis (hera, plan, heroes, etc.)
45. FF
46. GitS
47. Duel Masters
48. Attack on Titan
49. (#2426 Ninja Hattori)
50. Shonen Sunday.
US: Empty.
51. Crows X Worst
52. Bleach
53. Superman vs Batman.
54. PAD X
55. Ace Attorney.
'''
# Crap. I mixed up res codes and error codes.
# At least lower error codes correspond to result codes.
# Some res codes may require additional arguments from the server.
res_codes = {
0: 'Okay',
2: 'relogin', # Need to log in again. Bad sid?
3: "Unregistered user.", #same as error code 3
8: 'Cannot enter dungeon', # Expired / no stamina.
10: "Already registered as a Friend.", #same as error code
#12: same as error code
#23: "bad key param?",
40: "data error",
# {"res":40,"msg":"A data error has occurred.\\nUnable to enter dungeon.\\n\\nReturn to the title screen\\nand try again."}
# When unexpected: "An unexpected error has occurred." with error code 100.
#54: "", # Team blob error?
#55: "", #When unexpected: "An unexpected error has occurred." with error code 100.
}
# "Error Code: %d"
# Most of these were tested on 18.40.
error_codes = {
1: "An unexpected error occurred.",
3: 'Unregistered user.',
#= https://www.reddit.com/r/PuzzleAndDragons/comments/4siy66/questionjp_looking_for_someone_that_speaks/d59ntvt
4: "The specified monster doesn't exist.",
5: "Not enough Stamina.",
6: """You have reached the max
number of monsters. Fuse or sell
some monsters, then try again.""",
7: "The user is already registered.", # as in login?
8: "Unable to enter the dungeon.",
9: "Connection Error", #vague
10: "Already registered as a Friend.",
11: "No more Friends can be registered", #no period
12: 'That person has too many friends.',
# Also res:40
#"This user has reached their max number of Friends. They cannot register any more Friends."
13: "Unable to fuse.",
14: "Unable to sell.",
15: "Unable to use the Egg Machine.",
16: "The present was already returned.",
17: "Your team cost is too high.",
18: "You do not have enough Magic Stone(s).",
19: "You are not Friends with this user.",
20: "That name is not allowed.",
21: "Unable to evolve.",
22: "Already purchased.",
23: "Unknown Error", #?
24: """You have reached the limit
of the number of Friend
Invites you can send.
The Friend Invite could
not be sent.""",
# 25: 'Too many friend invites.',
25: """This user has eached the limit
of the number of Friend Invites
they can receive.
The Friend Invite could not be sent.""",
# This user has reached their max
# number of Friends. They cannot
# register any more Friends.
26: "Unable to continue.",
27: "You have already chosen to continue.",
28: "Could not enter the dungeon.",
29: "Connection Error", #?
30: "The specified mail could not be found.",
31: "https://dl-na.padsv.gungho.jp/efl/extf<...>/adr/", #wtf?
# Shows player ID above the message.
# No "OK" button. Can't press Back.
# DOES show the error code.
32: "Connection Error", #?
33: "Invalid parameters.",
34: "Invalid ID or Device Change Code",
35: "Messaging has been disabled by the other party.",
36: "Friend Requests have been disabled by the other party.",
37: "Login failed.",
38: "Dungeon purchase failed.",
39: "Best Friend selection failed.",
40: 'Cannot enter dungeon due to corrupted data',
# HT: 'ゲームデータに不整合が発生したため、\nダンジョンに潜入できません。\n\nタイトル画面に戻り、再度お試しください。'
# Also res:40
41: "This dungeon is already available.",
42: "Monster purchase failed.",
43: "Mail receipt failed.",
# 44: "No score to rank",
# Seen in KO when trying to view Current Rank without a score.
# /api.php?action=rregist&pid={PID}&sid={SID}&did=1169&t=0&g=1&r=1801&m=0&key={KEY}
# When done right: Special popup with "Not recorded in the ranking."
44: "Ranking data download failed.",
45: "Room creation failed.",
# dupe?
46: "Room creation failed.",
# Seen when res=2.
# Also seen as res=46 from action=mp_rmake_comp??
47: "Room ID creation failed.",
# 48: 'room not found?',
48: "Room not found. Either the game already started or you entered the wrong Room ID.",
49: "Unable to play Multiplayer Dungeon.",
50: """You and your partner use a different
version of PAD. Unable to use
the Multiplayer Mode.
Please update your game
with the latest version.""",
51: """Unable to start
game due to corrupted
data.
Please try again later.""",
52: """Your Max Stamina is insufficient
to play this dungeon.
Impossible to enter.""",
53: """A new version is available.
Please visit Google Play to
update.""", #Softlocks you to get you to update.
54: """A data error has occurred.
Unable to enter dungeon.
Return to the title screen and try again.""",
55: "", #?
56: "DMSG", #what
57: "DMSG", #...
58: "DMSG", #okay, giving up on this.
98: "An unexpected error has occurred.",
# Hm?
99: 'Maintenance',
100: "An unexpected error has occurred.",
# Seen when forcing res=40 on request_friend.
101: 'No connection', # Could not detect an internet connection?
104: "Can't connect to server?",
108: "???",
602: "Room not found.", # Entering a room after it's closed.
}
# Drop types.
drops = {
0: '', #none
9900: 'coins',
9901: 'stones',
9902: 'palpts',
9911: 'dung', #gift dungeon?
9912: 'monpts',
9916: 'dungperm', #permanent dungeon
9917: 'badge', #awoken badge
9923: 'machine', #seen with 10x PEMs
9935: 'pluspts',
9999: 'annc', #announcement again
}
# Last updated: 2020-05-26
# Maybe fix the names some time.
badges = {
1: 'cost',
2: 'finger+',
3: 'all',
4: 'rcv+',
5: 'hp+',
6: 'atk+',
7: 'sb',
8: 'unbind',
9: 'sbr',
10: 'exp',
11: 'skyfall',
12: 'res-blind',
13: 'res-jammer',
14: 'res-poison',
# 15: '. (white dot)',
# 16: '.',
17: 'rcv++',
18: 'hp++',
19: 'atk++',
20: 'parameters+', #all stats +10%, -400 cost
21: 'finger++',
}
hexcolors = {
#- Dungeon colors.
#- Looks like this is what's used to color the dungeons?
'#G#', # Urgent G?
'$00e0c6$', # Bright Green.
#- Score Attack
'$47ae64$', # Technical Green.
#- Forbidden Tower
#- CD Collab
#- FF Collab
#- FF Collab
#- PAD Academy
#- Ultimate Rushes
#- Super Ultimate Dragon Rush
#- Ancient Pair Dragons
#- Star Dragons
#- X Collab
#- Other collabs and biweeklies
#- Mythical Endless Corridors
#-
#-
'$5677a9$', # Conditional Blue.
#- Alt techs from CoS to Talos's Abyss.
#- Descended Challenge-No Continues
#- More alt techs.
'$b86028$', # Normal Brown.
#- First two floors of Punt.
#- Breakers
#- Lightless Devils' Nest
#- Poring Tower
'$be7fbc$', # Roguelike Magenta.
'$d3423e$', # Annihilation Red.
#- Machine Zeus/Hera
#- Ult Arena
#- Ult Descended Rush
#- Radar dragons.
'$ffeb66$', # Tournament Yellow.
#- Satan Tournament
#- Yamatsumi Tournament
#- Message colors.
#- Needs to change color back after use.
'^FFFF00^',
'^FFFFFF^',
}