Male
Seen August 19th, 2018
Posted August 19th, 2018
1,312 posts
12.2 Years
All for FireRed:
Gastro Acid: (note that all this does is change the target's ability to ability #0x0)
First insert this string:
FD 10 B4 E7 00 FE BB D6 DD E0 DD E8 ED 00 EB D5 E7 00 E7 E9 E4 E4 E6 D9 E7 E7 D9 D8 AB FF 00
(it says, "[the target]'s Ability was suppressed!")

Next insert this ASM code:
Spoiler:
.text
.align 2
.thumb
.thumb_func
.global test

main:
push {lr}
ldr r0, .TargetBank
ldr r1, .BattleData
ldrb r0, [r0]
mov r2, #0x58
mul r2, r0
add r1, #0x20
add r1, r2
mov r3, #0x0
ldrb r4, [r1]
cmp r3, r4
beq Abort
strb r3, [r1]
b End

Abort:
ldr r0, .CurrentScript
ldr r1, .FailScript
str r1, [r0]

End:
pop {r0}
bx r0

.align 2
.BattleData: .word 0x02023BE4
.UserBank: .word 0x02023D6B
.TargetBank: .word 0x02023D6C
.BasePower: .word 0x02023F50
.CurrentScript: .word 0x02023d74
.FailScript: .word 0x081D7DF0


And finally, use this battle script:
Spoiler:
#org @main
attackcanceler
attackstring
ppreduce
callasm 0x8(offset of ASM routine + 1)
attackanimation
waitanimation
setword 0x203C020 0x8[offset of string]
printstring 0x184
waitmessage 0x40
goto 0x81D694E


As for the animation, I just use Acid's animation but modified with Sleep Powder's palette, which makes it look a nice greenish-brown color just like the official games.

----------------------------------------------------------------------

Power Trick: (note that this doesn't account for Baton Passing like the official games, sorry :P)
Exactly the same as above for Gastro Acid, but use this string and ASM instead.

String:
FD 0F 00 E7 EB DD E8 D7 DC D9 D8 00 DD E8 E7 00 BB E8 E8 D5 D7 DF 00 FE D5 E2 D8 00 BE D9 DA D9 E2 E7 D9 AB FF 00
ASM:
Spoiler:
.text
.align 2
.thumb
.thumb_func
.global test

main:
push {lr}
ldr r0, .UserBank
ldr r1, .BattleData
ldrb r0, [r0]
mov r2, #0x58
mul r2, r0
add r1, #0x2
add r1, r2
ldrb r0, [r1] /*Attack*/
ldrb r2, [r1, #0x2] /*Defense*/
strb r2, [r1]
strb r0, [r1, #0x2]
pop {r0}
bx r0

.align 2
.BattleData: .word 0x02023BE4
.UserBank: .word 0x02023D6B


Battle script:
Spoiler:
#org @main
attackcanceler
attackstring
ppreduce
callasm 0x8(offset of ASM routine + 1)
attackanimation
waitanimation
setword 0x203C020 0x8[offset of string]
printstring 0x184
waitmessage 0x40
goto 0x81D694E


As for the animation, I used Psych Up's animation movement with the particle I've attached to the bottom of this post.

----------------------------------------------------------------------

Me First:

We're going to have to insert three ASM routines.

ASM routine 1:
Spoiler:
.text
.align 2
.thumb
.thumb_func
.global test

Main:
push {lr}
ldr r0, .TargetBank /*what slot is the target*/
ldrb r0, [r0, #0x0]
ldr r1, .BattleStruct
mov r2, #0x58
mul r0, r2
add r5, r0, r1 /*calculates target stats offset*/

StatusCheck: /*checks if target is readying a status move*/
ldr r0, .TargetBank /*get target slot ID*/
ldrb r0, [r0, #0x0] /*r0 has target bank*/
lsl r0, #0x1
ldr r1, .MovesUsed /*r1 has MovesUsed*/
add r0, r1 /*Target's moved used?*/
ldrh r6, [r0]
ldrh r0, [r0] /*r0 has the move that target is going to use*/
ldr r1, .MoveTable /*r1 now has MoveTable*/
mov r2, #0xc /*move data is C bytes*/
mul r0, r2 /*move ID x C*/
add r0, r1 /*get move offset*/
ldrb r0, [r0, #0xa] /*check the move's class*/
cmp r0, #0x2 /*is it a status move?*/
beq Abort /*if so, the move fails*/
sub r6, #0x1
lsr r6, #0x1
cmp r6, #0xB5 /*fail if Natural Gift*/
beq Abort


OrderCheck:
ldr r0, .TargetBank
ldr r1, .UserBank
ldrb r4, [r0, #0x0] /*put target bank into R4*/
ldrb r5, [r1, #0x0] /*put user bank into R5*/
ldr r1, .TurnOrder /*put turn order offset into R1*/

Loop:
ldrb r2, [r1, #0x0] /*put attacking PKMN into r2*/
cmp r2, r4 /*is the attacking PKMN the target?*/
beq Abort /*if so, quit*/
cmp r2, r5 /*is the attacking PKMN the user?*/
beq End /*if so, attack*/
add r1, #0x1 /*move on to next attacking PKMN*/
b Loop

Abort:
ldr r0, .CurrentScript
ldr r1, .FailScript
str r1, [r0, #0x0]
b End

End:
pop {r0}
bx r0

.align 2

.UserBank: .word 0x02023D6B
.TargetBank: .word 0x02023D6C
.BattleStruct: .word 0x02023BE4
.BasePower: .word 0x02023F50
.TurnOrder: .word 0x02023bde
.MonsMoved: .word 0x02023be2
.MovesUsed: .word 0x02023dc4
.MoveTable: .word 0x08(offset of your move data table)
.CurrentScript: .word 0x02023d74
.FailScript: .word 0x081D7DF0
.CurrentAttack: .word 0x02023D4A

Note: The bolded section can be removed if you want, I rigged it to fail if the opponent is going to use Natural Gift.

ASM routine 2:
Spoiler:
.text
.align 2
.thumb
.thumb_func
.global test

Main:
push {lr}
ldr r0, .TargetBank /*what slot is the target*/
ldrb r0, [r0, #0x0]
ldr r1, .BattleStruct
mov r2, #0x58
mul r0, r2
add r5, r0, r1 /*calculates target stats offset*/

StatusCheck: /*checks if target is readying a status move*/
ldr r0, .TargetBank /*get target slot ID*/
ldrb r0, [r0, #0x0] /*r0 has target bank*/
lsl r0, #0x1
ldr r1, .MovesUsed /*r1 has MovesUsed*/
add r0, r1 /*Target's moved used?*/
ldrh r6, [r0]

Next:
ldr r1, .CurrentAttack
strh r6, [r1]
ldr r1, .CurrentAttack
strh r6, [r1, #0x2]
ldr r1, .CurrentAttack
strh r6, [r1, #0x4]
b End

End:
pop {r0}
bx r0

.align 2

.UserBank: .word 0x02023D6B
.TargetBank: .word 0x02023D6C
.BattleStruct: .word 0x02023BE4
.MovesUsed: .word 0x02023dc4
.MoveTable: .word 0x08(offset of your move data table)
.CurrentAttack: .word 0x02023D4A


ASM routine 3:
Spoiler:
.text
.align 2
.thumb
.thumb_func
.global test

Main:
push {lr}
ldr r0, .TargetBank /*what slot is the target*/
ldrb r0, [r0, #0x0]
ldr r1, .BattleStruct
mov r2, #0x58
mul r0, r2
add r5, r0, r1

SetStuff:
ldr r0, .TargetBank /*get target slot ID*/
ldrb r0, [r0, #0x0] /*r0 has target bank*/
lsl r0, #0x1
ldr r1, .MovesUsed /*r1 has MovesUsed*/
add r0, r1 /*Target's moved used?*/
ldrh r6, [r0]
ldrh r0, [r0] /*r0 has the move that target is going to use*/
ldr r1, .MoveTable /*r1 now has MoveTable*/
mov r2, #0xc /*move data is C bytes*/
mul r0, r2 /*move ID x C*/
add r0, r1 /*get move offset*/
ldrb r0, [r0, #0xA]
ldrb r3, [r0, #0x0] /*r0 should now have move effect*/
cmp r0, #0x2
beq Abort

StealMove:
ldr r1, .EffectTable
mov r2, #0x4
mul r3, r2
add r1, r3 /*r1 should now be at the correct offset of the move table*/
ldr r1, [r1] /*r1 should now have the effect script offset*/
ldr r0, .CurrentScript
str r1, [r0]
b End

Abort:
ldr r0, .CurrentScript
ldr r1, .FailScript
str r1, [r0, #0x0]
b End

End:
pop {r0}
bx r0

.align 2

.UserBank: .word 0x02023D6B
.TargetBank: .word 0x02023D6C
.BattleStruct: .word 0x02023BE4
.BasePower: .word 0x02023F50
.TurnOrder: .word 0x02023bde
.MonsMoved: .word 0x02023be2
.MovesUsed: .word 0x02023dc4
.MoveTable: .word 0x08(offset of your move data table)
.EffectTable: .word 0x08(offset of your move effect table)
.CurrentScript: .word 0x02023d74
.FailScript: .word 0x081D7DF0


And finally, use this battle script:
Spoiler:
#org @MeFirst
attackcanceler
attackstring
callasm 0x8(offset of the first ASM routine + 1)
attackanimation
waitanimation
callasm 0x8(offset of the second ASM routine + 1)
setbyte 0x2023FDC 0x0
setbyte 0x2023FDD 0x0
printstring 0x4
callasm 0x8(offset of the third ASM routine + 1)


I know this method seems rather ridiculous to require 3 callasm's (and maybe there might be some redundant checks left in there because they were all modified heavily from Doesnt's Sucker Punch routine), but basically this method insures that it first prints "[user] used Me First!", does Me First's unique animation, then updates the RAM to the stolen Move ID, then says, "[user] used [stolen move]!" and plays the stolen move's animation. Having three check routines in between commands was necessary for Me First to have it's own unique animation AND still play the new animation afterwards AND display the updated string afterwards.

-----------------------------------------------------
(these particles are just for Power Trick and Wring Out. Use Psych Up's movement for Power Trick, and use Gust's movement for Wring Out)