Advertisement
Guest User

RBY damage

a guest
Feb 23rd, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. This is a comprehesive guide of how damage works and is handled in Gen 1. The order followed corresponds to the usual order of events during a turn.
  2.  
  3. *************************************************************************************************************************************************
  4.  
  5. - The current damage in battle is stored in two 8-bit addresses (will be referred to as a single 16-bit address from now on for simplicity), so it can store values up to 65535. Anything that would make the damage overflow, makes sure to cap it at 65535 instead. This damage address is shared by both players.
  6. - The damage address isn't cleared (set to 0) when a battle starts or finishes, nor on a switch by any player. Thus, the stored value will be carried over between battles and might lead to a desynchronization in a link battle if its value becomes relevant before a move that modifies its contents is used (e.g. due to a move like Counter).
  7.  
  8. - If the attacker hurts itself due to confusion, the value stored in the damage address will correspond to the calculated damage that the confused Pokemon deals to itself.
  9.  
  10. - If the turn holder is storing energy this turn due to Bide, the content of the damage address is added to the value already stored in a separate Bide damage address (two 8-bit addresses).
  11. - Bide's store energy effect won't occur during a turn that the Pokemon is asleep, frozen, trapped (from Wrap or a similar move), flinched, recharging from Hyper Beam, or attempting to use a disabled move.
  12. - Hurting oneself due to confusion, or being fully paralyzed, both cause the Bide lock to come to an end.
  13. - If energy is unleashed this turn, the content of the Bide damage address is copied to the damage address and cleared, then the damage address is doubled.
  14. - If the player Pokemon faints, the whole Bide damage address is cleared. If the enemy Pokemon faints, only the high byte of the Bide damage address is cleared (becoming the original value ANDed by 255). This could lead to a desynchronization during a link battle.
  15.  
  16. - Whenever a move whose effect is NOT on the list below is used, the damage address is cleared.
  17. + Conversion effect
  18. + Haze effect
  19. + Switch and Teleport effect (e.g. Roar, Teleport)
  20. + Mist effect
  21. + Focus Energy effect
  22. + Confusion effect (e.g. Supersonic)
  23. + Heal effect (e.g. Recover, Rest)
  24. + Transform effect
  25. + Light Screen effect
  26. + Reflect effect
  27. + Poison effect (e.g. Poisonpowder, Toxic)
  28. + Paralyze effect (e.g. Thunder Wave)
  29. + Substitute effect
  30. + Mimic effect
  31. + Leech Seed effect
  32. + Splash effect
  33. - Using a move means actually using it, and not just that its effect gets executed.
  34. - Selecting a move and failing to use it due to being asleep, frozen, etc. is not using a move.
  35. - Recharging from Hyper Beam is not using Hyper Beam.
  36. - Charging up for a move like SolarBeam is not using the move
  37. - Bide storing energy (after the turn it's selected) is not using Bide.
  38. - Wrap, Bind, Clamp and Fire Spin are only used in the first turn of the sequence (not entirely true, but to this effect, yes).
  39. - Multi-hit moves such as Double Kick and Fury Attack are only used once despite hitting twice or more.
  40.  
  41. - If the requirements for Counter dealing damage to the target meet, the content of the damage address is doubled. Else, the damage address is not touched.
  42. - The three requirements are:
  43. + The other player's last selected move's Base Power must be non-zero.
  44. + The other player's last selected move must be either Normal- or Fighting-type, but can not be Counter.
  45. + The damage address must contain a non-zero value.
  46. - Selecting a move means pointing to it with the cursor in the move selection menu. If the player A opens the move selection menu and then decides to switch Pokemon, the last move pointed to by the cursor has been selected even though player B hasn't been notified of it. This means player A's "PlayerSelectedMove" address and player B's "EnemySelectedMove" address may differ and a desynchronization may occur.
  47.  
  48. - Whenever a damaging move (including fixed damage moves like Seismic Toss or Super Fang, Counter, OHKO moves like Horn Drill, and Bide's damage dealing effect) deals damage to the target, the damage dealt corresponds to the value stored in the damage address. This value stored in the damage address corresponds to the damage calculated during the last damage calculation process (under normal circumstances, the last damage calculation process corresponds to the current attack).
  49. - Multi-turn and multi-hit moves such as Wrap, Double Kick and Fury Attack only execute damage calculation for the first turn or hit.
  50.  
  51. - Whenever any move that goes through standard accuracy checks misses (a miss due to accuracy/evasion), the damage address is cleared.
  52. - Moves included are:
  53. + Damaging moves
  54. + Non-damaging moves that inflict sleep, poison, paralysis, or confusion
  55. + Disable
  56. + Mimic
  57. + Non-damaging moves with a stat modifier down effect
  58. + Leech Seed
  59. - Missing is not the same as having no effect (e.g. Thunder Wave on a already statused and/or Ground-type Pokemon, Leer on a -6 Def Pokemon).
  60. - Failing because of Mist, because the target is using Fly/Dig, or because the target is not asleep when the move used is Dream Eater, is considered missing.
  61. - Counter being unsuccessful due to not meeting the requirements seen above is NOT considered missing.
  62.  
  63. - If Jump Kick or Hi-Jump Kick misses, the attacker takes 1 damage, and 1 is written to the damage address.
  64. - In reality, it takes damage equal to the maximum of 1, and the value stored in the damage address divided by 8 and rounded down. But because the move missed, the damage address will contain 0 and thus, damage taken will be 1. Damage taken is then written to the damage address.
  65.  
  66. - If a OHKO move like Horn Drill is successful, 65535 is written to the damage address.
  67.  
  68. - If, as a result of a damage dealing move or self-confusion damage, the target is KOed, the damage stored is overwritten with the HP the Pokemon had before being KOed.
  69. - If the target's Substitute faints, the damage stored is NOT overwritten with the HP the Substitute had.
  70. - A Substitute must have negative HP to faint (a 0 HP Substitute is still alive)
  71.  
  72. - If Absorb, Mega Drain or Leech Life is successful, the content of the damage address is halved, then 1 is written to it if it contains 0, and finally the attacker gets its HP increased by the value stored in the damage address.
  73. - HP recovery is capped to the attacker's maximum HP, but the damage address isn't updated with the actual HP healed in this case.
  74.  
  75. - If the attacker takes recoil damage due to the effect of a recoil move such as Take Down, it will take damage equal to the value stored in the damage address, divided by 4 and rounded down.
  76. - The damage address isn't updated with the recoil damage taken.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement