Spherical Ice

Age 21
Bristol, UK
Seen 13 Hours Ago
Posted 4 Weeks Ago
5,249 posts
11.7 Years
Brine effect for FireRed, requires the callasm command as usual:

Battle Script:
#dynamic 0x800000
#freespacebyte 0xFF

#org @start
callasm 0x8AABBCC +1
goto 0x81D6926
ASM at AABBCC:
.text
.align 2
.thumb
.thumb_func
.global brine

main:
push {lr}
ldr r0, targetBank
ldrb r0, [r0]
mov r1, #0x58
mul r0, r1
ldr r1, battleData
add r1, r0
ldrh r0, [r1, #0x2c]
lsr r0, #1
ldrh r2, [r1, #0x28]
cmp r2, r0
bge endasm
mov r2, #0x2
ldr r3, damageMultiplier
strb r2, [r3, #0x0]

endasm:
pop {r0}
bx r0

.align 2
targetBank: .word 0x02023D6C
battleData: .word 0x02023BE4
damageMultiplier: .word 0x02023FD2
The bolded offset points to this battle script from vanilla FireRed:
#org 0x1D6926
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchancetarget
faintpokemon 0x0 0x0 0x0
setbyte 0x2023FD8 0x0
cmd49 0x0 0x0
end

#org 0x1D695E
attackstring
ppreduce
pause 0x20
missmessage
resultmessage
waitmessage 0x40
goto 0x81D694E

#org 0x1D694E
setbyte 0x2023FD8 0x0
cmd49 0x0 0x0
end