@ Credits to blackuser
.thumb
.thumb_func
.global AbilityPopUp
.equ MyLoc, 0x900000 @ Location of non hooking resource area(main routines plus Battle Scripts).
.equ AbilityDataLoc, 0x0824FC40 @ Change it if you have expanded your ability name data location.
.equ LoadIcon, 0x1 @ Change it to 0 if you don't want to display the poke icon on the pop up box.
.equ LoadAbilityPopUpCommand, 0xF9 @ The battle script command that calls the box(need go to your battlescript command table and make a pointer for this asm +1).
.equ CallAsmCommand, 0xF8 @ The battle script command that call asms(this asm does't insert this, you will need do it yourself).
.equ BoxImage, 0x082506F0 @ Offset where you inserted the box image.
.equ BoxPallet, 0x082506D0 @ Offset where you inserted the box palette.
@ The box will need have 96x24 of width and height respectively, and 16 colours.
@ Insert the box image using NSE(need be compressed).
@ Insert the box palette using NSE(don't need be compressed).
@ The first color of the palette is the transparent color.
@ The second color of the palette(counting with the transparent color) is used for the text image. (will need be different of the body color of the box).
@ The third color of the palette(counting with the transparent color) is used for the text shadow. (will need be different of the body color of the box and the color of the text image).
@ Command Arguments
@ (command iD)(byte)(bank)(ability iD)
@ The first parameter 0,1 or 2
@ If 0x0 removes the ability pop-up box(the second parameter is used for choose the return anim, the third parameter is not used(set to zero))
@ If 0x1 load the ability pop-up box
@ If 0x2 the third parameter is another bank and the loaded ability iD depends on it(see banks below)(the second parameter is still used for choose the side(so it's possible display the target ability on the user side)). Can be used for moves like Skill Swap.
@ The second parameter (the bank) (used for choose in what side show the box and the anim)
@ 0x0= target bank (02023d6c)
@ 0x1= user bank (02023d6b)
@ 0xA= scripting bank (02023fdb)
@ And others...
@ The third parameter is the ability iD (if it's zero it load the ability iD from the buffer loc(02023d6a))
.equ RomAreaOffset, 0x8000000
@ Also includes an updated effect of sturdy and intimidate
@ Script References
@ This only covers the gen3 abilities and does't include the moves
.equ ClearBodyWhiteSmokepointer, 0x27e04
.equ ColorChangepointer, 0x1aa58
.equ CuteCharmpointer, 0x1b00c
.equ Damppointer, 0x271bc
.equ Drizzlepointer, 0x1a2a4
.equ Droughtpointer, 0x1a304
.equ SandStreampointer, 0x1a2d4
.equ EffectSporePoisonPointPoisonpointer, 0x250634
.equ EffectSporeSleeppointer, 0x250630
.equ SynchronizeEffectSporeStaticParalizepointer, 0x250640
.equ FlashFirepointer1, 0x1a7d0
.equ FlashFirepointer2, 0x1a7f4
.equ FlashFirepointer3, 0x1a824
.equ FlashFirepointer4, 0x1a870
.equ Forescastpointer, 0x1d92f9
.equ HyperCutterKeenEyepointer1, 0x27e64
.equ HyperCutterKeenEyepointer2, 0x27ec8
.equ SynchronizeImmunitypointer1, 0x201dc
.equ Immunitypointer2, 0x2049c
.equ Immunitypointer3, 0x20508
.equ Immunitypointer4, 0x1d6e60
.equ SynchronizeWaterVeilpointer1, 0x202b0
.equ WaterVeilpointer2, 0x20300
.equ WaterVeilpointer3, 0x1d7f88
.equ Limberpointer1, 0x20428
.equ Limberpointer2, 0x1d7256
.equ LiquidOozepointer, 0x1d6a14
.equ LiquidOozeLeechSeedpointer, 0x1d8b6e
.equ OwnTempopointer1, 0x1d70b1
.equ OwnTempopointer2, 0x1d7901
.equ OwnTempopointer3, 0x1d7f13
.equ RainDishpointer, 0x1a4a0
.equ RoughSkinpointer, 0x1ab18
.equ InnerFocuspointer, 0x2086c
.equ WaterAbsorbVoltAbsorbpointer1, 0x1a894
.equ WaterAbsorbVoltAbsorbpointer2, 0x1a880
.equ WaterAbsorbVoltAbsorbpointer3, 0x1a70c
.equ WaterAbsorbVoltAbsorbpointer4, 0x1a764
.equ WaterAbsorbVoltAbsorbpointer5, 0x1a6f8
.equ WaterAbsorbVoltAbsorbpointer6, 0x1a750
.equ SoundProofpointer, 0x1a694
.equ ShedSkinpointer, 0x1a588
.equ Truantpointer, 0x19604
.equ SpeedBoostpointer, 0x1a5d4
.equ StickyHoldpointer1, 0x20d8c
.equ StickyHoldpointer2, 0x21054
.equ StickyHoldpointer3, 0x2c250
.equ Tracepointer, 0x1bb18
.equ SuctionCupspointer, 0x1d6cb7
.equ SturdyPointer, 0x289f0
.equ SturdyUpdatePointer, 0x1fccc
.equ SturdyUpdateAsmPointer1, 0x1f1d2
.equ SturdyUpdateAsmPointer2, 0x1fc12
.equ ArenaTrapShadowTagMagnetPullPointer, 0x14744
.equ RunAwayPointer, 0x158b0
.equ ObliviousPointer, 0x28f8c
.equ VitalSpiritInsomniaPointer, 0x1d6985
.equ FlameBodyPointer, 0x250638
.equ WonderGuardLevitateAsmPointer, 0x1fbd2
.equ IntimidatePointer, 0x1d9308
@Sort the order of these .orgs in increasing order of locations so you don't get the error message: attempt to move .org backwards.
@NewScriptsRepoint
.org ArenaTrapShadowTagMagnetPullPointer
.word NewMagnetPullShadowTagArenaTrapScript+RomAreaOffset
.org RunAwayPointer
.word NewRunAwayScript+RomAreaOffset
.org Truantpointer
.word NewTruantScript+RomAreaOffset
.org Drizzlepointer
.word NewDrizzleScript+RomAreaOffset
.org SandStreampointer
.word NewSandStreamScript+RomAreaOffset
.org Droughtpointer
.word NewDroughtScript+RomAreaOffset
.org RainDishpointer
.word NewRainDishScript+RomAreaOffset
.org ShedSkinpointer
.word NewShedSkinScript+RomAreaOffset
.org SpeedBoostpointer
.word NewSpeedBoostScript+RomAreaOffset
.org SoundProofpointer
.word NewSoundProofScript+RomAreaOffset
.org WaterAbsorbVoltAbsorbpointer5
.word NewWaterAbsorbVoltAbsorbScript2+RomAreaOffset+1
.org WaterAbsorbVoltAbsorbpointer3
.word NewWaterAbsorbVoltAbsorbScript2+RomAreaOffset
.org WaterAbsorbVoltAbsorbpointer6
.word NewWaterAbsorbVoltAbsorbScript2+RomAreaOffset+1
.org WaterAbsorbVoltAbsorbpointer4
.word NewWaterAbsorbVoltAbsorbScript2+RomAreaOffset
.org FlashFirepointer1
.word NewFlashFireScript+RomAreaOffset+1
.org FlashFirepointer2
.word NewFlashFireScript+RomAreaOffset
.org FlashFirepointer3
.word NewFlashFireScript+RomAreaOffset+1
.org FlashFirepointer4
.word NewFlashFireScript+RomAreaOffset
.org WaterAbsorbVoltAbsorbpointer2
.word NewWaterAbsorbVoltAbsorbScript+RomAreaOffset+1
.org WaterAbsorbVoltAbsorbpointer1
.word NewWaterAbsorbVoltAbsorbScript+RomAreaOffset
.org ColorChangepointer
.word NewColorChangeScript+RomAreaOffset
.org RoughSkinpointer
.word NewRoughSkinScript+RomAreaOffset
.org CuteCharmpointer
.word NewCuteCharmScript+RomAreaOffset
.org Tracepointer
.word NewTraceScript+RomAreaOffset
.org SturdyUpdateAsmPointer1
ldr r1, [r0, r1]
ldr r5, .SturdyUpdateASMHook
bx r5
.align 2
.SturdyUpdateASMHook: .word NewSturdyUpdateHook+RomAreaOffset+1
.org WonderGuardLevitateAsmPointer
ldr r3, .LevitateWonderGuardHook
bx r3
lsl r0, #0x0
.align 2
.LevitateWonderGuardHook: .word NewLevitateWonderGuardHook+RomAreaOffset+1
.org SturdyUpdateAsmPointer2
lsl r0, #0x0
ldr r1, .SturdyUpdateASMHook2
bx r1
.align 2
.SturdyUpdateASMHook2: .word NewSturdyUpdateHook2+RomAreaOffset+1
.org SturdyUpdatePointer
.word NewSturdyUpdateScript+RomAreaOffset
.org SynchronizeImmunitypointer1
.word NewSynchronizeImmunityScript+RomAreaOffset
.org SynchronizeWaterVeilpointer1
.word NewSynchronizeWaterVeilScript+RomAreaOffset
.org WaterVeilpointer2
.word NewSynchronizeWaterVeilScript+RomAreaOffset
.org Limberpointer1
.word NewLimberScript+RomAreaOffset
.org Immunitypointer2
.word NewSynchronizeImmunityScript+RomAreaOffset
.org Immunitypointer3
.word NewSynchronizeImmunityScript+RomAreaOffset
.org InnerFocuspointer
.word NewInnerFocusScript+RomAreaOffset
.org StickyHoldpointer1
.word NewStickyHoldScript+RomAreaOffset
.org StickyHoldpointer2
.word NewStickyHoldScript+RomAreaOffset
.org Damppointer
.word NewDampScript+RomAreaOffset
.org ClearBodyWhiteSmokepointer
.word NewClearBodyWhiteSmokeScript+RomAreaOffset
.org HyperCutterKeenEyepointer1
.word NewHyperCutterKeenEyeScript+RomAreaOffset
.org HyperCutterKeenEyepointer2
.word NewHyperCutterKeenEyeScript+RomAreaOffset
.org SturdyPointer
.word NewSturdyScript+RomAreaOffset
.org ObliviousPointer
.word NewObliviousScript+RomAreaOffset
.org StickyHoldpointer3
.word NewStickyHoldScript+RomAreaOffset
.org VitalSpiritInsomniaPointer
.word NewVitalSpiritInsomniaScript+RomAreaOffset
.org LiquidOozepointer
.word NewLiquidOozeScript+RomAreaOffset
.org SuctionCupspointer
.word NewSuctionCupsScript+RomAreaOffset
.org Immunitypointer4
.word NewSynchronizeImmunityScript+RomAreaOffset
.org OwnTempopointer1
.word NewOwnTempoScript+RomAreaOffset
.org Limberpointer2
.word NewLimberScript+RomAreaOffset
.org OwnTempopointer2
.word NewOwnTempoScript+RomAreaOffset
.org OwnTempopointer3
.word NewOwnTempoScript+RomAreaOffset
.org WaterVeilpointer3
.word NewSynchronizeWaterVeilScript+RomAreaOffset
.org LiquidOozeLeechSeedpointer
.word NewLiquidOozeLeechSeedScript+RomAreaOffset
.org Forescastpointer
.word NewForescastScript+RomAreaOffset
.org IntimidatePointer
.word NewIntimidateScript+RomAreaOffset
.org EffectSporeSleeppointer
.word NewEffectSporeSleepScript+RomAreaOffset
.org EffectSporePoisonPointPoisonpointer
.word NewEffectSporePoisonPointPoisonScript+RomAreaOffset
.org FlameBodyPointer
.word NewFlameBodyScript+RomAreaOffset
.org SynchronizeEffectSporeStaticParalizepointer
.word NewSynchronizeEffectSporeStaticParalizeScript+RomAreaOffset
.align 2
.org MyLoc
Abilitypopup:
push {r4-r7,lr}
mov r7, r8
push {r7}
add sp, #-0x10
ldr r4, .SCRIPTPOINTER
ldr r5, [r4]
ldrb r0, [r5, #0x2]
ldr r1, .GETBANK
bl BX_r1
ldr r1, .SCRIPTBANK
strb r0, [r1]
ldrb r2, [r5, #0x1]
cmp r2, #0x0
bne LOADBOX
add r0, #0x80
strb r0, [r1]
b REMOVEBOX
LOADBOX:
ldr r4, .BATTLEBG2_Y
mov r0, #0x60
strh r0, [r4]
mov r0, #0x2
mov r1, #0x7
mov r2, #0x0
ldr r3, .SETBGATTRIBUTE
bl BX_r3
mov r0, #0x2
ldr r1, .SHOWBG
bl BX_r1
ldr r1, .BATTLEBG2_X
ldr r0, .SCRIPTBANK
ldrb r0, [r0]
cmp r0, #0x1
beq TARGETBOX
cmp r0, #0x3
beq TARGETBOX
mov r0, #0xb0
@User box pos y
mov r2, #0xbc
lsl r2, #0x2
b SETBOX
TARGETBOX:
mov r0, #0x8
@Target box pos y
neg r0, r0
mov r2, #0xd0
lsl r2, #0x1
SETBOX:
strh r0, [r4]
strh r2, [r1]
ldr r0, .BOXPAL
mov r1, #0x60
mov r2, #0x20
ldr r3, .LOADPAL
bl BX_r3
mov r0, #0xd
ldr r1, .BOXIMG
mov r2, #0x0
mov r3, #0x0
ldr r4, .COPYTOWINDOW
bl BX_r4
mov r0, #0xd
ldr r1, .PUTTOTILEMAP
bl BX_r1
mov r0, #0xd
mov r1, #0x3
ldr r2, .COPYTOVRAM
bl BX_r2
ldr r0, .SCRIPTBANK
ldrb r0, [r0]
mov r1, #0x58
mul r0, r1
ldr r1, .BATTLEDATA
add r0, #0x30
add r0, r1
ldr r7, .BUFFERRAM
mov r1, #0x0
GETNAMELOOP:
ldrb r2, [r0, r1]
cmp r2, #0xff
beq SETNAME
strb r2, [r7, r1]
add r1, #0x1
b GETNAMELOOP
SETNAME:
add r1, r7
mov r0, #0xb4
strb r0, [r1]
mov r0, #0xe7
strb r0, [r1, #0x1]
mov r0, #0xff
strb r0, [r1, #0x2]
str r7, [sp]
mov r1, sp
mov r4, #0x0
mov r0, #0xd
strb r0, [r1, #0x4]
mov r0, sp
mov r5, #0x22
@Text pos x (Left = 4 / Right = 22)
strb r4, [r0, #0x5]
strb r5, [r0, #0x6]
strb r4, [r0, #0x7]
strb r5, [r0, #0x8]
strb r4, [r0, #0x9]
strb r4, [r0, #0xa]
strb r4, [r0, #0xb]
mov r3, sp
ldrb r2, [r3, #0xc]
mov r1, #0x10
neg r1, r1
mov r0, r1
and r0, r2
strb r0, [r3, #0xc]
mov r2, sp
mov r0, #0x10
strb r0, [r2, #0xc]
ldrb r0, [r2, #0xd]
and r1, r0
strb r1, [r2, #0xd]
mov r0, sp
mov r5, #0x20
strb r5, [r0, #0xd]
mov r1, #0xff
mov r2, #0x0
ldr r3, .ADDTEXTPRINTER
bl BX_r3
ldr r3, .SCRIPTPOINTER
ldr r3, [r3]
ldrb r2, [r3, #0x3]
ldrb r3, [r3, #0x1]
cmp r3, #0x2
beq LOADFROMDATA
cmp r2, #0x0
bne DISPLAYABILITY
ldr r2, .ABILITYBUFFER
ldrb r2, [r2]
b DISPLAYABILITY
LOADFROMDATA:
mov r0, r2
ldr r1, .GETBANK
bl BX_r1
mov r1, #0x58
mul r0, r1
ldr r1, .BATTLEDATA
add r1, #0x20
ldrb r2, [r1, r0]
DISPLAYABILITY:
mov r1, #0xd
mul r2, r1
ldr r1, .ABILITYDATA
add r0, r2, r1
str r0, [sp]
mov r0, sp
mov r1, #0xa
strb r1, [r0, #0x7]
strb r1, [r0, #0x9]
mov r1, #0xff
mov r2, #0x0
ldr r3, .ADDTEXTPRINTER
bl BX_r3
mov r0, #0xd
mov r1, #0x2
ldr r3, .COPYTOVRAM
bl BX_r3
.if LoadIcon == 1
bl LOADPOKEICON
.endif
REMOVEBOX:
ldr r4, .SCRIPTPOINTER
ldr r0, [r4]
add r0, #0x4
ldr r1, .PUSHSCRIPT
bl BX_r1
ldr r0, .ANIMSCRIPT
str r0, [r4]
add sp, #0x10
pop {r3}
mov r8, r3
pop {r4-r7}
pop {r0}
bx r0
.if LoadIcon == 1
LOADPOKEICON:
push {r4-r6,lr}
mov r6, r8
push {r6}
add sp, #-0x10
ldr r0, .SCRIPTBANK
ldrb r0, [r0]
mov r1, #0x58
mul r0, r1
ldr r1, .BATTLEDATA
add r0, r1
ldr r1, [r0, #0x48]
ldrh r0, [r0]
mov r4, r0
mov r2, #0x1
ldr r3, .GETICONIMG
bl BX_r3
str r0, [sp]
ldr r5, .MAKER1
ldr r0, [sp, #0x4]
and r0, r5
mov r1, #0x80
lsl r1, #0x2
orr r0, r1
ldr r1, .MAKER2
and r0, r1
ldr r1, .TAG1
orr r0, r1
str r0, [sp, #0x4]
mov r0, r4
ldr r1, .GETICONPAL
bl BX_r1
str r0, [sp, #0x8]
add r4, sp, #0x8
ldr r0, [r4, #0x4]
and r0, r5
ldr r1, .TAG2
orr r0, r1
str r0, [r4, #0x4]
mov r0, sp
ldr r1, .LOADICONIMG
bl BX_r1
mov r0, r4
ldr r1, .LOADICONPAL
bl BX_r1
ldr r0, .SCRIPTBANK
ldrb r0, [r0]
cmp r0, #0x1
beq TARGETICONPOS
cmp r0, #0x3
beq TARGETICONPOS
mov r1, #0xA2
@User icon x pos (Left = DE / Right = A2)
mov r2, #0x58
@User icon y pos
b LOADICONOAM
TARGETICONPOS:
mov r1, #0xA2
@Target icon x pos (Left = DE / Right = A2)
mov r2, #0x10
@Target icon y pos
LOADICONOAM:
ldr r0, .ICON_CB
mov r3, #0x0
ldr r4, .CREATEICONOAMSPRITE
bl BX_r4
lsl r0, #0x18
lsr r0, #0x18
ldr r2, .SPRITES
lsl r1, r0, #0x4
add r1, r0
lsl r1, #0x2
add r1, r2
mov r0, #0x0
strh r0, [r1, #0x2e]
add sp, #0x10
pop {r3}
mov r8, r3
pop {r4-r6}
pop {r0}
bx r0
.endif
BX_r1:
bx r1
BX_r2:
bx r2
BX_r3:
bx r3
BX_r4:
bx r4
.align 2
.if LoadIcon == 1
.GETICONIMG: .word 0x08097055
.GETICONPAL: .word 0X080971CD
.MAKER1: .word 0XFFFF0000
.MAKER2: .word 0x0000FFFF
.TAG1: .word 0xD75A0000
.TAG2: .word 0x0000D75A
.LOADICONIMG: .word 0x080086DD
.LOADICONPAL: .word 0x08008929
.ICON_CB: .word 0x082507C8
.CREATEICONOAMSPRITE: .word 0x08006F8D
.SPRITES: .word 0x0202063c
.endif
.SCRIPTPOINTER: .word 0x02023D74
.BATTLEBG2_X: .word 0x0202297C
.BATTLEBG2_Y: .word 0x0202297E
.SETBGATTRIBUTE: .word 0x080019E5
.SHOWBG: .word 0x080019BD
.LOADPAL: .word 0x080703ED
.COPYTOWINDOW: .word 0x08004405
.PUTTOTILEMAP: .word 0x08003FA1
.COPYTOVRAM: .word 0x08003F21
.GETBANK: .word 0x08016E25
.BATTLEDATA: .word 0x02023BE4
.BUFFERRAM: .word 0x0202298C
.ADDTEXTPRINTER: .word 0x08002CF5
.ABILITYBUFFER: .word 0x02023D6A
.PUSHSCRIPT: .word 0x08017521
.SCRIPTBANK: .word 0x02023FDB
.ABILITYDATA: .word AbilityDataLoc
.BOXIMG: .word BoxImage
.BOXPAL: .word BoxPallet
.ANIMSCRIPT: .word AnimBox+RomAreaOffset
.align 2
ANIMBOXASM:
push {r4-r7,lr}
mov r5, #0x5 @how lower this more slow the box move it, need be higer than 0
ldr r0, .BGX
ldrh r1, [r0]
ldr r3, .BANK
ldrb r2, [r3]
cmp r2, #0x80
bhs removebox
cmp r2, #0x0
beq loaduserbox
cmp r2, #0x2
beq loaduserbox
mov r4, #0x80 @0x80*4=0x200 : target box x pos
lsl r4, #0x2
cmp r1, r4
bcs endfunc
add r1, r5
cmp r1, r4
bhi adjust
b set
loaduserbox:
mov r4, #0xa4 @0xA4*4=0x290 : user box x pos
lsl r4, #0x2
cmp r1, r4
bls endfunc
sub r1, r5
cmp r1, r4
bcc adjust
b set
removebox:
mov r4, r2
sub r4, #0x80
cmp r4, #0x1
beq removetargetbox
cmp r4, #0x3
beq removetargetbox
mov r4, #0xbf
lsl r4, #0x2
cmp r1, r4
beq removeandend
add r1, r5
cmp r1, r4
bhs adjust
b set
removetargetbox:
mov r4, #0xc7
lsl r4, #0x1
cmp r1, r4
beq removeandend
sub r1, r5
cmp r1, r4
bhs set
adjust:
mov r1, r4
set:
strh r1, [r0]
ldr r0, .POINTER
ldr r1, [r0]
sub r1, #0x5
str r1, [r0]
b endfunc
removeandend:
sub r2, #0x80
strb r2, [r3]
mov r0, #0xd
ldr r1, .REMOVEBOXFUNC1
bl call_r1
mov r0, #0xd
mov r1, #0x1
ldr r2, .REMOVEBOXFUNC2
bl call_r2
mov r0, #0x2
mov r1, #0x7
mov r2, #0x2
ldr r3, .REMOVEBOXFUNC3
bl call_r3
mov r0, #0x2
ldr r1, .REMOVEBOXFUNC4
bl call_r1
ldr r0, .BGX
mov r1, #0x0
strh r1, [r0]
endfunc:
pop {r4-r7,pc}
call_r1:
bx r1
call_r2:
bx r2
call_r3:
bx r3
.align 2
.BGX: .word 0x0202297C
.BANK: .word 0x02023FDB
.POINTER: .word 0x02023D74
.REMOVEBOXFUNC1: .word 0x080040B9
.REMOVEBOXFUNC2: .word 0x08003F21
.REMOVEBOXFUNC3: .word 0x080019E5
.REMOVEBOXFUNC4: .word 0x080019BD
.align 2
CheckIfSturdyIsLifingTarget:
ldr r0, .bank
ldrb r0, [r0]
lsl r0, #0x4
ldr r1, .loc
ldrb r0, [r1, r0]
mov r1, #0x2
and r0, r1
cmp r0, #0x0
beq sturdyeffect
ldr r1, .currpointer
ldr r0, .script
str r0, [r1]
sturdyeffect:
bx lr
.align 2
.bank: .word 0x02023d6c
.loc: .word 0x02023e8c
.currpointer: .word 0x02023d74
.script: .word 0x081d8fd8
@NewSturdyHookRoutine
.align 2
NewSturdyUpdateHook:
mov r5, r2
mov r0, #0x80
lsl r0, #0x11
and r1, r0
cmp r1, #0x0
bne subsreturn
mov r0, #0x58
mul r0, r4
add r0, r5
add r0, #0x20
ldrb r2, [r0]
cmp r2, #0x5
bne falseswipecheck
ldrh r1, [r0, #0x8]
ldrh r0, [r0, #0xc]
cmp r0, r1
bne falseswipecheck
ldr r2, .damageloc
ldr r0, [r2]
cmp r1, r0
bgt subsreturn
sub r0, r1, #0x1
str r0, [r2]
ldr r0, .return3
bx r0
subsreturn:
ldr r0, .return1
bx r0
falseswipecheck:
ldr r0, .return2
bx r0
.align 2
.return1: .word 0x0801f295
.return2: .word 0x0801f1e3
.return3: .word 0x0801f23d
.damageloc: .word 0x02023d50
.protectstruct: .word 0x02023e8c
@SturdyMessageCheckAsm
.align 2
NewSturdyUpdateHook2:
cmp r0, #0x40
beq sturdyjump
cmp r0, #0x40
bgt returnotherchecks
cmp r0, #0x20
bne returnone
ldr r0, .returnone
bx r0
returnone:
ldr r0, .returntwo
bx r0
returnotherchecks:
ldr r2, .returntree
bx r2
call_in_r1:
bx r1
sturdyjump:
ldr r4, .currscript
ldr r0, [r4]
add r0, #0x1
ldr r1, .func
bl call_in_r1
ldr r0, .sturdyscript
str r0, [r4]
pop {r4-r7}
pop {r0}
bx r0
.align 2
.returnone: .word 0x0801fd25
.returntwo: .word 0x0801fc79
.returntree: .word 0x0801fc23
.func: .word 0x08017521
.currscript: .word 0x02023d74
.sturdyscript: .word NewSturdyUpdateScript+RomAreaOffset
@LevitateHookRoutine
.align 2
NewLevitateWonderGuardHook:
cmp r0, #0x4
beq levitatewonderguard
cmp r0, #0x3
bne end
levitatewonderguard:
push {r0}
ldr r4, .scriptloc
ldr r0, [r4]
add r0, #0x1
bl pushscript
pop {r0}
cmp r0, #0x3
beq wonderguardscript
ldr r0, .newlevitatescript
b next
wonderguardscript:
ldr r0, .newwonderguardscript
next:
str r0, [r4]
pop {r4-r7}
pop {r0}
bx r0
end:
lsl r0, #0x1
add r0, r1
ldrh r3, [r0]
strb r4, [r7, #0x7]
ldr r0, .return
bx r0
pushscript:
ldr r1, .scriptpusher
bx r1
.align 2
.scriptloc: .word 0x02023d74
.return: .word 0x0801fd2b
.scriptpusher: .word 0x08017521
.newlevitatescript: .word NewLevitateScript+RomAreaOffset
.newwonderguardscript: .word NewWonderGuardScript+RomAreaOffset
AnimBox:
.byte CallAsmCommand
.word ANIMBOXASM+RomAreaOffset+1
.byte 0x3c
NewRunAwayScript:
.byte LoadAbilityPopUpCommand, 0x1, 0x1, 0x0
.byte 0x10, 0x53, 0x1, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x1, 0x0
.byte 0x3e
NewColorChangeScript:
.byte LoadAbilityPopUpCommand, 0x1, 0x0, 0x0
.byte 0x10, 0xc6, 0x0, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x3c
NewCuteCharmScript:
.byte 0x65, 0x1, 0x0, 0x0, 0xf, 0x0, LoadAbilityPopUpCommand, 0x1, 0x0, 0x0
.byte 0x10, 0x36, 0x1, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x3c
NewDampScript:
.byte 0x39, 0x20, 0x0, LoadAbilityPopUpCommand, 0x1, 0x0, 0x0
.byte 0x10, 0xc4, 0x0, 0x39, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x28
.word 0x081d694e
NewDrizzleScript:
.byte 0x39, 0x20, 0x0, 0x45, 0x7, 0xa, 0x0, 0x0, 0x0, 0x0
.byte LoadAbilityPopUpCommand, 0x1, 0xa, 0x0
.byte 0x10, 0xc1, 0x0, 0x3a, LoadAbilityPopUpCommand, 0x0, 0xa, 0x0
.byte 0x28
.word 0x081d928d
NewDroughtScript:
.byte 0x39, 0x20, 0x0, 0x45, 0x7, 0xb, 0x0, 0x0, 0x0, 0x0
.byte LoadAbilityPopUpCommand, 0x1, 0xa, 0x0
.byte 0x10, 0x4b, 0x1, 0x3a, LoadAbilityPopUpCommand, 0x0, 0xa, 0x0
.byte 0x28
.word 0x081d928d
NewClearBodyWhiteSmokeScript:
.byte 0x39, 0x20, 0x0, LoadAbilityPopUpCommand, 0x1, 0xa, 0x0
.byte 0x10, 0xce, 0x0, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0xa, 0x0
.byte 0x3c
NewSandStreamScript:
.byte 0x39, 0x20, 0x0, 0x45, 0x7, 0xc, 0x0, 0x0, 0x0, 0x0
.byte LoadAbilityPopUpCommand, 0x1, 0xa, 0x0
.byte 0x10, 0x34, 0x1, 0x3a, LoadAbilityPopUpCommand, 0x0, 0xa, 0x0
.byte 0x28
.word 0x081d928d
NewEffectSporePoisonPointPoisonScript:
.byte 0x29, 0x1
.word 0x02023e87
.byte 0x1
.word 0x081d91d5
.byte 0x64, 0x2, LoadAbilityPopUpCommand, 0x1, 0x0, 0x0, 0x13
.word 0x083fe5bc
.byte 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x98, 0x2, 0x3a, 0x3c
NewEffectSporeSleepScript:
.byte 0x29, 0x1
.word 0x02023e87
.byte 0x1
.word 0x081d91b9
.byte 0x64, 0x2, LoadAbilityPopUpCommand, 0x1, 0x0, 0x0, 0x13
.word 0x083fe5c4
.byte 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x98, 0x2, 0x3a, 0x3c
NewSynchronizeEffectSporeStaticParalizeScript:
.byte 0x29, 0x1
.word 0x02023e87
.byte 0x1
.word 0x081d9202
.byte 0x64, 0x2, LoadAbilityPopUpCommand, 0x1, 0x0, 0x0, 0x13
.word 0x083fe5c0
.byte 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x98, 0x2, 0x3a, 0x3c
NewFlashFireScript:
.byte 0x3, 0x2, 0x39, 0x20, 0x0, LoadAbilityPopUpCommand, 0x1, 0x0, 0x12, 0x13
.word 0x083fe650
.byte 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0, 0x28
.word 0x081d694e
NewForescastScript:
.byte 0xe6, 0x3a, LoadAbilityPopUpCommand, 0x1, 0xa, 0x3b
.byte 0x10, 0x3a, 0x1, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0xa, 0x0
.byte 0x3c
NewHyperCutterKeenEyeScript:
.byte 0x39, 0x20, 0x0, LoadAbilityPopUpCommand, 0x1, 0xa, 0x0
.byte 0x10, 0x35, 0x1, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0xa, 0x0
.byte 0x28
.word 0x081d9487
NewSynchronizeImmunityScript:
.byte 0x39, 0x20, 0x0, 0x29, 0x0
.word 0x02023e87
.byte 0x0
.word DisplaySynchAndImmunityString+RomAreaOffset
.byte 0x29, 0x1
.word 0x02023e87
.byte 0x2
.word 0x081d943b
DisplaySynchAndImmunityString:
.byte LoadAbilityPopUpCommand, 0x1, 0x0, 0x0
.byte 0x13
.word 0x083fe644
.byte 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x3c
NewSynchronizeWaterVeilScript:
.byte 0x39, 0x20, 0x0, 0x29, 0x0
.word 0x02023e87
.byte 0x0
.word DisplaySynchAndWaterVeilString+RomAreaOffset
.byte 0x29, 0x1
.word 0x02023e87
.byte 0x2
.word 0x081d9423
DisplaySynchAndWaterVeilString:
.byte LoadAbilityPopUpCommand, 0x1, 0x0, 0x0
.byte 0x13
.word 0x083fe638
.byte 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x3c
NewLimberScript:
.byte 0x39, 0x20, 0x0, 0x29, 0x1
.word 0x02023e87
.byte 0x0
.word 0x081d942f
.byte LoadAbilityPopUpCommand, 0x1, 0x0, 0x0, 0x13
.word 0x083fe63e
.byte 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x3c
NewLevitateScript:
.byte LoadAbilityPopUpCommand, 0x1, 0x0, 0x0
.byte 0x10, 0x4c, 0x1, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x3c
NewWonderGuardScript:
.byte LoadAbilityPopUpCommand, 0x1, 0x0, 0x0
.byte 0x10, 0x1a, 0x0, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x3c
NewLiquidOozeScript:
.byte 0x80, 0x0, 0x2e
.word 0x02023e87
.byte 0x1, 0xb, 0x1, 0xc, 0x1, 0x29, 0x4
.word 0x02023dcc
.byte 0x29
.word 0x081d6a42
.byte LoadAbilityPopUpCommand, 0x1, 0x0, 0x40
.byte 0x13
.word 0x083fe5dc
.byte 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x28
.word 0x081d6a42
NewLiquidOozeLeechSeedScript:
.byte 0x2e
.word 0x02023e87
.byte 0x4, 0x35
.word 0x02023dd0, 0x00100100
.byte 0xb, 0x0, 0xc, 0x0, LoadAbilityPopUpCommand, 0x1, 0x1, 0x40, 0x13
.word 0x083fe558
.byte 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x1, 0x0
.byte 0x28
.word 0x081d8b9a
NewOwnTempoScript:
.byte 0x39, 0x20, 0x0, LoadAbilityPopUpCommand, 0x1, 0x0, 0x14
.byte 0x10, 0xca, 0x0, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x28
.word 0x081d694e
NewRainDishScript:
.byte LoadAbilityPopUpCommand, 0x1, 0x1, 0x0
.byte 0x10, 0x33, 0x1, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x1, 0x0
.byte 0x28
.word 0x081d92b1
NewRoughSkinScript:
.byte 0x35
.word 0x02023dd0, 0x00100100
.byte 0xb, 0x1, 0xc, 0x1, LoadAbilityPopUpCommand, 0x1, 0x0, 0x0
.byte 0x10, 0xcf, 0x0, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x28
.word 0x081d94b6
NewInnerFocusScript:
.byte 0x39, 0x20, 0x0, LoadAbilityPopUpCommand, 0x1, 0x0, 0x0
.byte 0x10, 0x5b, 0x1, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x28
.word 0x081d694e
NewWaterAbsorbVoltAbsorbScript:
.byte 0x3, 0x2, 0x39, 0x20, 0x0, LoadAbilityPopUpCommand, 0x1, 0x0, 0x0
.byte 0x10, 0x47, 0x1, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x28
.word 0x081d93eb
NewWaterAbsorbVoltAbsorbScript2:
.byte 0x3, 0x2, 0x39, 0x20, 0x0, 0x35
.word 0x02023dd0, 0x00000100
.byte 0xb, 0x0, 0xc, 0x0, LoadAbilityPopUpCommand, 0x1, 0x0, 0x0
.byte 0x10, 0xc5, 0x0, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0, 0x28
.word 0x081d93d5
NewSoundProofScript:
.byte 0x2, 0x3, 0x39, 0x20, 0x0, LoadAbilityPopUpCommand, 0x1, 0x0, 0x2b
.byte 0x10, 0x32, 0x1, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x28
.word 0x081d694e
NewShedSkinScript:
.byte LoadAbilityPopUpCommand, 0x1, 0xa, 0x3d
.byte 0x10, 0x38, 0x1, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0xa, 0x0
.byte 0x98, 0x1, 0x3f
NewTruantScript:
.byte LoadAbilityPopUpCommand, 0x1, 0x1, 0x36
.byte 0x13
.word 0x083fe61a
.byte 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x1, 0x0
.byte 0x28
.word 0x081d94fa
NewSpeedBoostScript:
.byte 0x45, 0x1, 0x1
.word 0x02023fd4
.byte LoadAbilityPopUpCommand, 0x1, 0xa, 0x0
.byte 0x10, 0xc2, 0x0, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0xa, 0x0
.byte 0x3f
NewStickyHoldScript:
.byte 0x39, 0x20, 0x0, LoadAbilityPopUpCommand, 0x1, 0x0, 0x0
.byte 0x10, 0x37, 0x1, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x28
.word 0x081d6947
@fix sticky hold faint bug
NewTraceScript:
.byte 0x39, 0x20, 0x0, LoadAbilityPopUpCommand, 0x1, 0xa, 0x24
.byte 0x10, 0x30, 0x1, 0x12, 0x20, 0x0, LoadAbilityPopUpCommand, 0x0, 0xa, 0x0
.byte 0x10, 0x30, 0x1, 0x12, 0x20, 0x0, LoadAbilityPopUpCommand, 0x1, 0xa, 0x0, 0x10, 0xd0, 0x0, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0xa, 0x0, 0x3f
NewIntimidateScript:
.byte 0x39, 0x20, 0x0, 0x2e
.word 0x02023d6c
.byte 0x0, 0x2e
.word 0x02023fde
.byte 0x91
IntimidateLoop:
.byte 0xe1
.word 0x081d936a
.byte 0x1d, 0x0, 0x0, 0x0, 0x0, 0x1
.word NextIntimidateTarget+RomAreaOffset
.byte 0x1e, 0x0, 0x1d
.word AbilityBlocksIntimidateScript+RomAreaOffset
@Clear body
.byte 0x1e, 0x0, 0x34
.word AbilityBlocksIntimidateScript+RomAreaOffset
@Hyper cutter
.byte 0x1e, 0x0, 0x49
.word AbilityBlocksIntimidateScript+RomAreaOffset
@white smoke
.byte 0x1e, 0x0, 0x14
.word AbilityBlocksIntimidateScript+RomAreaOffset
@Own tempo
.byte 0x1e, 0x0, 0x27
.word AbilityBlocksIntimidateScript+RomAreaOffset @inner focus
.byte 0x1e, 0x0, 0xc
.word AbilityBlocksIntimidateScript+RomAreaOffset
@Oblivious
.byte 0x89, 0x21
.word NextIntimidateTarget+RomAreaOffset
.byte 0x29, 0x2
.word 0x02023e87
.byte 0x1
.word NextIntimidateTarget+RomAreaOffset
.byte 0x47, 0x45, 0x0, 0x1
.word 0x02023fd4
.byte LoadAbilityPopUpCommand, 0x1, 0xa, 0x0, 0x10, 0xcd, 0x0, 0x12, 0x40, 0x0
.byte LoadAbilityPopUpCommand, 0x0, 0xa, 0x0
NextIntimidateTarget:
.byte 0x2f
.word 0x02023d6c
.byte 0x1
.byte 0x28
.word IntimidateLoop+RomAreaOffset
AbilityBlocksIntimidateScript:
.byte 0x39, 0x20, 0x0, LoadAbilityPopUpCommand, 0x2, 0x0, 0x0, 0x10, 0x55, 0x1, 0x12, 0x40, 0x0
.byte LoadAbilityPopUpCommand, 0x0, 0x0, 0x0, 0x28
.word NextIntimidateTarget+RomAreaOffset
NewSuctionCupsScript:
.byte 0x39, 0x20, 0x0, LoadAbilityPopUpCommand, 0x1, 0x0, 0x15
.byte 0x10, 0xcc, 0x0, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x28
.word 0x081d694e
NewSturdyScript:
.byte 0x39, 0x20, 0x0, LoadAbilityPopUpCommand, 0x1, 0x0, 0x0
.byte 0x10, 0xc3, 0x0, 0x39, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x28
.word 0x081d694e
NewMagnetPullShadowTagArenaTrapScript:
.byte 0x29, 0x1
.word 0x02023e87
.byte 0x2
.word 0x081d8943
.byte LoadAbilityPopUpCommand, 0x1, 0xa, 0x0, 0x14
.word 0x083fe51e
.byte LoadAbilityPopUpCommand, 0x0, 0xa, 0x0
.byte 0x44
NewObliviousScript:
.byte 0x39, 0x20, 0x0, LoadAbilityPopUpCommand, 0x1, 0x0, 0xc
.byte 0x10, 0xc8, 0x0, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0, 0x28
.word 0x081d694e
NewVitalSpiritInsomniaScript:
.byte 0x29, 0x1
.word 0x02023e87
.byte 0x2
.word 0x081d69cc
.byte 0x39, 0x20, 0x0, LoadAbilityPopUpCommand, 0x1, 0x0, 0x0, 0x13
.word 0x083fe576
.byte 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0, 0x28
.word 0x081d694e
NewFlameBodyScript:
.byte 0x29, 0x1
.word 0x02023e87
.byte 0x1
.word 0x081d91e4
.byte 0x64, 0x2, LoadAbilityPopUpCommand, 0x1, 0x0, 0x0, 0x13
.word 0x083fe5c8
.byte 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0, 0x28
.word 0x081d91c3
NewSturdyUpdateScript:
.byte CallAsmCommand
.word CheckIfSturdyIsLifingTarget+RomAreaOffset+1
.byte LoadAbilityPopUpCommand, 0x1, 0x0, 0x5
.byte 0x10, 0x99, 0x0, 0x12, 0x40, 0x0, LoadAbilityPopUpCommand, 0x0, 0x0, 0x0
.byte 0x3c