- 32
- Posts
- 6
- Years
- Seen Sep 1, 2023
Oh, that makes sense! I was just wondering;Every ability has an index that is associated with its position in the ability name/descriptions table. For example, speed boost is ability 0x3. So, if you add an ability just after air lock, it would be ability 0x4F and you would assign that index to your pokemon's ability slot
So I used this routine here:
I am also using MrDollSteak's Decap and Attack Rombase, in which the ID for Sniper is 0x55.Sniper, Technician, Defeatist and the Slow Start Attack Drop
Spoiler:Fire Red
Spoiler:.SlowStartLoc is a free ram location that you can use to have the counter for slow start.Code:.text .align 2 .thumb .thumb_func .global snipertechnicianandslowstartattackdrop Main: cmp r4, #0x37 bne Sniper HustleBoost: lsr r0, r7, #0x1 add r7, r0, r7 Sniper: cmp r4, #0x62 bne Technician CheckCrit: ldr r0, .CritLoc ldrb r0, [r0] cmp r0, #0x2 bne Return b Boost Technician: cmp r4, #066 bne Defeatist CheckBasePower: ldr r0, .BasePower ldrb r0, [r0] cmp r0, #0x3D bge Return Boost: lsr r0, r7, #0x1 add r7, r0, r7 mov r2, r8 lsr r0, r2, #0x1 add r0, r0, r2 mov r8, r0 Defeatist: cmp r4, #066 bne SlowStart CheckHP: ldrh r2, [r0, #0xC] lsr r2, r2, #0x1 ldrh r0, [r0, #0x8] cmp r0, r2 bgt Return mov r2, r8 lsr r0, r2, #0x1 mov r8, r0 b AttackDrop SlowStart: cmp r4, #0x71 bne Return CheckCounter: ldr r0, .SlowStartLoc ldr r2, [sp, #0xC] add r0, r0, r2 ldrb r0, [r0] cmp r0, #0x0 beq Return AttackDrop: lsr r7, r7, #0x1 Return: ldr r0, .Return bx r0 .align 2 .CritLoc: .word 0x02023D71 .BasePower: .word 0x02024020 .SlowStartLoc: .word 0x0203C024 .Return: .word 0x0803F065 #Insert 00 48 00 47 xx xx xx 08 at 03F05C
It has come to my attention that Technician can apply some unwanted boosts to Revenge and a few other moves, so the code will be amended in the future.
Emerald
Spoiler:.SlowStartLoc is a free ram location that you can use to have the counter for slow start.Code:.text .align 2 .thumb .thumb_func .global damagecalchalve Main: cmp r4, #0x37 bne Sniper HustleBoost: lsr r0, r7, #0x1 add r7, r0, r7 Sniper: cmp r4, #0x62 bne Technician CheckCrit: ldr r0, .CritLoc ldrb r0, [r0] cmp r0, #0x2 bne Return b Boost Technician: cmp r4, #066 bne Defeatist CheckBasePower: ldr r0, .BasePower ldrb r0, [r0] cmp r0, #0x3D bge Return Boost: lsr r0, r7, #0x1 add r7, r0, r7 mov r2, r8 lsr r0, r2, #0x1 add r0, r0, r2 mov r8, r0 Defeatist: cmp r4, #066 bne SlowStart CheckHP: ldrh r2, [r0, #0xC] lsr r2, r2, #0x1 ldrh r0, [r0, #0x8] cmp r0, r2 bgt Return mov r2, r8 lsr r0, r2, #0x1 mov r8, r0 b AttackDrop SlowStart: cmp r4, #0x71 bne Return CheckCounter: ldr r0, .SlowStartLoc ldr r2, [sp, #0x10] add r0, r0, r2 ldrb r0, [r0] cmp r0, #0x0 beq Return AttackDrop: lsr r7, r7, #0x1 Return: ldr r0, .Return bx r0 .align 2 .CritLoc: .word 0x02024211 .BasePower: .word 0x020244E0 .SlowStartLoc: .word 0x0203E324 .Return: .word 0x0806989B #Insert 00 48 00 47 xx xx xx 08 at 069888
It has come to my attention that Technician can apply some unwanted boosts to Revenge and a few other moves, so the code will be amended in the future.
I can't find any mention of this number in the routine though!
Likewise, the ID for Technician appears to be 0x52, yet this is nowhere to be found.
I want to find the IDs for Defeatist and Slow Start, yet I can't figure out where they could be!
Any ideas?