ref: d1162fec71ca789cae66dfe826aa0eae0e134b53
parent: c2381bb3e624e966c323610df762a299468a1728
author: YamaArashi <shadow962@live.com>
date: Sun Oct 16 18:30:32 EDT 2016
correct comments about teleport effect
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -8047,9 +8047,8 @@
cp c ; get a random number between 0 and c
jr nc, .rejectionSampleLoop1
srl b
- srl b ; b = enemy level * 4
-; bug: does not account for overflow, so levels above 63 can lead to erroneousness results
- cp b ; is rand[0, playerLevel + enemyLevel] > enemyLevel?
+ srl b ; b = enemyLevel / 4
+ cp b ; is rand[0, playerLevel + enemyLevel) >= (enemyLevel / 4)?
jr nc, .playerMoveWasSuccessful ; if so, allow teleporting
ld c, 50
call DelayFrames