Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .thumb
- .align 2
- main:
- push {lr}
- check_move_id:
- ldr r0, exec_attack
- ldrh r0, [r0]
- mov r1, #0x(move id for shadow force) @you might have to add here as well
- cmp r0, r1
- beq bypass_protect
- mov r1, #0x(move id for phantom force) @again, you'll probably have to throw in an add as well
- cmp r0, r1
- bne end
- stomp_effect:
- ldr r0, attack_effect @phantom force hits harder on minimized targets
- mov r1, #0x8
- strb r1, [r0]
- bypass_protect:
- ldr r0, defending_bank
- ldrb r0, [r0] @which pokemon takes the hit
- mov r1, #0x10 @length of protect structures
- mul r1, r0, r1
- ldr r0, protect_struct
- add r0, r0, r1 @correct position in r0
- ldrb r1, [r0] @takes the protect flag in r1
- lsr r1, r1, #0x1
- lsl r1, r1, #0x1 @clears the flag
- strb r1, [r0] @stores the cleared flag in the correct spot
- end:
- pop {pc}
- .align 2
- defending_bank: .word 0x02023D6C
- protect_struct: .word 0x02023E8C
- attack_effect: .word 0x02023E85
- exec_attack: .word 0x02023D4A
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement