Shadowraze
ur mum
- 794
- Posts
- 12
- Years
- Age 26
- ur mum
- Seen Nov 24, 2022
I don't know if you know this already but, the firered links keep redirecting to the OP.
Attack Order, Defend Order, and Heal Order
Alright! Since I've gotten into move animations nowadays, I've come up Vespiquen's signature moves: Attack Order, Defend Order, and Heal Order. They are all animations by the way. Their effects will be explained later.
Spoiler:I've worked out how to have the Gen IV Roost effect in Emerald. This is how it is achieved:
1. First, in the battle script for Recover, it checks if the move ID is Roost (by having Recover's script, the AI can use Roost properly). If the move ID is Roost, then it branches to a near identical script that also calls a custom routine
2. The custom routine checks if the attacking Pokémon has Flying type in either of its slots and then changes it to the ??? type (0x9). If it's a pure Flying type, then it will become a pure ??? type.
3. Another custom routine is run at the end of every turn that checks for any ???-type Pokémon, and changes it back to Flying.
Here's how to implement it:
1. First, you need Jambo51's callasm routine for Battle Script Pro. It is found right here. Despite Jambo writing the routine for FireRed, it works for Emerald too. However, you need to change the "scriptlocation" offset to 0x02024214. Also this is very important, but unlike FireRed, your new command is not going to be 0xF8! Your new command will be 0xF9. It appears that Emerald has an extra battle command, most likely due to the Battle Frontier.
2. Now to get BSP to recognize our new command, open up the folder where BSP is located, and then there should be another folder called "Data". Then you should see a file called, "commands.bsh". Open it up with Notepad, and put this in:
This might be confusing, but DO NOT change anything in the quotation marks! That's just there to show minor info in BSP's command list. I repeat, DO NOT CHANGE A SINGLE THING IN THAT QUOTE!!! Also note that if you were using FireRed, your command would be 0xF8, not 0xF9.
3. Now, put in this routine somewhere:
Code:.text .align 2 .thumb .thumb_func /*What this routine does is check if the attacking PKMN is Flying-type. It then changes its Flying-type to the ???-type.*/ GetPkmnType1: push {r0-r5} ldr r1, .BattleData ldr r0, .CurPokeIndex ldrb r0, [r0] mov r2, #0x58 mul r2, r0 add r1, #0x21 add r1, r2 ldrb r0, [r1] ldrb r2, [r1, #0x1] mov r3, #0x2 cmp r0, r3 beq ChangeType1 cmp r2, r3 beq ChangeType2 b End ChangeType1: mov r4, #0x9 strb r4, [r1] cmp r2, r3 beq ChangeType2 b End ChangeType2: mov r4, #0x9 strb r4, [r1, #0x1] b End End: pop {r0-r5} bx lr .align 2 .BattleData: .word 0x02024084 .CurPokeIndex: .word 0x0202420B
4. Now open up BSP, and open up Recover's battle script. Replace it with this:
A couple things to note: At the top, we have "jumpifhalfword 0x0 0x20241EA 0x163 @RoostHandle".
Replace 0x163 with your move ID for Roost.
Towards the bottom, at "#org @changetype", you see "callasm 0x(offset of your routine +1)". Obviously, put in the offset of the routine we added earlier, but add 0x1 to the offset.
So far, we have made it so that every time a Flying-type Pokémon uses Roost, it will turn into a ???-type. (If it was part-Flying, it would become part-???, and if it was pure-Flying, it would become pure-???).
5. Now we're going to insert another routine. This second routine will be called at the end of every turn and simply checks to see if there are any ???-type Pokémon, and then changes them back to Flying types.
Code:.text .align 2 .thumb .thumb_func HandlePoke1: push {r0-r5} mov r3, #0x9 ldr r1, .Poke1Type ldrb r0, [r1] ldrb r2, [r1, #0x1] cmp r0, r3 beq Poke1ChangeType1 cmp r2, r3 beq Poke1ChangeType2 b HandlePoke2 Poke1ChangeType1: mov r4, #0x2 strb r4, [r1] cmp r2, r3 beq Poke1ChangeType2 b HandlePoke2 Poke1ChangeType2: mov r4, #0x2 strb r4, [r1, #0x1] b HandlePoke2 HandlePoke2: ldr r1, .Poke2Type ldrb r0, [r1] ldrb r2, [r1, #0x1] cmp r0, r3 beq Poke2ChangeType1 cmp r2, r3 beq Poke2ChangeType2 b HandlePoke3 Poke2ChangeType1: mov r4, #0x2 strb r4, [r1] cmp r2, r3 beq Poke2ChangeType2 b HandlePoke3 Poke2ChangeType2: mov r4, #0x2 strb r4, [r1, #0x1] b HandlePoke3 HandlePoke3: ldr r1, .Poke3Type ldrb r0, [r1] ldrb r2, [r1, #0x1] cmp r0, r3 beq Poke3ChangeType1 cmp r2, r3 beq Poke3ChangeType2 b HandlePoke4 Poke3ChangeType1: mov r4, #0x2 strb r4, [r1] cmp r2, r3 beq Poke3ChangeType2 b HandlePoke4 Poke3ChangeType2: mov r4, #0x2 strb r4, [r1, #0x1] b HandlePoke4 HandlePoke4: ldr r1, .Poke4Type ldrb r0, [r1] ldrb r2, [r1, #0x1] cmp r0, r3 beq Poke4ChangeType1 cmp r2, r3 beq Poke4ChangeType2 b End Poke4ChangeType1: mov r4, #0x2 strb r4, [r1] cmp r2, r3 beq Poke4ChangeType2 b End Poke4ChangeType2: mov r4, #0x2 strb r4, [r1, #0x1] b End End: pop {r0-r5} ldr r0, .ReturnAddress bx r0 .align 2 .Poke1Type: .word 0x020240A5 .Poke2Type: .word 0x020240FD .Poke3Type: .word 0x02024155 .Poke4Type: .word 0x020241AD .ReturnAddress: .word 0x080405B1
6. At 0x402A0, change the bytes there to point to where you inserted the second routine (the one right above). DO NOT ADD +1 TO THE OFFSET. I REPEAT, DO NOT ADD +1. This is because the code that is executed before this appears to already account for that.
And now we have a fully working Roost with Generation IV's effect, and the AI can use it properly too, since we're using Recover's battle script slot, but the battle script is designed so that Recover will still function separately from Roost.
A couple things to note, this routine replicates the Generation IV effect of Roost where if the user was pure-Flying, it would become ??? type upon using Roost. In Generation V+, a pure-Flying type using Roost would become Normal-type.. If anyone wants to mod my routine to have the Generation V effect, feel free to do so.
Credits:
Chaos Rush
DoesntKnowHowToPlay - for the idea of the method to achieve this
Shiny Quagsire - for suggesting to me that Emerald might have more battle commands than FireRed due to the Battle Frontier
Tchlatli - I looked at his custom Protean code to figure out how to correctly calculate the type offset of the attacking Pokémon
JPAN - his documentation on FireRed battle-related RAM offsets helped me find the Emerald offsets
To verify that it's working properly, here are some useful RAM offsets:
02024084 - Battle Data (check out this post to see how its structured.)
020240A5 - Your(1) Type 1
020240A6 - Your(1) Type 2
020240FD - Opponent(1) Type 1
020240FE - Opponent(1) Type 2
02024155 - Your(2) Type 1
02024156 - Your(2) Type 2
020241AD - Opponent(2) Type 1
020241AE - Opponent(2) Type 2
This is a problem I have (using MrDollSteak's rombase). I want to have ???-type monsters, but because of this routine, they turn into Flying-types.Something has to be changed here. The second routine to revert ???-type to flying doesn't handle the fact that a ???-type could exist outside of the roost effect.
Indeed it prevent us to use the 9th type or to update roost to gen V effect. (flying types become normal upon using roost, as Chaos Rush stated).
To correct this, we can check 0x02024260 (In emerald, don't know for FR) the moves used by the poke. an Half word is used for each attack used the precedent turn.
First half word for the first banked pokemon, second HW for 2nd poke, etc
I'm too lazy right know to update this, so I'll do it later, I just wanted to point that flaw
Something has to be changed here. The second routine to revert ???-type to flying doesn't handle the fact that a ???-type could exist outside of the roost effect.
Indeed it prevent us to use the 9th type or to update roost to gen V effect. (flying types become normal upon using roost, as Chaos Rush stated).
To correct this, we can check 0x02024260 (In emerald, don't know for FR) the moves used by the poke. an Half word is used for each attack used the precedent turn.
First half word for the first banked pokemon, second HW for 2nd poke, etc
I'm too lazy right know to update this, so I'll do it later, I just wanted to point that flaw
This is a problem I have (using MrDollSteak's rombase). I want to have ???-type monsters, but because of this routine, they turn into Flying-types.
I've just changed it to type #14, which is one of the contest types. It does not make it consistent with Gen V in which the Pokemon turns into Normal type, but it does make the ??? usable for anyone who wants to use it.
Yeah this is true, stupid me for not thinking of this before XD Thanks for that d'oh moment, I'll just program a second ??? type which isn't affected by the routine so scumbag mons with fully unresisted STAB and no weaknesses can be a thing!What's the point of having ???- type monsters when you can extend types so easily?
00 02 03 20 01 03 01 0C 18 8B 1D 08 20 01 00 02 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 06 00 2E 1E 60 01 02 11 89 41 43 8B 1D 08 29 00 23 4D 02 02 02 43 8B 1D 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 12 89 41 62 8B 1D 08 29 00 23 4D 02 02 02 62 8B 1D 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08
00 02 03 20 01 03 GG 0C XX XX XX 08 20 01 00 GG 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 ?? 00 2E 1E 60 01 02 GG 89 41 YY YY YY 08 29 00 23 4D 02 02 02 YY YY YY 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 GG 89 41 ZZ ZZ ZZ 08 29 00 23 4D 02 02 02 ZZ ZZ ZZ 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08
00 02 03 20 01 03 01 0C XX XX XX 08 20 01 00 04 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 ?? 00 2E 1E 60 01 02 11 89 41 YY YY YY 08 29 00 23 4D 02 02 02 YY YY YY 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 14 89 41 ZZ ZZ ZZ 08 29 00 23 4D 02 02 02 ZZ ZZ ZZ 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08
00 02 03 20 01 03 01 0C 53 F4 6F 08 20 01 00 04 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 09 00 2E 1E 60 01 02 11 89 41 7E F4 6F 08 29 00 23 4D 02 02 02 7E F4 6F 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 14 89 41 9D F4 6F 08 29 00 23 4D 02 02 02 9D F4 6F 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08
00 02 03 20 01 03 04 0C 7C 8B 1D 08 20 01 00 05 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 30 00 2E 1E 60 01 02 14 89 41 A7 8B 1D 08 29 00 23 4D 02 02 02 A7 8B 1D 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 15 89 41 C6 8B 1D 08 29 00 23 4D 02 02 02 C6 8B 1D 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08
00 02 03 20 01 03 GG 0C XX XX XX 08 20 01 00 GG 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 30 00 2E 1E 60 01 02 GG 89 41 YY YY YY 08 29 00 23 4D 02 02 02 YY YY YY 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 GG 89 41 ZZ ZZ ZZ 08 29 00 23 4D 02 02 02 ZZ ZZ ZZ 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08
00 02 03 20 01 03 GG 0C XX XX XX 08 20 01 03 GG 0C XX XX XX 08 20 01 00 GG 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 30 00 2E 1E 60 01 02 GG 89 41 YY YY YY 08 29 00 23 4D 02 02 02 YY YY YY 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 GG 89 41 ZZ ZZ ZZ 08 29 00 23 4D 02 02 02 ZZ ZZ ZZ 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08
00 02 03 20 01 03 GG 0C XX XX XX 08 20 01 03 GG 0C XX XX XX 08 20 01 00 GG 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 30 00 2E 1E 60 01 02 GG 89 41 YY YY YY 08 29 00 23 4D 02 02 02 YY YY YY 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 GG 89 41 SS SS SS 08 29 00 23 4D 02 02 02 SS SS SS 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 GG 89 41 ZZ ZZ ZZ 08 29 00 23 4D 02 02 02 ZZ ZZ ZZ 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08
00 02 03 20 01 03 04 0C 8F F6 6F 08 20 01 03 05 0C 8F F6 6F 08 20 01 00 03 0C CB 8B 1D 08 09 0A 2E DC 60 01 02 00 48 01 09 00 2E 1E 60 01 02 14 89 41 BA F6 6F 08 29 00 23 4D 02 02 02 BA F6 6F 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 15 89 41 D9 F6 6F 08 29 00 23 4D 02 02 02 D9 F6 6F 08 13 70 15 40 08 12 40 00 2E 1E 60 01 02 13 89 41 F8 F6 6F 08 29 00 23 4D 02 02 02 F8 F6 6F 08 13 70 15 40 08 12 40 00 28 62 6F 1D 08
I also made one effect by myself. (For Emerald too).
U-Turn :
I've noticed Dragon Tail has an effect for FireRed and Ruby but not for Emerald, so I ported one.
Emerald Dragon Tail effect
Spoiler:
#org @start
attackcanceler
accuracycheck 0x82D8A5E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
forcerandomswitch @snippet1
#org @snippet1
pause 0x20
orbyte 0x202427C 0x20
resultmessage
waitmessage 0x40
goto 0x82D8A4E
Only bugs are that it says 'But it failed' if you use it against a trainer with one Pokemon (or 2 for a double battle) but it still does damage. It says nothing if used on a wild, just does damage and ends the battle.
Attack Order, Defend Order, and Heal Order
![]()
![]()
![]()
Alright! Since I've gotten into move animations nowadays, I've come up Vespiquen's signature moves: Attack Order, Defend Order, and Heal Order. They are all animations by the way. Their effects will be explained later.
But first, here's the particle to be used in those moves:
![]()
I used Twister's sheet to redraw the bees which I got its original particle from DPPt. Wherever you have inserted the particle, take note of its index number.
Attack Order:
Spoiler:FireRed:
Spoiler:00 YY 28 00 97 27 00 4A 27 0A 03 28 01 19 E5 00 3F 02 XX XX XX 08 82 05 78 00 46 00 05 00 46 00 1E 00 04 01 02 XX XX XX 08 82 05 73 00 37 00 06 00 3C 00 19 00 04 01 02 XX XX XX 08 82 05 73 00 3C 00 07 00 3C 00 1E 00 02 XX XX XX 08 82 05 73 00 37 00 0A 00 3C 00 1E 00 04 03 02 XX XX XX 08 82 05 64 00 32 00 04 00 32 00 1A 00 04 01 02 XX XX XX 08 82 05 69 00 19 00 08 00 3C 00 14 00 04 01 02 XX XX XX 08 82 05 73 00 28 00 0A 00 30 00 1E 00 04 03 02 XX XX XX 08 82 05 78 00 1E 00 06 00 2D 00 19 00 02 XX XX XX 08 82 05 73 00 23 00 0A 00 3C 00 1E 00 04 03 02 XX XX XX 08 82 05 69 00 14 00 08 00 28 00 00 00 04 03 02 XX XX XX 08 82 05 14 00 FF 00 0F 00 20 00 00 00 02 XX XX XX 08 82 05 6E 00 0A 00 08 00 20 00 14 00 05 02 08 7C 3E 08 83 04 E0 FF F0 FF 01 00 03 00 19 84 00 3F 03 D1 8C 09 08 02 05 01 00 03 00 00 00 0C 00 01 00 03 D1 8C 09 08 02 05 03 00 03 00 00 00 0C 00 01 00 04 04 02 50 7C 3E 08 83 02 01 00 03 00 19 84 00 3F 04 04 02 50 7C 3E 08 83 02 01 00 03 00 19 84 00 3F 04 04 02 08 7C 3E 08 83 04 20 00 14 00 01 00 03 00 19 84 00 3F 05 0B 03 0D 08
*YY is the particle index of the bees.
*Insert at XX XX XX:
YY 28 YY 28 D0 C9 3A 08 00 2C 3E 08 00 00 00 00 FC 1C 23 08 11 2D 0A 08
Emerald:
Spoiler:00 YY 28 00 97 27 00 4A 27 0A 03 28 01 19 EC 00 3F 02 XX XX XX 08 82 05 78 00 46 00 05 00 46 00 1E 00 04 01 02 XX XX XX 08 82 05 73 00 37 00 06 00 3C 00 19 00 04 01 02 XX XX XX 08 82 05 73 00 3C 00 07 00 3C 00 1E 00 02 XX XX XX 08 82 05 73 00 37 00 0A 00 3C 00 1E 00 04 03 02 XX XX XX 08 82 05 64 00 32 00 04 00 32 00 1A 00 04 01 02 XX XX XX 08 82 05 69 00 19 00 08 00 3C 00 14 00 04 01 02 XX XX XX 08 82 05 73 00 28 00 0A 00 30 00 1E 00 04 03 02 XX XX XX 08 82 05 78 00 1E 00 06 00 2D 00 19 00 02 XX XX XX 08 82 05 73 00 23 00 0A 00 3C 00 1E 00 04 03 02 XX XX XX 08 82 05 69 00 14 00 08 00 28 00 00 00 04 03 02 XX XX XX 08 82 05 14 00 FF 00 0F 00 20 00 00 00 02 XX XX XX 08 82 05 6E 00 0A 00 08 00 20 00 14 00 05 02 58 73 59 08 83 04 E0 FF F0 FF 01 00 03 00 19 8B 00 3F 03 85 54 0D 08 02 05 01 00 03 00 00 00 0C 00 01 00 03 85 54 0D 08 02 05 03 00 03 00 00 00 0C 00 01 00 04 04 02 A0 73 59 08 83 02 01 00 03 00 19 8B 00 3F 04 04 02 A0 73 59 08 83 02 01 00 03 00 19 8B 00 3F 04 04 02 58 73 59 08 83 04 20 00 14 00 01 00 03 00 19 8B 00 3F 05 0B 03 0D 08
*YY is the particle index of the bees.
*Insert at XX XX XX:
YY 28 YY 28 0C 49 52 08 88 23 59 08 00 00 00 00 A8 C6 2E 08 69 F2 0F 08
Defend Order:
Spoiler:FireRed:
Spoiler:00 YY 28 00 97 27 00 4A 27 0A 03 28 01 19 E5 00 3F 02 XX XX XX 08 82 05 78 00 46 00 05 00 46 00 1E 00 04 01 02 XX XX XX 08 82 05 73 00 37 00 06 00 3C 00 19 00 04 01 02 XX XX XX 08 82 05 73 00 3C 00 07 00 3C 00 1E 00 02 XX XX XX 08 82 05 73 00 37 00 0A 00 3C 00 1E 00 04 03 02 XX XX XX 08 82 05 64 00 32 00 04 00 32 00 1A 00 04 01 02 XX XX XX 08 82 05 69 00 19 00 08 00 3C 00 14 00 04 01 02 XX XX XX 08 82 05 73 00 28 00 0A 00 30 00 1E 00 04 03 02 XX XX XX 08 82 05 78 00 1E 00 06 00 2D 00 19 00 02 XX XX XX 08 82 05 73 00 23 00 0A 00 3C 00 1E 00 04 03 02 XX XX XX 08 82 05 69 00 14 00 08 00 28 00 00 00 04 03 02 XX XX XX 08 82 05 14 00 FF 00 0F 00 20 00 00 00 02 XX XX XX 08 82 05 6E 00 0A 00 08 00 20 00 14 00 05 00 C8 27 05 0B 02 0D 04 01 0E 27 B2 1C 08 05 08
*YY is the particle index of the bees.
*Insert at XX XX XX:
YY 28 YY 28 D0 C9 3A 08 00 2C 3E 08 00 00 00 00 FC 1C 23 08 11 2D 0A 08
Emerald:
Spoiler:00 YY 28 00 97 27 00 4A 27 0A 03 28 01 19 EC 00 3F 02 XX XX XX 08 82 05 78 00 46 00 05 00 46 00 1E 00 04 01 02 XX XX XX 08 82 05 73 00 37 00 06 00 3C 00 19 00 04 01 02 XX XX XX 08 82 05 73 00 3C 00 07 00 3C 00 1E 00 02 XX XX XX 08 82 05 73 00 37 00 0A 00 3C 00 1E 00 04 03 02 XX XX XX 08 82 05 64 00 32 00 04 00 32 00 1A 00 04 01 02 XX XX XX 08 82 05 69 00 19 00 08 00 3C 00 14 00 04 01 02 XX XX XX 08 82 05 73 00 28 00 0A 00 30 00 1E 00 04 03 02 XX XX XX 08 82 05 78 00 1E 00 06 00 2D 00 19 00 02 XX XX XX 08 82 05 73 00 23 00 0A 00 3C 00 1E 00 04 03 02 XX XX XX 08 82 05 69 00 14 00 08 00 28 00 00 00 04 03 02 XX XX XX 08 82 05 14 00 FF 00 0F 00 20 00 00 00 02 XX XX XX 08 82 05 6E 00 0A 00 08 00 20 00 14 00 05 00 C8 27 05 0B 02 0D 04 01 0E 87 D6 2C 08 05 08
*YY is the particle index of the bees.
*Insert at XX XX XX:
YY 28 YY 28 0C 49 52 08 88 23 59 08 00 00 00 00 A8 C6 2E 08 69 F2 0F 08
Heal Order:
Spoiler:FireRed:
Spoiler:00 YY 28 00 97 27 00 4A 27 0A 03 28 01 19 E5 00 3F 02 XX XX XX 08 82 05 78 00 46 00 05 00 46 00 1E 00 04 01 02 XX XX XX 08 82 05 73 00 37 00 06 00 3C 00 19 00 04 01 02 XX XX XX 08 82 05 73 00 3C 00 07 00 3C 00 1E 00 02 XX XX XX 08 82 05 73 00 37 00 0A 00 3C 00 1E 00 04 03 02 XX XX XX 08 82 05 64 00 32 00 04 00 32 00 1A 00 04 01 02 XX XX XX 08 82 05 69 00 19 00 08 00 3C 00 14 00 04 01 02 XX XX XX 08 82 05 73 00 28 00 0A 00 30 00 1E 00 04 03 02 XX XX XX 08 82 05 78 00 1E 00 06 00 2D 00 19 00 02 XX XX XX 08 82 05 73 00 23 00 0A 00 3C 00 1E 00 04 03 02 XX XX XX 08 82 05 69 00 14 00 08 00 28 00 00 00 04 03 02 XX XX XX 08 82 05 14 00 FF 00 0F 00 20 00 00 00 02 XX XX XX 08 82 05 6E 00 0A 00 08 00 20 00 14 00 05 00 2F 27 05 0B 02 0D 04 01 0E C9 56 1D 08 05 08
*YY is the particle index of the bees.
*Insert at XX XX XX:
YY 28 YY 28 D0 C9 3A 08 00 2C 3E 08 00 00 00 00 FC 1C 23 08 11 2D 0A 08
Emerald:
Spoiler:00 YY 28 00 97 27 00 4A 27 0A 03 28 01 19 EC 00 3F 02 XX XX XX 08 82 05 78 00 46 00 05 00 46 00 1E 00 04 01 02 XX XX XX 08 82 05 73 00 37 00 06 00 3C 00 19 00 04 01 02 XX XX XX 08 82 05 73 00 3C 00 07 00 3C 00 1E 00 02 XX XX XX 08 82 05 73 00 37 00 0A 00 3C 00 1E 00 04 03 02 XX XX XX 08 82 05 64 00 32 00 04 00 32 00 1A 00 04 01 02 XX XX XX 08 82 05 69 00 19 00 08 00 3C 00 14 00 04 01 02 XX XX XX 08 82 05 73 00 28 00 0A 00 30 00 1E 00 04 03 02 XX XX XX 08 82 05 78 00 1E 00 06 00 2D 00 19 00 02 XX XX XX 08 82 05 73 00 23 00 0A 00 3C 00 1E 00 04 03 02 XX XX XX 08 82 05 69 00 14 00 08 00 28 00 00 00 04 03 02 XX XX XX 08 82 05 14 00 FF 00 0F 00 20 00 00 00 02 XX XX XX 08 82 05 6E 00 0A 00 08 00 20 00 14 00 05 00 2F 27 05 0B 02 0D 04 01 0E DF 79 2D 08 05 08
*YY is the particle index of the bees.
*Insert at XX XX XX:
YY 28 YY 28 0C 49 52 08 88 23 59 08 00 00 00 00 A8 C6 2E 08 69 F2 0F 08
Overall, they are created from Twister's animation. I'd plan on Recover but misdirection of the bees on the particles might occur. Anyway, these are the best ones. Attack Order is plainly Twister's animation. Defend Order is combined Twister's animation with Endure's animation. Heal Order is combined Twister's animation with the healing animation. Use Slash's effect for Attack Order's effect. Use Cosmic Power's effect for Defend Order. And, use Recover's effect for Healing Order. Tada! You now have the three Order moves!
I will come up with Ruby soon since the one I've downloaded isn't organized.
Great! Really cool! i've been seraching for this! :D
this movements are my bug type favorite moves.
I have a doubt, How i know which is the particle index?
I hope it'll be useful because I literally spent 5 hours to fix those annoying bugs ._.Freeze Dry
.text
.align 2
.thumb
.thumb_func
.global freezedry1
Main:
cmp r0, #0xB
beq Freeze
cmp r0, #0x2
bne RegularChart
ldr r1, currMove
ldrh r1, [r1]
ldr r0, ThousandArrows
cmp r0, r1
beq Touched
push {r0-r2}
ldr r0, CheckFlag
bl Jump
cmp r2, #0
beq PopRegular
pop {r0-r2}
Touched:
mov r0, #0xA
b Exit
PopRegular:
pop {r0-r2}
b RegularChart
Freeze:
ldr r1, currMove
ldrh r1, [r1]
ldr r0, freezeDryIndex
cmp r0, r1
bne RegularChart
mov r0, #0x14
b Exit
RegularChart:
add r0, r3, #0x2
add r0, r0, r5
ldrb r0, [r0, #0x0]
str r2, [sp, #0x0]
Exit:
ldr r1, =0x08047169
bx r1
Jump:
mov pc, r0
.align 2
currMove: .word 0x020241EA
freezeDryIndex: .word [B]0x23D[/B] /*Index Freeze Dry*/
ThousandArrows: .word [B]0x266[/B] /*Index Thousand Arrows*/
CheckFlag: .word 0x08LLLLLL+1
/*47160: 00 49 08 47 XX+1 XX XX 08*/
.text
.align 2
.thumb
.thumb_func
.global freezedry2
Main:
ldrb r0, [r0, #0x0]
cmp r0, r4
beq NextEntry
cmp r1, #0xB
beq Freeze
cmp r1, #0x2
bne RegularChart
ldr r1, currMove
ldrh r1, [r1]
ldr r0, ThousandArrows
cmp r0, r1
beq Touched
push {r0-r2}
ldr r0, CheckFlag
bl Jump
cmp r2, #0
beq PopRegular
pop {r0-r2}
Touched:
mov r0, #0xA
b Exit
PopRegular:
pop {r0-r2}
b RegularChart
Freeze:
ldr r1, currMove
ldrh r1, [r1]
ldr r0, freezeDryIndex
cmp r0, r1
bne RegularChart
mov r0, #0x14
Exit:
ldr r1, =0x08047190+1
bx r1
RegularChart:
add r0, r3, #0x2
ldr r1, =0x0804718D
bx r1
NextEntry:
ldr r1, =0x08047199
bx r1
Jump:
mov pc, r0
.align 2
currMove: .word 0x020241EA
freezeDryIndex: .word 0x23D
ThousandArrows: .word 0x266
CheckFlag: .word 0x08LLLLLL+1
@47184: 00 4A 10 47 XX+1 XX XX 08
.text
.align 2
.thumb
.thumb_func
.global freezedryai1
Main:
cmp r0, #0xB
beq Freeze
cmp r0, #0x2
bne RegularChart
ldr r1, currMove
ldrh r1, [r1]
ldr r0, ThousandArrows
cmp r0, r1
beq Touched
push {r0-r2}
ldr r0, CheckFlag
bl Jump
cmp r2, #0
beq PopRegular
pop {r0-r2}
Touched:
mov r0, #0xA
b Exit
PopRegular:
pop {r0-r2}
b RegularChart
Freeze:
ldr r1, currMove
ldrh r1, [r1]
ldr r0, freezeDryIndex
cmp r0, r1
bne RegularChart
mov r0, #0x14
b Exit
RegularChart:
mov r0, r8
add r0, #0x2
add r0, r0, r7
ldrb r0, [r0]
Exit:
ldr r1, =0x080476E9
bx r1
Jump:
mov pc, r0
.align 2
currMove: .word 0x02024E1A
freezeDryIndex: .word[B] 0x23D[/B]
ThousandArrows: .word [B]0x266[/B]
CheckFlag: .word 0x08A442F0+1
@476E0: 00 49 08 47 XX+1 XX XX 08
.text
.align 2
.thumb
.thumb_func
.global freezedryai2
Main:
cmp r0, #0xB
beq Freeze
cmp r0, #0x2
bne RegularChart
ldr r1, currMove
ldrh r1, [r1]
ldr r0, ThousandArrows
cmp r0, r1
beq Touched
push {r0-r2}
ldr r0, CheckFlag
bl Jump
cmp r2, #0
beq PopRegular
pop {r0-r2}
Touched:
mov r0, #0xA
b Exit
PopRegular:
pop {r0-r2}
b RegularChart
Freeze:
ldr r1, currMove
ldrh r1, [r1]
ldr r0, freezeDryIndex
cmp r0, r1
bne RegularChart
mov r0, #0x14
b Exit
RegularChart:
mov r0, r8
add r0, #0x2
add r0, r0, r7
ldrb r0, [r0]
Exit:
ldr r1, =0x08047709
bx r1
Jump:
mov pc, r0
.align 2
currMove: .word 0x02024E1A
freezeDryIndex: .word [B]0x23D[/B]
ThousandArrows: .word [B]0x266[/B]
CheckFlag: .word 0x08A442F0+1
@47700: 00 49 08 47 XX+1 XX XX 08
#org 0xA446F0
accuracycheck 0x82D8A5E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
setword 0x203E320 0x8XXXXXX
printstring 0x184
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchancetarget
faintpokemon 0x0 0x0 0x8000000
setbyte 0x2024488 0x0
cmd49 0x0 0x0
end
At XX XX XX :
CE DC D9 00 E3 E4 E4 E3 E7 DD E2 DB 00 FD 0E FE DA D9 E0 E0 00 E7 E8 E6 D5 DD DB DC E8 00 D8 E3 EB E2 AB
"The opposing buffer fell straight down" or something like that, copied from showdown.
push {lr}
ldr r0, BankTarget
ldrb r3, [r0]
ldrb r0, [r0]
mov r1, #0x58
ldr r2, BattleData
mul r0, r1
add r0, r2
ldr r1, [r0]
ldr r2, SubStat
and r1, r2
cmp r1, #0
bne Return
mov r1, r3
ldr r2, StatutFlags
mov r3, #4
mul r1, r3
add r1, r2
ldr r2, [r1]
mov r3, #0x40
and r3, r2
cmp r3, #0
bne KnockFly
mov r3, #0
CheckType:
sub r0, #0x30
ldrb r1, [r0]
cmp r1, #0x1A /*Index number of levitate*/
beq BuffTarget
ldrb r1, [r0, #1]
cmp r1, #2 /*Flying type*/
beq BuffTarget
ldrb r1, [r0, #2]
bne Return
BuffTarget:
ldr r0, BankTarget
ldrb r0, [r0]
ldr r2, StatutFlags
mov r1, #4
mul r0, r1
add r0, r2
ldr r1, [r0]
ldr r2, ArrowStatut
add r1, r2
str r1, [r0]
cmp r3, #0
bne DisplayString
pop {pc}
KnockFly:
sub r2, #0x40
str r2, [r1]
ldr r0, BankTarget
ldrb r0, [r0]
mov r1, #0x58
mul r0, r1
ldr r2, BattleData
add r0, r2
ldr r3, [r0]
ldr r2, MultiAttack
sub r3, r2
str r3, [r0]
mov r3, #1
b CheckType
DisplayString:
ldr r0, CurrentBS
ldr r1, ArrowScript
str r1, [r0]
Return:
pop {pc}
.align 2
BattleData: .word 0x020240D4
BankTarget: .word 0x0202420C
StatutFlags: .word 0x020242AC
SubStat: .word 0x1000000
MultiAttack: .word 0x1000
CurrentBS: .word 0x02024214
ArrowStatut: .word 0x800000
ArrowScript: .word 0x08KKKKKK
#org 0xUUUUUU
attackcanceler
callasm 0x8PPPPPP+1
accuracycheck 0x82D8A5E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchancetarget
faintpokemon 0x0 0x0 0x8000000
setbyte 0x2024488 0x0
cmd49 0x0 0x0
end
.thumb
push {lr}
cmp r3, #1
bne ChecktheFlags
ldr r0, CurrentMove
ldrh r1, [r0]
ldr r2, ThousandIndex
cmp r1, r2
bne ChecktheFlags
Pos:
mov r3, #1
Return:
pop {pc}
ChecktheFlags:
ldr r0, Flags
ldr r1, Bank
ldrb r1, [r1]
mov r2, #4
mul r1, r2
add r1, r0
ldr r2, [r1]
ldr r1, ArrowStatut
and r1, r2
cmp r1, #0
bne Pos
mov r3, #0
b Return
.align 2
CurrentMove: .word 0x020241EA
ThousandIndex: .word [B]0x266[/B]
Flags: .word 0x020242AC
ArrowStatut: .word 0x800000
Bank: .word 0x0202420C
.thumb
push {r0-r3}
mov r3, #1
ldr r0, blflag
bl Jump
cmp r3, #1
bne Classic
pop {r0-r3}
ldr r1, Touched
Back:
mov pc, r1
Classic:
pop {r0-r3}
mov r0, #0x58
mul r0, r1
add r0, r0, r5
add r0, #0x20
ldr r1, Untouched
b Back
Jump:
mov pc, r0
.align 2
blflag: .word 0x08ZZZZZZ+1
Touched: .word 0x08047128+1
Untouched: .word 0x080470BC+1
/* 00 48 00 47 xx+1 xx xx 08 at 080470B4*/
.thumb
push {r0-r3}
mov r3, #1
ldr r0, blflag
bl Jump
cmp r3, #1
bne Classic
pop {r0-r3}
ldr r1, Touched
Back:
mov pc, r1
Classic:
pop {r0-r3}
ldrb r1, [r3]
mov r0, #0x58
mul r0, r1
add r0, r0, r2
ldr r1, Untouched
b Back
Jump:
mov pc, r0
.align 2
blflag: .word 0x08ZZZZZZ+1
Touched: .word 0x0804733C+1
Untouched: .word 0x08047304+1
/* 00 48 00 47 xx+1 xx xx 08 at 080472FC*/
.thumb
push {r0-r3}
mov r3, #1
ldr r0, blflag
bl Jump
cmp r3, #1
bne Classic
pop {r0-r3}
ldr r1, Touched
Back:
mov pc, r1
Classic:
pop {r0-r3}
mov r0, #0x58
mov r2, r9
mul r2, r0
mov r0, r2
ldr r1, Untouched
b Back
Jump:
mov pc, r0
.align 2
blflag: .word 0x08ZZZZZZ+1
Touched: .word 0x08047690+1
Untouched: .word 0x08047664+1
/* 00 48 00 47 xx+1 xx xx 08 at 0804765C*/
#dynamic 0x9C0B20
#freespacebyte 0xFF
#org @start
attackcanceler
accuracycheck 0x82D8A5E 0x0
attackstring
ppreduce
calculatedamage
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
faintpokemon 0x0 0x0 0x9C0B200
callasm 0x8AAAAAA + 1
.text
.align 2
.thumb
.thumb_func
Main:
ldr r1, .BattleData
ldr r0, .UserBank
ldrb r0, [r0]
mov r2, #0x58
mul r2, r0
add r1, #0x1a
add r1, r2
ldrb r0, [r1]
ldrb r2, [r1, #0x3]
mov r3, #0x0
cmp r0, r3
beq DefIsZero
cmp r2, r3
beq SpDefIsZero
ldr r4, .LowerBothBS
b End
DefIsZero:
cmp r2, r3
beq BothBS
ldr r4, .LowerSpDefBS
b End
SpDefIsZero:
ldr r4, .LowerDefBS
b End
BothBS:
ldr r4, .EndBS
End:
ldr r5, .ActiveBSPointer
str r4, [r5, #0x0]
bx lr
.align 2
.align 2
.BattleData: .word 0x02024084
.UserBank: .word 0x0202420B
.ActiveBSPointer: .word 0x02024214
.LowerSpDefBS: .word 0x08BBBBBB
.LowerDefBS: .word 0x08CCCCCC
.LowerBothBS: .word 0x08DDDDDD
.EndBS: .word 0x082D8A4E
#dynamic 0x9C0B20
#freespacebyte 0xFF
#org @start
setbyte 0x202448F 0x0
playstatchangeanimation 0x1 0x4 0x1
setbyte 0x202448E 0x92
statbuffchange 0x80 true @end
jumpifbyte 0x0 statchange 0x2 @end
printfromtable 0x85CC8A8
waitmessage 0x40
#org @end
goto 0x82D8A4E
#dynamic 0x9C0B20
#freespacebyte 0xFF
#org @start
setbyte 0x202448F 0x0
playstatchangeanimation 0x1 0x20 0x1
setbyte 0x202448E 0x95
statbuffchange 0x80 true @end
jumpifbyte 0x0 statchange 0x2 @end
printfromtable 0x85CC8A8
waitmessage 0x40
#org @end
goto 0x82D8A4E
#dynamic 0x9C0B20
#freespacebyte 0xFF
#org @start
setbyte 0x202448F 0x0
playstatchangeanimation 0x1 0x24 0x1
setbyte 0x202448E 0x92
statbuffchange 0x80 true @end
jumpifbyte 0x0 statchange 0x2 @end
printfromtable 0x85CC8A8
waitmessage 0x40
setbyte 0x202448E 0x95
statbuffchange 0x80 true @end
jumpifbyte 0x0 statchange 0x2 @end
printfromtable 0x85CC8A8
waitmessage 0x40
#org @end
goto 0x82D8A4E
#dynamic 0x9C0B20
#freespacebyte 0xFF
#org @pickmove
jumpifhalfword 0x0 0x20241EA [B]0x1D4[/B] @honeclaws
goto 0x2D8C7A
#org @honeclaws
attackcanceler
attackstring
ppreduce
jumpifstat BANK_USER 0x3 0x1 0xC @attack
jumpifstat BANK_USER B_= 0x6 0xC 0x82DA71D
#org @attack
attackanimation
waitanimation
setbyte 0x202448F 0x0
playstatchangeanimation 0x0 0x42 0x0
setbyte 0x202448E 0x11
statbuffchange 0x1 true @accuracy
jumpifbyte 0x0 0x2024337 0x2 @accuracy
printfromtable 0x85CC89C
waitmessage 0x40
#org @accuracy
setbyte 0x202448E 0x16
statbuffchange 0x1 true 0x82DA718
jumpifbyte 0x0 0x2024337 0x2 0x82DA718
printfromtable 0x85CC89C
waitmessage 0x40
goto 0x2D8A4E
#dynamic 0x9C0B20
#freespacebyte 0xFF
#org @pickmove
jumpifhalfword 0x0 0x20241EA [B]0x1E8[/B] @speedboost
goto 0x82D9392
#org @speedboost
setbyte 0x2024335 0xD1
goto 0x82D8A00
#dynamic 0x9C0B20
#freespacebyte 0xFF
#org @pickmove
jumpifhalfword 0x0 0x20241EA[B] 0x1E9[/B] @coil
goto 0x2DA655
#org @coil
attackcanceler
attackstring
ppreduce
jumpifstat BANK_USER 0x3 0x1 0xC @attack
jumpifstat BANK_USER 0x3 0x2 0xC @attack
jumpifstat BANK_USER B_= 0x6 0xC 0x82DA71D
#org @attack
attackanimation
waitanimation
setbyte 0x202448F 0x0
playstatchangeanimation 0x0 0x46 0x0
setbyte 0x202448E 0x11
statbuffchange 0x1 true @defense
jumpifbyte 0x0 0x2024337 0x2 @defense
printfromtable 0x85CC89C
waitmessage 0x40
#org @defense
setbyte 0x202448E 0x12
statbuffchange 0x1 true @accuracy
jumpifbyte 0x0 0x2024337 0x2 @accuracy
printfromtable 0x85CC89C
waitmessage 0x40
#org @accuracy
setbyte 0x202448E 0x16
statbuffchange 0x1 true 0x82DA718
jumpifbyte 0x0 0x2024337 0x2 0x82DA718
printfromtable 0x85CC89C
waitmessage 0x40
goto 0x2D8A4E
#dynamic 0x9C0B20
#freespacebyte 0xFF
#org @pickmove
jumpifhalfword 0x0 0x20241EA [B]0x1FC[/B] @shiftgear
jumpifhalfword 0x0 0x20241EA [B]0x1F8[/B] @shellsmash
goto 0x2DA655
#org @shiftgear
attackcanceler
attackstring
ppreduce
jumpifstat BANK_USER 0x3 0x1 0xC @attack
jumpifstat BANK_USER B_= 0x3 0xC 0x82DA71D
#org @attack
attackanimation
waitanimation
setbyte 0x202448F 0x0
playstatchangeanimation 0x0 0xA 0x0
setbyte 0x202448E 0x11
statbuffchange 0x1 true @speed
jumpifbyte 0x0 0x2024337 0x2 @speed
printfromtable 0x85CC89C
waitmessage 0x40
#org @speed
setbyte 0x202448E 0x23
statbuffchange 0x1 true 0x82DA718
jumpifbyte 0x0 0x2024337 0x2 0x82DA718
printfromtable 0x85CC89C
waitmessage 0x40
goto 0x2D8A4E
#org @shellsmash
attackcanceler
attackstring
ppreduce
jumpifstat BANK_USER 0x2 0x2 0x0 @dropdefense
jumpifstat BANK_USER B_= 0x5 0x0 @boost
#org @dropdefense
attackanimation
waitanimation
setbyte 0x202448F 0x0
playstatchangeanimation 0x1 0x24 0x9
setbyte 0x202448E 0x92
statbuffchange 0x81 true @dropspdefense
jumpifbyte 0x0 0x2024337 0x2 @dropspdefense
printfromtable 0x85CC89C
waitmessage 0x40
#org @dropspdefense
setbyte 0x202448E 0x95
statbuffchange 0x81 true @boost
jumpifbyte 0x0 0x2024337 0x2 @boost
printfromtable 0x85CC89C
waitmessage 0x40
#org @boost
jumpifstat BANK_USER 0x3 0x1 0xC @sharpattack
jumpifstat BANK_USER 0x3 0x4 0xC @sharpattack
jumpifstat BANK_USER B_= 0x3 0xC 0x82DA71D
#org @sharpattack
setbyte 0x202448F 0x0
playstatchangeanimation 0x0 0x1A 0x0
setbyte 0x202448E 0x21
statbuffchange 0x1 true @sharpspattack
jumpifbyte 0x0 0x2024337 0x2 @sharpspattack
printfromtable 0x85CC89C
waitmessage 0x40
#org @sharpspattack
setbyte 0x202448E 0x24
statbuffchange 0x1 true @sharpspeed
jumpifbyte 0x0 0x2024337 0x2 @sharpspeed
printfromtable 0x85CC89C
waitmessage 0x40
#org @sharpspeed
setbyte 0x202448E 0x23
statbuffchange 0x1 true 0x82DA718
jumpifbyte 0x0 0x2024337 0x2 0x82DA718
printfromtable 0x85CC89C
waitmessage 0x40
goto 0x2D8A4E
#include abilities.bsh
#dynamic 0x9C0B20
#freespacebyte 0xFF
#org @pickmove
jumpifhalfword 0x0 0x20241EA 0x4A @growth
jumpifhalfword 0x0 0x20241EA 0x20E @workup
jumpifhalfword 0x0 0x20241EA 0x233 @rototiller
goto 0x1D6B8D
#org @growth
jumpifabilitypresent ABILITY_CLOUDNINE @workup
jumpifabilitypresent ABILITY_AIRLOCK @workup
jumpifabilitypresent ABILITY_DELTASTREAM @workup
jumpifhalfword B_& 0x20243CC 0x60 @sunlight
goto @workup
#org @sunlight
attackcanceler
attackstring
ppreduce
jumpifstat BANK_USER 0x3 0x1 0xC @attack2
jumpifstat BANK_USER B_= 0x4 0xC 0x82DA71D
#org @attack2
attackanimation
waitanimation
setbyte 0x202448F 0x0
playstatchangeanimation 0x0 0x12 0x0
setbyte 0x202448E 0x21
statbuffchange 0x1 true @spatk2
jumpifbyte 0x0 0x2024337 0x2 @spatk2
printfromtable 0x85CC89C
waitmessage 0x40
#org @spatk2
setbyte 0x202448E 0x24
statbuffchange 0x1 true 0x82DA718
jumpifbyte 0x0 0x2024337 0x2 0x82DA718
printfromtable 0x85CC89C
waitmessage 0x40
goto 0x2D8A4E
#org @workup
attackcanceler
attackstring
ppreduce
jumpifstat BANK_USER 0x3 0x1 0xC @attack
jumpifstat BANK_USER B_= 0x4 0xC 0x82DA71D
#org @attack
attackanimation
waitanimation
setbyte 0x202448F 0x0
playstatchangeanimation 0x0 0x12 0x0
setbyte 0x202448E 0x11
statbuffchange 0x1 true @spatk
jumpifbyte 0x0 0x2024337 0x2 @spatk
printfromtable 0x85CC89C
waitmessage 0x40
#org @spatk
setbyte 0x202448E 0x14
statbuffchange 0x1 true 0x82DA718
jumpifbyte 0x0 0x2024337 0x2 0x82DA718
printfromtable 0x85CC89C
waitmessage 0x40
goto 0x2D8A4E
#org @rototiller
setbyte 0x2024200 0x0
attackcanceler
attackstring
ppreduce
cmd25
jumpiftype 0x1 0xC @selfgrass
goto @call
#org @selfgrass
jumpifsecondarystatus 0x1 0x1000000 @next
jumpifstat 0x1 B_>= 0x1 0xC @next
jumpifstat 0x1 B_>= 0x4 0xC @next
jumpifbyte B_= 0x2024200 0x1 @selfnoanimation
attackanimation
waitanimation
setbyte 0x2024200 0x1
#org @selfnoanimation
cmd47
playstatchangeanimation 0x1 0x12 0x0
setbyte 0x202448E 0x11
statbuffchange 0x80 true @selfnoanimation2
jumpifbyte B_>= 0x2024337 0x2 @selfnoanimation2
printfromtable 0x85CC89C
waitmessage 0x40
#org @selfnoanimation2
setbyte 0x202448E 0x14
statbuffchange 0x80 true @next
jumpifbyte B_>= 0x2024337 0x2 @next
printfromtable 0x85CC89C
waitmessage 0x40
#org @next
cmd25
#org @call
jumpifarrayequal 0x202420B 0x202420C 0x1 @next
call @target
setbyte 0x2024488 0x0
cmd49 0x2 0x10
jumpwhiletargetvalid @next
jumpifbyte B_= 0x2024200 0x0 @nobuffs
end
#org @target
jumpiftype 0x0 0xC @grass
goto @return
#org @grass
jumpifsecondarystatus 0x0 0x1000000 @return
jumpifstat 0x0 B_>= 0x1 0xC @return
jumpifstat 0x0 B_>= 0x4 0xC @return
jumpifbyte B_= 0x02024200 0x1 @noanimation
attackanimation
waitanimation
setbyte 0x02024200 0x1
#org @noanimation
cmd47
playstatchangeanimation 0x0 0x12 0x0
setbyte 0x202448E 0x11
statbuffchange 0x0 false @noanimation2
jumpifbyte B_>= 0x2024337 0x2 @noanimation2
printfromtable 0x85CC89C
waitmessage 0x40
#org @noanimation2
setbyte 0x202448E 0x14
statbuffchange 0x0 false @return
jumpifbyte B_>= 0x2024337 0x2 @return
printfromtable 0x85CC89C
waitmessage 0x40
#org @return
return
#org @nobuffs
pause 0x20
orbyte 0x202427C 0x20
resultmessage
waitmessage 0x40
end
I've translated this to Emerald and it's almost working.
I copied your ASM and used the following offsets:
Userbank 0202420B
Targetbank 0202420C
BattleStruct 02024084
TurnOrder 0202407E
MonsMoved 02024082
MovesUsed 02024274
CurrentScript 02024214
FailScript 82D9F15
CurrentAttack 020241EA
MoveTable: Using my own, triple checked and it's correct
BasePower 02024400
EffectTable: 82D86A8 (Using original one)
Copy pasted you script and added +1 on each ASM. Changed Setbytes to 0x202448C and 0x202448D.
Everything seems to be correct, Me First correctly fails if the opponent uses a status move and it copies the attack of the opponent, but it can't perform the move effect. When I tried copying Mega Drain for example the move just fails, when I copy Tackle the game throws a Pokeball (similar glitch that happens when a move effect is wrong). Is there something wrong with the Move Effect Table offset or some slip-up in the ASM? Did anyone use Chaos Rush's code in Fire Red and get it to work?
#dynamic 0x800000
#freespacebyte 0xFF
#org @Effect11
setbyte 0x202448E 0x12
jumpifhalfword B_= 0x20241EA 0x243 @FlowerShield
goto 0x2D8CA1
#org @FlowerShield
setbyte 0x02024200 0x0
attackcanceler
attackstring
ppreduce
cmd25
jumpiftype 0x1 0xC @SelfGrass
goto @Call
#org @SelfGrass
jumpifsecondarystatus 0x1 0x1000000 @NextTarget
jumpifstat 0x1 B_>= 0x2 0xC @NextTarget
jumpifbyte B_= 0x02024200 0x1 @SelfNoAnimation
attackanimation
waitanimation
setbyte 0x02024200 0x1
goto @SelfNoAnimation
#org @SelfNoAnimation
cmd47
playstatchangeanimation 0x1 0x4 0x0
statbuffchange 0x80 true @NextTarget
jumpifbyte B_>= 0x2024337 0x2 @NextTarget
printfromtable 0x85CC89C
waitmessage 0x40
#org @NextTarget
cmd25
#org @Call
jumpifarrayequal 0x202420B 0x202420C 0x1 @NextTarget
call @TargetBuff
setbyte 0x2024488 0x0
cmd49 0x2 0x10
jumpwhiletargetvalid @NextTarget
jumpifbyte B_= 0x02024200 0x0 @NoBuffs
end
#org @TargetBuff
jumpiftype 0x0 0xC @Grass
goto @Return
#org @Grass
jumpifsecondarystatus 0x0 0x1000000 @Return
jumpifstat 0x0 B_>= 0x2 0xC @Return
jumpifbyte B_= 0x02024200 0x1 @NoAnimation
attackanimation
waitanimation
setbyte 0x02024200 0x1
goto @NoAnimation
#org @NoAnimation
cmd47
playstatchangeanimation 0x0 0x4 0x0
statbuffchange 0x0 false @Return
jumpifbyte B_>= 0x2024337 0x2 @Return
printfromtable 0x85CC89C
waitmessage 0x40
#org @Return
return
#org @NoBuffs
pause 0x20
orbyte 0x202427C 0x20
resultmessage
waitmessage 0x40
end
#dynamic 0x800000
#freespacebyte 0xFF
#org @pickmove
jumpifhalfword 0x0 0x20241EA 0x21A @cottonguard
goto 0x2D921D
#org @cottonguard
jumpifstat BANK_USER B_>= 0x2 0xA 0x2D921D
jumpifstat BANK_USER B_>= 0x2 0xB 0x2D8C85
attackcanceler
attackstring
ppreduce
setbyte 0x202448E 0x22
statbuffchange 0x1 true 0x82D8CCF
jumpifbyte 0x0 0x2023E87 0x2 0x82D8CC7
#org @singleboost
attackanimation
waitanimation
cmd47
playanimation BANK_USER 0x1 0x2024484
setbyte 0x202448E 0x12
statbuffchange 0x1 true 0x82D8CCF
jumpifbyte 0x0 0x2024337 0x2 0x82D8CCF
#org @end
setword 0x203E320 0x8CCCCCC
printstring 0x184
waitmessage DELAY_1SECOND
goto 0x82D8A4E
FD 0F B4 E7 00 BE D9 DA D9 E2 E7 D9 FE D8 E6 D5 E7 E8 DD D7 D5 E0 E0 ED 00 E6 E3 E7 D9 AB
#dynamic 0x800000
#freespacebyte 0xFF
#org @pickmove
jumpifhalfword 0x0 0x20241EA 0x126 @tailglow
goto 0x1D7119
#org @tailglow
jumpifstat BANK_USER B_>= 0x4 0xA 0x2D9233
jumpifstat BANK_USER B_>= 0x4 0xB 0x2D8C90
attackcanceler
attackstring
ppreduce
setbyte 0x202448E 0x24
statbuffchange 0x1 true 0x82D8CCF
jumpifbyte 0x0 0x2024337 0x2 0x82D8CC7
#org @singleboost
attackanimation
waitanimation
cmd47
playanimation BANK_USER 0x1 0x2024484
setbyte 0x2023FDE 0x14
statbuffchange 0x1 true 0x82D8CCF
jumpifbyte 0x0 0x2023E87 0x2 0x82D8CC7
#org @end
setword 0x203E320 0x8DDDDDD
printstring 0x184
waitmessage DELAY_1SECOND
goto 0x82D8A4E
FD 0F B4 E7 00 CD E4 AD 00 BB E8 DF FE D8 E6 D5 E7 E8 DD D7 D5 E0 E0 ED 00 E6 E3 E7 D9 AB
#dynamic 0x800000
#freespacebyte 0xFF
#org @charge
attackcanceler
attackstring
ppreduce
setcharge
attackanimation
waitanimation
printstring 0xA5
waitmessage DELAY_1SECOND
#org @spdefboost
setbyte 0x202448E 0x15
statbuffchange 0x1 true 0x82D8CCF
jumpifbyte B_!= 0x2023E87 0x2 0x82D8CCF
goto 0x82D8CBF
#dynamic 0x800000
#freespacebyte 0xFF
#org @start
callasm 0x8AABBCC +1
.text
.align 2
.thumb
.thumb_func
Main:
ldr r1, .PhysDamage
ldr r0, .TargetBank
ldrb r0, [r0]
mov r2, #0x10
mul r2, r0
add r1, r2
ldrb r0, [r1]
ldrb r2, [r1, #0x2]
mov r3, #0x0
cmp r0, r3
bne DoubleDamage
cmp r2, r3
bne DoubleDamage
b End
DoubleDamage:
ldr r3, .DamageMultiplier
mov r0, #0x2
strb r0, [r3, #0x0]
End:
ldr r4, .ReturnBS
ldr r5, .ActiveBSPointer
str r4, [r5, #0x0]
bx lr
.align 2
.PhysDamage: .word 0x02024340
.TargetBank: .word 0x0202420C
.ActiveBSPointer: .word 0x02024214
.DamageMultiplier: .word 0x02024482
.ReturnBS: .word 0x082D8A26
.text
.align 2
.thumb
.thumb_func
.global crushgrip
main:
push {lr}
ldr r0, targetBank
ldrb r0, [r0]
ldr r1, battleData
mov r2, #0x58
mul r0, r2
add r3, r0, r1
ldrh r0, [r3, #0x28]
mov r2, #0x78
mul r0, r2
ldrh r1, [r3, #0x2c]
bl divide
mov r1, #0x1
add r1, r0
ldr r2, basePower
strb r1, [r2]
pop {r0}
bx r0
divide:
ldr r2, divider
bx r2
.align 2
targetBank: .word 0x0202420C
battleData: .word 0x02024084
divider: .word 0x082E7541
basePower: .word 0x02024400
#org @main
attackcanceler
attackstring
ppreduce
callasm 0x8DDDDDD+1
attackanimation
waitanimation
setword 0x203E320 0x8CCCCCC
printstring 0x184
waitmessage 0x40
goto 0x82D8A4E
.text
.align 2
.thumb
.thumb_func
.global topsyturvy
main:
push {lr}
ldr r0, targetBank
ldrb r0, [r0]
ldr r1, battleData
mov r2, #0x58
mul r0, r2
add r2, r0, r1
add r2, #0x19
mov r0, #0x0
mov r1, #0x6
loop:
add r3, r2, r0
ldrb r4, [r3]
cmp r4, #0x6
beq loopend
cmp r4, #0x6
bgt greater
sub r5, r1, r4
lsl r5, #0x1
add r4, r5
strb r4, [r3]
b loopend
greater:
sub r5, r4, #0x6
lsl r5, #0x1
sub r4, r5
strb r4, [r3]
loopend:
add r0, #0x1
cmp r0, #0x7
blt loop
pop {r0}
bx r0
.align 2
targetBank: .word 0x0202420C
battleData: .word 0x02024084
FD 10 B4 E7 00 E7 E8 D5 E8 E7 00 D7 DC D5 E2 DB D9 E7 00 EB D9 E6 D9 FE E6 D9 EA D9 E6 E7 D9 D8 AB FF
#org @main
attackcanceler
accuracycheck 0x82D8A5E 0x0
attackstring
ppreduce
cmd6
bicbyte 0x202426C 0x6
callasm 0x08AAAAAA+1
cmd69
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
faintpokemon 0x0 0x0 0x8000000
jumpifbyte 0x0 0x202426C 0x8 0x82D8A4E
setuserhptozero
graphicalhpupdate 0x1
datahpupdate 0x1
faintpokemon 0x1 0x0 0x8000000
goto 0x82D8A4E
.text
.align 2
.thumb
.thumb_func
.global finalgambit
main:
push {lr}
ldr r0, userBank
ldrb r0, [r0]
ldr r1, battleData
mov r2, #0x58
mul r0, r2
add r2, r0, r1
add r2, #0x28
ldrb r0, [r2]
ldr r2, damage
strb r0, [r2]
pop {r0}
bx r0
.align 2
userBank: .word 0x0202420B
battleData: .word 0x02024084
damage: .word 0x020241F0