Advertisement
Guest User

Gen 6/7 Ability Inheritance

a guest
Jan 30th, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. Gen 7 Assembly Code
  2.  
  3. v52 = gfl2::math::Random::Next(v6[3], 100u);
  4. if ( pml::pokepara::CoreParam::GetMonsNo(v5[1]) == 132 )
  5. ParentPointer = *v5;
  6. else
  7. ParentPointer = v5[1];
  8. v54 = getAbilityNumber(ParentPointer);
  9. switch ( v54 )
  10. {
  11. case 0:
  12. if ( v52 < 80 )
  13. goto ABILITY1;
  14. ABILITY2:
  15. *(v4 + 34) = 1;
  16. goto LABEL_89;
  17. case 1:
  18. if ( v52 < 20 )
  19. goto ABILITY1;
  20. goto ABILITY2;
  21. case 2:
  22. if ( v52 < 20 )
  23. goto ABILITY1;
  24. if ( v52 >= 40 )
  25. {
  26. *(v4 + 34) = 2;
  27. goto LABEL_89;
  28. }
  29. goto ABILITY2;
  30. }
  31. if ( v52 >= 50 )
  32. goto ABILITY2;
  33. ABILITY1:
  34. *(v4 + 34) = 0;
  35.  
  36.  
  37.  
  38. Gen 6 Assembly Code
  39.  
  40. v35 = MT_Rand(&unk_686F54, 100); // Random100
  41. if ( getMonsNo(v5[1]) == 132 )
  42. v36 = *v5;
  43. else
  44. v36 = v5[1];
  45. v37 = sub_4D2E80(v36);
  46. switch ( v37 )
  47. {
  48. case 0:
  49. if ( v35 < 0x50 )
  50. goto LABEL_77;
  51. LABEL_85:
  52. *(v4 + 34) = 1;
  53. goto LABEL_86;
  54. case 1:
  55. if ( v35 < 0x14 )
  56. goto LABEL_77;
  57. goto LABEL_85;
  58. case 2:
  59. if ( v35 < 0x14 )
  60. goto LABEL_77;
  61. if ( v35 >= 0x28 )
  62. {
  63. *(v4 + 34) = 2;
  64. goto LABEL_86;
  65. }
  66. goto LABEL_85;
  67. }
  68. if ( v35 >= 0x32 )
  69. goto LABEL_85;
  70. LABEL_77:
  71. *(v4 + 34) = 0;
  72.  
  73.  
  74. https://cdn.discordapp.com/attachments/308023267266920458/407691890712903680/Capture.PNG
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement