Chacha Dinosaur

Adamant and adaptive dinosaur.

Age 24
Male
Seen March 4th, 2018
Posted September 8th, 2017
454 posts
6.1 Years
Here is the effect for acupressure:
Acupressure (Set the targeting scheme to '2' so that the move it can select any target bank):
Script:
Spoiler:

#dynamic 0x800000
#freespacebyte 0xFF

#org @main
callasm 0x8GGGGGG+1
attackcanceler
attackstring
ppreduce
callasm 0x8HHHHHH+1
attackanimation
waitanimation
callasm 0x8IIIIII+1
statbuffchange 0x1 false 0x81D694E
jumpifbyte 0x0 0x2023E87 0x2 0x81D694E
setbyte 0x2023FD4 0x27
playanimation 0x0 0x1 0x2023FD4
cmd47
printfromtable 0x83FE57C
waitmessage 0x40
goto 0x81D694E


Asm at GGGGGG:
Spoiler:

.text
.align 2
.thumb
.thumb_func
.global targetAdjust

main:
push {lr}
ldr r0, userBank
ldr r1, targetBank
ldrb r2, [r0]
ldrb r3, [r1]
mov r4, #0x1
and r4, r2
mov r5, #0x1
and r5, r3
cmp r4, #0x1
beq targetside
cmp r5, #0x1
bne end
sub r3, #0x1
strb r3, [r1]
b end

targetside:
cmp r5, #0x1
beq end
add r3, #0x1
strb r3, [r1]
end:
pop {r0}
bx r0

.align 2
targetBank: .word 0x02023D6C
userBank: .word 0x02023D6B


ASM at HHHHHH
Spoiler:

.text
.align 2
.thumb
.thumb_func
.global accstatcomp

main:
push {lr}
ldr r0, targetBank
ldrb r0, [r0]
ldr r1, battleData
mov r2, #0x58
mul r2, r0
add r3, r2, r1
ldr r1, userBank
ldrb r1, [r1]
cmp r1, r0
bne subcheck

nosub:
ldr r4, [r3, #0x18]
ldr r5, comp1
cmp r4, r5
bgt allmax
b end

subcheck:
ldr r4, [r3, #0x50]
ldr r5, subval
cmp r4, r5
beq fail
b nosub

allmax:
ldr r4, [r3, #0x1c]
ldr r5, comp2
cmp r4, r5
bne end
fail:
ldr r1, failScript
ldr r0, scriptPointer
str r1, [r0, #0x0]
end:
pop {r0}
bx r0

.align 2
failScript: .word 0x081D7DED
targetBank: .word 0x02023D6C
userBank: .word 0x02023D6B
battleData: .word 0x02023BE4
scriptPointer: .word 0x02023D74
comp1: .word 0x0C0C0C00
comp2: .word 0x0C0C0C0C
subval: .word 0x01000000


ASM at IIIIII:
Spoiler:

.text
.align 2
.thumb
.thumb_func
.global accupressure

main:
push {lr}
bl GetRand
mov r1, #0x7
and r1, r0
ldr r0, targetBank
ldrb r0, [r0]
ldr r2, battleData
mov r3, #0x58
mul r0, r3
add r4, r0, r2
add r4, #0x18
cmp r1, #0x0
bne Cont
Limitadj:
mov r1, #0x1

Cont:
add r6, r4, r1
ldrb r5, [r6, #0x0]
cmp r5, #0xC
bne End
cmp r1, #0x7
beq Limitadj 
add r1, #0x1
b Cont

End:
add r1, #0x20
ldr r2, statByte
strb r1, [r2]
pop {r0}
bx r0

GetRand:
ldr r2, randGen
bx r2

.align 2
statByte: .word 0x02023FDE
targetBank: .word 0x02023D6C
battleData: .word 0x02023BE4
randGen: .word 0x08044EC9


The first ASM adjusts the target, if accidentally selected by the player or AI that is out of the range of acupressure i.e opponent's team, to the required range. (If somebody has the knowledge of hacking the targeting scheme then this ASM would not be required).

The seconds ASM checks for maximization of all stats and ally's substitute.

The third ASM randomly selects the boosting byte.