Set evade special effects based on Evade Type
Jump to navigation
Jump to search
Set Evade type data 000687e0: 27bdffd0 addiu r29,r29,0xffd0 - 0x20 000687e4: afb30024 sw r19,0x0024(r29) 000687e8: 00809821 addu r19,r4,r0 unit misc data 000687ec: afbf0028 sw r31,0x0028(r29) 000687f0: afb20020 sw r18,0x0020(r29) 000687f4: afb1001c sw r17,0x001c(r29) 000687f8: afb00018 sw r16,0x0018(r29) 000687fc: 9262018d lbu r2,0x018d(r19) load hit counter 00068800: 00a09021 addu r18,r5,r0 stack + 0x30 00068804: a64000a4 sh r0,0x00a4(r18) 00068808: a6420000 sh r2,0x0000(r18) store hit counter 0006880c: 92620004 lbu r2,0x0004(r19) load misc unit ID 00068810: 96430000 lhu r3,0x0000(r18) load hit counter + 1st target 00068814: a24200a6 sb r2,0x00a6(r18) store misc unit ID 00068818: 926201ab lbu r2,0x01ab(r19) load used weapon ID 0006881c: 10600038 beq r3,r0,0x00068900 branch if no targets hit? 00068820: a64200c6 sh r2,0x00c6(r18) store used weapon ID 00068824: 10600041 beq r3,r0,0x0006892c 00068828: 00008821 addu r17,r0,r0 0006882c: 02408021 addu r16,r18,r0 00068830: 02711021 addu r2,r19,r17 00068834: 9044018e lbu r4,0x018e(r2) load target ID from list 00068838: 0c01e9c9 jal 0x0007a724 Find Misc Unit Data Pointer 0006883c: 00000000 nop 00068840: a6000004 sh r0,0x0004(r16) store 0 on stack 00068844: 90430004 lbu r3,0x0004(r2) load misc unit ID 00068848: 00000000 nop 0006884c: a2030006 sb r3,0x0006(r16) 00068850: 8c420134 lw r2,0x0134(r2) 00068854: 00000000 nop 00068858: 9043018e lbu r3,0x018e(r2) load evade type 0006885c: 2444018c addiu r4,r2,0x018c 00068860: 2463ffff addiu r3,r3,0xffff 00068864: 2c62000d sltiu r2,r3,0x000d set if evade type is 01-0d (attack avoided?) 00068868: 10400010 beq r2,r0,0x000688ac branch if not 0006886c: 00031080 sll r2,r3,0x02 00068870: 3c018006 lui r1,0x8006 00068874: 00220821 addu r1,r1,r2 00068878: 8c227000 lw r2,0x7000(r1) load return address based on attack evasion 0006887c: 00000000 nop 00068880: 00400008 jr r2 00068884: 00000000 nop 00067000: 80068888 Guarded (accessory) 00067004: 80068888 right hand guard 00067008: 80068888 left hand guard 0006700c: 80068888 Arrow Guard? 00067010: 80068894 Nullified 00067014: 80068894 Miss 00067018: 80068894 Catch? 0006701c: 80068894 Cancelled by status (dead, petrify) 00067020: 800688ac Reflected? 00067024: 800688a0 golem 00067028: 80068894 Blade Grasp? 0006702c: 800688ac 00067030: 80068894 evade type = accessory, right/left hand, arrow guard: 00068888: 34020003 ori r2,r0,0x0003 hit glow? 0006888c: 0801a239 j 0x000688e4 00068890: a2020007 sb r2,0x0007(r16) evade type = nullified (element), missed, caught (throw), nullified (status) 00068894: 34020004 ori r2,r0,0x0004 hit glow? 00068898: 0801a239 j 0x000688e4 0006889c: a2020007 sb r2,0x0007(r16) evade type = golem 000688a0: 34020005 ori r2,r0,0x0005 Golem 000688a4: 0801a239 j 0x000688e4 000688a8: a2020007 sb r2,0x0007(r16) evade type = ? (related to stealing/breaking an item) 000688ac: 94820010 lhu r2,0x0010(r4) load special flags 000688b0: 00000000 nop 000688b4: 30420004 andi r2,r2,0x0004 000688b8: 10400003 beq r2,r0,0x000688c8 branch if not break item 000688bc: 34020006 ori r2,r0,0x0006 Break Item 000688c0: 0801a239 j 0x000688e4 000688c4: a2020007 sb r2,0x0007(r16) evade type = ? (steal/break still, but nothing is broken?) 000688c8: 90820001 lbu r2,0x0001(r4) load Critical hit flag 000688cc: 00000000 nop 000688d0: 10400003 beq r2,r0,0x000688e0 branch if not 000688d4: 34020001 ori r2,r0,0x0001 Critical Hit 000688d8: 0801a239 j 0x000688e4 000688dc: a2020007 sb r2,0x0007(r16) evade type = ? (steal/break, not break, not crit) 000688e0: a2000007 sb r0,0x0007(r16) clear 000688e4: 96420000 lhu r2,0x0000(r18) 000688e8: 26310001 addiu r17,r17,0x0001 000688ec: 0222102a slt r2,r17,r2 000688f0: 1440ffcf bne r2,r0,0x00068830 000688f4: 2610000a addiu r16,r16,0x000a 000688f8: 0801a24b j 0x0006892c 000688fc: 00000000 nop 00068900: 3c038009 lui r3,0x8009 00068904: 946361b4 lhu r3,0x61b4(r3) load X 00068908: 3c048009 lui r4,0x8009 0006890c: 948461b8 lhu r4,0x61b8(r4) load map level 00068910: 3c058009 lui r5,0x8009 00068914: 94a561bc lhu r5,0x61bc(r5) load Y 00068918: 34020001 ori r2,r0,0x0001 0006891c: a6420004 sh r2,0x0004(r18) 00068920: a6430006 sh r3,0x0006(r18) 00068924: a6440008 sh r4,0x0008(r18) 00068928: a645000a sh r5,0x000a(r18) 0006892c: 8fbf0028 lw r31,0x0028(r29) 00068930: 8fb30024 lw r19,0x0024(r29) 00068934: 8fb20020 lw r18,0x0020(r29) 00068938: 8fb1001c lw r17,0x001c(r29) 0006893c: 8fb00018 lw r16,0x0018(r29) 00068940: 27bd0030 addiu r29,r29,0x0030 00068944: 03e00008 jr r31 00068948: 00000000 nop
Return locations
Battle.bin 00068964: 0006894c - 000689a0 Set evade type data and weapon element effect 000689b4: 000689a4 - 00068a1c Set evade type data, item and throw stone hardcoding