MrDollSteak

Formerly known as 11bayerf1

Age 24
Male
Hong Kong
Seen 2 Hours Ago
Posted May 15th, 2019
846 posts
10.7 Years
I haven't contributed here in awhile (sad I know) but I'm here to bring an updated Struggle, as well as a Head Smash 1/2 recoil effect.

To make Head Smash work just give it the same move effect as Take Down (NOT Double-Edge), as the check for the move is contained in the 1/4 recoil damage effect.

Struggle and Head Smash

Spoiler:
Fire Red
Spoiler:
.text
.align 2
.thumb
.thumb_func
.global struggleheadsmash

FailSafe:
	ldr r1, .DamageLoc
	add r0, r1, #0x4
	ldrb r0, [r0]
	cmp r0, #0x0
	bge GetMoveID
	add r0, #0x3
GetMoveID:
	push {r0-r1}
	ldr r0, .MoveIndex
	ldrh r0, [r0]
StruggleCheck:
	cmp r0, #0xA5
	bne HeadSmashCheck
StruggleRecoil:
	pop {r0-r1}
	mov r0, #0x58
	ldr r4, .UserBank
	ldrb r4, [r4]
	mul r4, r0
	mov r0, r8
	add r0, r0, r4
	ldrh r0, [r0, #0x2C]
	asr r0, r0, #0x2
	b Return
HeadSmashCheck:
	ldr r1, .HeadSmashIndex
	cmp r0, r1
	bne NormalRecoil
HeadSmashRecoil:
	pop {r0-r1}
	asr r0, r0, #0x1
	b Return
NormalRecoil:
	pop {r0-r1}
	asr r0, r0, #0x2
Return:
	ldr r4, .Return
	bx r4

.align 2
.DamageLoc: .word 0x02023D50
.MoveIndex: .word 0x02023D4A
.UserBank: .word 0x02023D6B
.HeadSmashIndex: .word 0x000001C9
.Return: .word 0x08020AFB

#Insert 00 48 00 47 xx xx xx 08 at 08020AEC
1C9 refers to the move index of Head Smash as taken from Bulbapedia so just replace this with whatever index your Head Smash is.

Emerald
Spoiler:
.text
.align 2
.thumb
.thumb_func
.global struggleheadsmash

FailSafe:
	ldr r1, .DamageLoc
	add r0, r1, #0x4
	ldrb r0, [r0]
	cmp r0, #0x0
	bge GetMoveID
	add r0, #0x3
GetMoveID:
	push {r0-r1}
	ldr r0, .MoveIndex
	ldrh r0, [r0]
StruggleCheck:
	cmp r0, #0xA5
	bne HeadSmashCheck
StruggleRecoil:
	pop {r0-r1}
	mov r0, #0x58
	ldr r4, .UserBank
	ldrb r4, [r4]
	mul r4, r0
	mov r0, r8
	add r0, r0, r4
	ldrh r0, [r0, #0x2C]
	asr r0, r0, #0x2
	b Return
HeadSmashCheck:
	ldr r1, .HeadSmashIndex
	cmp r0, r1
	bne NormalRecoil
HeadSmashRecoil:
	pop {r0-r1}
	asr r0, r0, #0x1
	b Return
NormalRecoil:
	pop {r0-r1}
	asr r0, r0, #0x2
Return:
	ldr r4, .Return
	bx r4

.align 2
.DamageLoc: .word 0x020241F0
.MoveIndex: .word 0x020241EA
.UserBank: .word 0x0202420B
.HeadSmashIndex: .word 0x000001C9
.Return: .word 0x0804939F

#Insert 00 48 00 47 xx xx xx 08 at 08049390
1C9 refers to the move index of Head Smash as taken from Bulbapedia so just replace this with whatever index your Head Smash is.