Skip to content

Commit

Permalink
Fix Ditto assumption bug
Browse files Browse the repository at this point in the history
  • Loading branch information
aaaaaa123456789 authored and vulcandth committed Oct 16, 2022
1 parent 5ebda7e commit dc4d81e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions engine/items/item_effects.asm
Original file line number Diff line number Diff line change
Expand Up @@ -440,18 +440,9 @@ PokeBallEffect:
push af
set SUBSTATUS_TRANSFORMED, [hl]

; BUG: Catching a Transformed Pokémon always catches a Ditto (see docs/bugs_and_glitches.md)
bit SUBSTATUS_TRANSFORMED, a
jr nz, .ditto
jr .not_ditto
jr nz, .load_data

.ditto
ld a, DITTO
ld [wTempEnemyMonSpecies], a
jr .load_data

.not_ditto
set SUBSTATUS_TRANSFORMED, [hl]
ld hl, wEnemyBackupDVs
ld a, [wEnemyMonDVs]
ld [hli], a
Expand Down

0 comments on commit dc4d81e

Please sign in to comment.