BugMania

The Bug Master

Male
Seen November 4th, 2016
Posted July 30th, 2014
32 posts
6 Years
Here is the "Flame Burst":
Spoiler:

______________________
#dynamic 0xXXXXXXXX
#freespacebyte 0xFF

#include moves.bsh

#org @start
jumpifhalfword 0x1 0x2023D4A 0x39 @demange
jumpifspecialstatusflag 0x0 0x40000 0x1 @demange
orword 0x2023DD0 0x40000
setbyte 0x2023FD2 0x2

#org @demange
attackcanceler
accuracycheck 0x81D695E 0x0
attackstring
ppreduce
critcalc
cmd5
cmd6
cmd7
attackanimation
waitanimation
missmessage
cmd5c 0x0
waitstate
graphicalhpupdate 0x0
datahpupdate 0x0
critmessage
waitmessage 0x40
resultmessage
waitmessage 0x40
seteffectwithchancetarget
faintpokemon 0x0 0x0 0x8000000
setbyte 0x2023FD8 0x0
cmd49 0x0 0x0
setbyte 0x2023D50 0x0
setbyte 0x2FF7D20 0x1
attackcanceler
setbyte 0x2FF7D20 0x0
jumpifbyte 0x0 0x2023D50 0x0 @end
pause 0xA
jumpifability 0x0 0x12 @end
jumpifability 0x0 0x62 @end
graphicalhpupdate 0x0
datahpupdate 0x0
printstring 0x184
waitmessage 0x40
faintpokemon 0x0 0x0 0x8000000
setbyte 0x2023FD8 0x0
#org @end
end
_________________________________

But first, I must show how it is possible to apply a new effect in the system.

You may have noticed that I used a very sinister method at this code.
Well, go to a table in 0x8025011C
This table is responsible for commands like "attackcanceler"
Leave in the first Halfworld an offset other to a free memory space +1.
In the free space that you chose, you must pass this routine that i will show:
_________________________________
.align 2
.thumb

main:
PUSH {R1, R2}
LDR R1, =0x2FF7D20
LDRH R1, [R1]
LDR R2, =0xXXXXXX
MOV R0, #0x4
MUL R1, R0, R1
ADD R1, R2, R1
LDR R1, [R1]
ADD R0, R1, R0
POP {R2, R1}
BX R0


________________________________
That code can read one byte at 0x2FF7D20 (or any other offsets)
and sum a number in a table that must be in "0xXXXXXX".
""setbyte 0x2FF7D20 0x1
attackcanceler
setbyte 0x2FF7D20 0x0""
________________________________

This table must to have in your first Halfworld these bytes:
D7 61 01 08
If 0x2FF7D20 is 0x0, run to the "attackcanceler".

So do not forget to always leave the "setbyte 0x2FF7D20 0x0"
________________________________
type in table "XXXXXX", an offset to a new routine ... here:

.align 2
.thumb

main:
push {r1-r3}
ldr r1, =0x2023Bcc
ldr r1, [r1]
cmp r1, #0x2
beq end
ldr r1, =0x02023d6c
ldrb r1, [r1]
ldr r2, =0x02023d6c
cmp r1, #0x2
beq zero
cmp r1, #0x3
beq one
cmp r1, #0x0
beq two
cmp r1, #0x1
beq three
end:
pop {r1-r3}
PUSH {LR}
LDR R1, =0x2023D74
LDR R0, [R1]
ADD R0, #0x1
STR R0, [R1]
POP {R0}
BX R0

zero:
mov r1, #0x0
strb r1, [r2]
ldr r1, =0x2023C10
b divide
one:
mov r1, #0x1
strb r1, [r2]
ldr r1, =0x2023C68
b divide
two:
mov r1, #0x2
strb r1, [r2]
ldr r1, =0x2023CC0
b divide
three:
mov r1, #0x3
strb r1, [r2]
ldr r1, =0x2023D18
b divide
divide:
mov r3, #0x4
sub r3, r1, r3
ldrh r3, [r3]
cmp r3, #0x0
ldrh r1, [r1]
beq end
mov r3, #0x0
divid2: add r3, #0x1
mov r2, #0x10
mul r2, r3, r2
cmp r2, r1
blo divid2
cmp r3, #0x1
beq end2
sub r3, #0x1
end2: ldr r1, =0x02023D50
strh r3, [r1]
b end
_______________________________________

this will make possible the "FlameBurstCalculationDemageCommand"!!
I apologize if anyone has been trying to use this code and could not until today ^_^:
Spoiler:

PUSH {R1, R2}
LDR R1, =0x2FF7D20
LDRH R1, [R1]
LDR R2, =0xXXXXXX
MOV R0, #0x4
MUL R1, R0, R1
ADD R1, R2, R1
LDR R1, [R1]
ADD R0, R1, R0
POP {R2, R1}
BX R0

I noticed that there was a mistake in the table counter ...
here is the fixed routine:
Spoiler:

PUSH {R1-R2}
LDR R1, =0x02FF7D20
LDRH R1, [R1]
LDR R2, =0x08770FC0
MOV R0, #0x4
MUL R1, R0, R1
ADD R1, R2, R1
LDR R1, [R1]
MOV R0, R1
POP {R1-R2}
BX R0

Now we can use this to create assembly routines for use in the BSP!
Even the smallest of beings can achieve the greatest of obstacles!
Click in the spoiler, if you dare!
Spoiler:


L
et's dream bigger than our bodies can endure!
G
et to the extreme!

See my works here