top of page

Check a Specific Pokemon's Pokedex Seen/Caught Data

5.8

Description Loading...

HMA Discord Link 2.png

Credits:

Defa


How To

Set temp0 to the species index Set temp1 to the caseID

Then callasm <offset+1>


Possible caseID values:

0 = get seen

1 = get caught

2 = set seen

3 = set caught


If caseID is set to 0 or 1, varResult is set to 1 if the species is seen/caught in the Pokedex, otherwise varResult is set to 0 if the species is not seen/caught.


If caseID is set to 2 or 3, the value of varResult will not be changed.


NOTE: To set a Pokemon to caught, first it has to be (set to) seen


    push  {r4, lr}
    ldr   r0, var2
    ldr   r3, VarGet
    bl    linker
    mov   r4, r0 @save caseId
    ldr   r0, var1
    ldr   r3, VarGet
    bl    linker
    mov   r1, r4 @get caseId
    mov   r4, #0
    cmp   r1, #1
    bgt   skipvarresult
    mov   r4, #1
skipvarresult:
    mov   r2, #1 @indexIsSpecies
    ldr   r3, =0x08104AB1 @DexScreen_GetSetPokedexFlag
    bl    linker
    cmp   r4, #0
    beq   end
    ldr   r1, =0x020370D0 @varResult
    strh  r0, [r1]
end:
    pop   {r4, pc}
linker: bx r3
VarGet: .word 0x0806E569
var1: .word 0x00004000 @species index
var2: .word 0x00004001 @caseId
@ caseId value:
@ 0 = FLAG_GET_SEEN
@ 1 = FLAG_GET_CAUGHT
@ 2 = FLAG_SET_SEEN
@ 3 = FLAG_SET_CAUGHT; must be seen first to be set to caught!

Happy Hacking!

 


bottom of page