Skip to content

Commit

Permalink
correct comments about teleport effect
Browse files Browse the repository at this point in the history
  • Loading branch information
YamaArashi committed Oct 17, 2016
1 parent c2381bb commit d1162fe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions engine/battle/core.asm
Original file line number Diff line number Diff line change
Expand Up @@ -8047,9 +8047,8 @@ SwitchAndTeleportEffect:
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
Expand Down

0 comments on commit d1162fe

Please sign in to comment.