diff options
author | Rangi <35663410+Rangi42@users.noreply.github.com> | 2021-06-19 22:22:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-19 22:22:14 -0400 |
commit | b4c97b7c01f564e2f2afb303645ad19aae532d60 (patch) | |
tree | 4d69e2613e2c0f5a904e547c7a1f36f9217b1d76 | |
parent | 0bb0c76abf63b8cf86874fab2621a65b6b293b94 (diff) | |
parent | b6e0d649e7a80e06fb21e3858bcb1c1beb270980 (diff) |
Merge pull request #68 from SnorlaxMonster/roar-teleport-comment-fix
Correct comments on SwitchAndTeleportEffect
-rw-r--r-- | engine/battle/effects.asm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/battle/effects.asm b/engine/battle/effects.asm index 6f860cd2..283a794b 100644 --- a/engine/battle/effects.asm +++ b/engine/battle/effects.asm @@ -855,14 +855,14 @@ SwitchAndTeleportEffect: jr nc, .playerMoveWasSuccessful ; if so, teleport will always succeed add b ld c, a - inc c ; c = sum of player level and enemy level + inc c ; c = playerLevel + enemyLevel + 1 .rejectionSampleLoop1 call BattleRandom cp c ; get a random number between 0 and c jr nc, .rejectionSampleLoop1 srl b srl b ; b = enemyLevel / 4 - cp b ; is rand[0, playerLevel + enemyLevel) >= (enemyLevel / 4)? + cp b ; is rand[0, playerLevel + enemyLevel] >= (enemyLevel / 4)? jr nc, .playerMoveWasSuccessful ; if so, allow teleporting ld c, 50 call DelayFrames |