Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .thumb
- @08257510 is the asm
- @089063FB is the pointer to it
- @0x10 = 00010000 = stealth rocks
- @0x04-8 = 00001100 = toxic spikes
- @0x01-3 = 00000011 = spikes but we already knew that
- .equ rom, 0x08000000
- .equ Fighting, 0x1
- .equ Flying, 0x2
- .equ Poison, 0x3
- .equ Steel, 0x8
- .equ Spikes, 0xBF
- .equ Toxic_Spikes, 0x1D5
- .equ Stealth_Rock, 0x1D4
- .equ Sticky_Web, 0x1E1
- .equ Immunity, 0x11
- .equ Levitate, 0x1A
- .equ Skill_Link, 0x5D
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- .org 0x257510
- toxic_spikes_something:
- mov r0, #0
- bl 0x016E24 @get side of something
- mov r4, r0
- bl 0x0751C4 @battle side get owner
- ldr r1, timers
- mov r2, #0xC @size_of(timers)
- mul r0, r2
- add r0, r1 @the timer struct is in r0
- mov r5, r0
- ldrb r0, [r0, #0xA] @spike counter
- mov r3, #0xC @toxic spikes bits
- and r0, r3
- lsr r0, #2 @1100 -> 0011 or 0011 -> 0000
- ldr r1, movescr_cursor
- cmp r0, #0
- beq loc_257570
- mov r6, r0 @r4 is battle side something, r5 is timer struct, r6 is the timer value
- ldr r0, battle_struct
- mov r1, #0x58 @size_of(battle_struct)
- mul r1, r4
- add r0, r1
- add r0, #0x20 @ability of something, i assume the defender
- mov r7, r0
- ldrb r1, [r7] @ability into r1
- cmp r1, #Levitate
- beq loc_257570
- cmp r1, #Immunity
- beq loc_257570
- ldrb r1, [r7, #1]
- ldrb r1, [r7, #2]
- cmp r0, #Flying
- beq loc_257570
- cmp r1, #Flying
- beq loc_257570
- cmp r0, #Poison
- beq loc_257588
- cmp r1, #Poison
- beq loc_257588
- cmp r0, #Steel
- beq loc_257570
- cmp r1, #Steel
- beq loc_257570
- cmp r6, #1
- beq loc_257578
- b loc_257580
- loc_257570:
- ldr r0, label_a
- ldr r1, movescr_cursor
- str r0, [r1]
- b loc_257598 @default?
- loc_257578:
- ldr r0, label_b
- ldr r1, movescr_cursor
- str r0, [r1]
- b loc_257598
- loc_257580:
- ldr r0, label_c
- ldr r1, movescr_cursor
- str r0, [r1]
- b loc_257598
- loc_257588:
- mov r0, r5
- ldrb r1, [r0, #0xA]
- mov r2, #0xF3 @11110011
- and r1, r2
- strb r1, [r0, #0xA]
- ldr r0, label_d
- ldr r1, movescr_cursor
- str r0, [r1]
- loc_275798:
- pop {r0}
- bx r0
- .align 2
- timers: .word 0x02023DE4
- movescr_cursor: .word 0x02023D74
- battle_struct: .word 0x02023BE4
- label_a: .word 0x082575C0
- label_b: .word 0x082575D0
- label_c: .word 0x082575F0
- label_d: .word 0x08257607
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- .org 0x2575C0
- label_a:
- .word 0xDDDDDDDD @wtf tbh
- .byte 0xDD, 0xF8
- .word 0x08257620 + 1
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- .org 0x08257620 @handles spikes and stealth rocks
- spikes_damage_maybe:
- push {lr}
- mov r0, #0
- bl 0x016E24 @get side of something
- ldr r4, battle_side_unknown
- strb r0, [r4]
- mov r4, r0
- bl 0x0751C4 @get side of owner
- ldr r1, timers0
- mov r2, #0xC
- mul r0, r2
- add r0, r1
- mov r5, r0 @r5 is timer struct
- ldrb r0, [r0, #0xA]
- mov r3, #3 @spike bits
- and r0, r3
- cmp r0, #0
- beq loc_257684
- mov r6, r0 @r6 is the spike bits
- ldr r0, battle_struct0
- mov r1, #0x58
- mul r1, r4
- add r0, r1
- add r0, #0x20
- mov r7, r0 @r7 is the battle_struct at ability
- ldrb r1, [r7]
- cmp r1, #Levitate
- beq loc_257684
- cmp r1, #Skill_Link
- beq loc_257684
- ldrb r0, [r7, #1]
- ldrb r1, [r7, #2]
- cmp r0, #Flying
- beq loc_257684
- cmp r1, #Flying
- beq loc_257684
- ldrh r0, [r7, #0xC] @hp i presume
- mov r1, #0xA
- mov r2, r6 @r2 is also the spike bits now
- add r2, r6
- sub r1, r2 @i have no fucking clue mate
- bl 0x1E4018 @divsi3
- .align 2
- battle_side_unknown: .word 0x02023FDB
- timers0: .word 0x02023DE4
- battle_struct0: .word 0x02023BE4
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- .org 0x257880
- spikes_battle_script:
- .byte 0x2A, 0 @jumpifhalwford
- .word 0x02023D4A
- .hword Toxic_Spikes
- .word 0x082578C0
- .byte 0x2A, 0
- .word 0x02023D4A
- .hword Stealth_Rock
- .word 0x082578E0
- .byte 0x2A, 0
- .word 0x02023D4A
- .hword Sticky_Web
- .word 0x08257900
- .byte 0x0 @attack canceler
- .byte 0xF8 @callasm
- .word 0x08257920 + 1 @sets spikes and whatnot
- .byte 0x2 @attackstring
- .byte 0x3 @ppreduce
- .byte 0x9 @attackanimation
- .byte 0xA @waitanimation
- .byte 0x10 @printstring
- .hword 0x0094
- .byte 0x12 @waitmessage
- .hword 0x0040
- .byte 0x28 @goto
- .word 0x081D694E @end
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- .org 0x9063FA
- damage_bs_i_think:
- .byte 0xF8 @callasm
- .word toxic_spikes_something + rom + 1
- .byte 0x29, 1 @jumpifbyte
- .word 0x0203D8FE
- .byte 0
- .word 0x0890641F
- .byte 0xFF @idk why this happens tbh
- @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement