ref: 0406c711893532514c843aeae262153d36be0ad5
parent: 9c93fb0b7559e9d657a91d2b508ecebe58eee544
parent: 319c29c751ea23bed8d57587500e73bb2a599656
author: Daniel Harding <[email protected]>
date: Mon Jun 14 03:48:28 EDT 2021
Merge pull request #332 from SnorlaxMonster/roar-teleport-comment-fix Correct comments on SwitchAndTeleportEffect
--- a/engine/battle/effects.asm
+++ b/engine/battle/effects.asm
@@ -819,7 +819,7 @@
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
@@ -826,7 +826,7 @@
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