Difference between revisions of "Equipment Evasion Setting (Physical)"
Jump to navigation
Jump to search
m |
|||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | === Equipment Evasion Setting (Physical)=== | |
− | + | No Parameters, returns nothing | |
− | + | ||
− | + | Nullify Current Ability Evasion (0x801938de to 0x801938e1), Set Ability base hit to 100 (0x801938dc) | |
− | + | Store Unit Class Evasion if 0x801938e1 | |
− | + | Exit Routine if Unit is a monster | |
− | + | If not a monster store Accessory, Right Hand and Left Hand Evasion in 0x801938de, 0x801938df and 0x801938e0 | |
− | + | Might Store Weapon Evasion if Unit uses Weapon Guard (and is able to act/react) | |
− | + | -------------------------------------------------------------------------------------------------------------------- | |
− | + | 00184f9c: 3c048019 lui r4,0x8019 | | |
− | + | 00184fa0: 8c842d98 lw r4,0x2d98(r4) |{{f/adr|<nowiki>r4 = Target data pointer</nowiki>}} | |
− | + | 00184fa4: 27bdffe8 addiu r29,r29,-0x0018 | | |
− | + | 00184fa8: afbf0010 sw r31,0x0010(r29) | | |
− | + | 00184fac: 9082008e lbu r2,0x008e(r4) |{{f/load|<nowiki>r2 = Target 4th set of Reactions Ablity</nowiki>}} [[Data/Table_Locations#Reactions|Data/Table]] | |
− | + | 00184fb0: 00000000 nop | | |
− | + | 00184fb4: 30420040 andi r2,r2,0x0040 |{{f/std|<nowiki>r2 = 0x40 if Target uses Weapon Guard</nowiki>}} | |
− | + | 00184fb8: 10400004 beq r2,r0,0x00184fcc {{f/Cond|If Target uses Weapon Guard}} | |
− | + | 00184fbc: 00003821 addu r7,r0,r0 |{{f/std|<nowiki>r7 = 0x00</nowiki>}} | |
− | + | 00184fc0: 0c0604c3 jal 0x0018130c |{{f/jal|Weapon_Guard_Usability |Weapon_Guard_Usability }} Returns r2 = 0x00 if Target can act/react - r2 = 0x01 if not | |
− | + | 00184fc4: 00000000 nop | | |
− | + | 00184fc8: 2c470001 sltiu r7,r2,0x0001 |{{f/std|<nowiki>r7 = 0x01 If Target can use Weapon Guard</nowiki>}} | |
− | + | 00184fcc: 3c048019 lui r4,0x8019 |{{f/std|}} | |
− | + | 00184fd0: 8c842d98 lw r4,0x2d98(r4) |{{f/adr|<nowiki>r4 = Target data pointer</nowiki>}} | |
− | + | 00184fd4: 34020064 ori r2,r0,0x0064 |{{f/std|<nowiki>r2 = 0x64 (100)</nowiki>}} | |
− | + | 00184fd8: 3c018019 lui r1,0x8019 | | |
− | + | 00184fdc: a02238dc sb r2,0x38dc(r1) |{{f/store|Store 100 in current ability base Hit}} {{f/std| 0x801938dc}} | |
− | + | 00184fe0: 3c018019 lui r1,0x8019 | | |
− | + | 00184fe4: a02038de sb r0,0x38de(r1) |{{f/store|Nullify Current Ability Accessory Evasion}} {{f/std| 0x801938de}} | |
− | + | 00184fe8: 3c018019 lui r1,0x8019 | | |
− | + | 00184fec: a02038df sb r0,0x38df(r1) |{{f/store|Nullify Current Ability Right Hand Evasion}} {{f/std| 0x801938df}} | |
− | + | 00184ff0: 3c018019 lui r1,0x8019 | | |
− | + | 00184ff4: a02038e0 sb r0,0x38e0(r1) |{{f/store|Nullify Current Ability Left Hand Evasion}} {{f/std| 0x801838e0}} | |
− | + | 00184ff8: 90820043 lbu r2,0x0043(r4) |{{f/load|<nowiki>r2 = Target's Class Evade</nowiki>}} | |
− | + | 00184ffc: 3c018019 lui r1,0x8019 | | |
− | + | 00185000: a02238e1 sb r2,0x38e1(r1) |{{f/store|Store Target's Class evade in Current Ability Class Evade}} {{f/std| 0x801938e1}} | |
− | + | 00185004: 90820006 lbu r2,0x0006(r4) |{{f/load|<nowiki>r2 = Target's Gender</nowiki>}} | |
− | + | 00185008: 00000000 nop | | |
− | + | 0018500c: 30420020 andi r2,r2,0x0020 |{{f/std|<nowiki>r2 = 0x20 if Target is a Monster</nowiki>}} | |
− | + | 00185010: 14400068 bne r2,r0,0x001851b4 {{f/Cond|If Target is not a monster}} /If Target is a monster, branch to {{f/loc|END}} | |
− | + | 00185014: 00000000 nop | |
− | + | ||
− | + | {{f/loc|---Accessory section---}} | |
− | + | 00185018: 9082001c lbu r2,0x001c(r4) |{{f/load|<nowiki>r2 = Target's Accessory ID</nowiki>}} | |
− | + | 0018501c: 00000000 nop | | |
− | + | 00185020: 00021840 sll r3,r2,0x01 |{{f/std|<nowiki>r3 = Acc. ID * 2</nowiki>}} | |
− | + | 00185024: 00621821 addu r3,r3,r2 |{{f/std|<nowiki>r3 = Acc. ID * 3</nowiki>}} | |
− | + | 00185028: 00031880 sll r3,r3,0x02 |{{f/std|<nowiki>r3 = Acc. ID * 12 (Size of item data = Item offset in Item data Table)</nowiki>}} | |
− | + | 0018502c: 3c018006 lui r1,0x8006 | | |
− | + | 00185030: 00230821 addu r1,r1,r3 |{{f/std|<nowiki>r1 = 0x80060000 + Item Offset</nowiki>}} | |
− | + | 00185034: 90252ebb lbu r5,0x2ebb(r1) |{{f/load|<nowiki>r5 = Target's Accessory Type flag</nowiki>}} {{f/std| 0x80062eb8 + 0x03 + Accessory Offset}} | |
− | + | 00185038: 00000000 nop | | |
− | + | 0018503c: 30a20008 andi r2,r5,0x0008 |{{f/std|<nowiki>r2 = 0x08 if Target's Accessory Type is Accessory</nowiki>}} | |
− | + | 00185040: 1040000b beq r2,r0,0x00185070 {{f/Cond|If Target's Accessory is valid (second Table is Ok)}} /Else Skip Accessory Section | |
− | + | 00185044: 00000000 nop |{{f/std|}} | |
− | + | 00185048: 3c018006 lui r1,0x8006 |{{f/std|}} | |
− | + | 0018504c: 00230821 addu r1,r1,r3 |{{f/std|<nowiki>r1 = 0x80060000 + Item Offset</nowiki>}} | |
− | + | 00185050: 90222ebc lbu r2,0x2ebc(r1) |{{f/load|<nowiki>r2 = Target's Accessory Second Table ID</nowiki>}} {{f/std| 0x80062eb8 + 0x04 + Accessory Offset}} | |
− | + | 00185054: 00000000 nop | | |
− | + | 00185058: 00021040 sll r2,r2,0x01 |{{f/std|Acc. 2nd Table ID * 2 (Offset for secondary Table)}} | |
− | + | 0018505c: 3c018006 lui r1,0x8006 | | |
− | + | 00185060: 00220821 addu r1,r1,r2 |{{f/std|<nowiki>r1 = 0x80060000 + Acc. Offset</nowiki>}} | |
− | + | 00185064: 90223f58 lbu r2,0x3f58(r1) |{{f/load|<nowiki>r2 = Target's Acc. P-Ev</nowiki>}} {{f/std| 0x80063f58 + Acc. Offset}} | |
− | + | 00185068: 3c018019 lui r1,0x8019 | | |
− | + | 0018506c: a02238de sb r2,0x38de(r1) |{{f/store|Store Accessory's Evade in Current Ability Accessory Evasion}} {{f/std| 0x801938de}} | |
− | + | ||
− | + | {{f/loc|---Right Hand section---}} | |
− | + | 00185070: 9083001d lbu r3,0x001d(r4) |{{f/load|<nowiki>r3 = Target Right Hand Weapon</nowiki>}} | |
− | + | 00185074: 00000000 nop | | |
− | + | 00185078: 00031040 sll r2,r3,0x01 |{{f/std|<nowiki>r2 = Right Hand Weapon ID * 2</nowiki>}} | |
− | + | 0018507c: 00431021 addu r2,r2,r3 |{{f/std|<nowiki>r2 = Right Hand Weapon ID * 3</nowiki>}} | |
− | + | 00185080: 00021080 sll r2,r2,0x02 |{{f/std|<nowiki>r2 = Right Hand Weapon ID * 12 (Size of Item data)</nowiki>}} | |
− | + | 00185084: 3c018006 lui r1,0x8006 | | |
− | + | 00185088: 00220821 addu r1,r1,r2 |{{f/std|<nowiki>r1 = 0x80060000 + Weapon Offset</nowiki>}} | |
− | + | 0018508c: 90252ebb lbu r5,0x2ebb(r1) |{{f/load|<nowiki>r5 = Right Hand Weapon Item type flag</nowiki>}} {{f/std| 0x80062eb8 + 0x03 + Weapon Offset}} | |
− | + | 00185090: 9083001e lbu r3,0x001e(r4) |{{f/load|<nowiki>r3 = Target's Right Hand Shield ID</nowiki>}} | |
− | + | 00185094: 3c018006 lui r1,0x8006 | | |
− | + | 00185098: 00220821 addu r1,r1,r2 |{{f/std|<nowiki>r1 = 0x80060000 + Weapon Offset</nowiki>}} | |
− | + | 0018509c: 90242ebc lbu r4,0x2ebc(r1) |{{f/load|<nowiki>r4 = Right Hand Weapon Second Table ID</nowiki>}} {{f/std| 0x80062eb8 + 0x04 + Weapon Offset}} | |
− | + | 001850a0: 00031040 sll r2,r3,0x01 |{{f/std|<nowiki>r2 = Right Hand Shield ID * 2</nowiki>}} | |
− | + | 001850a4: 00431021 addu r2,r2,r3 |{{f/std|<nowiki>r2 = Right Hand Shield ID * 3</nowiki>}} | |
− | + | 001850a8: 00021080 sll r2,r2,0x02 |{{f/std|<nowiki>r2 = Right Hand Shield ID * 12 (0x0c is the size of Item data)</nowiki>}} | |
− | + | 001850ac: 3c018006 lui r1,0x8006 | | |
− | + | 001850b0: 00220821 addu r1,r1,r2 |{{f/std|<nowiki>r1 = 0x80060000 + Shield Offset</nowiki>}} | |
− | + | 001850b4: 90232ebb lbu r3,0x2ebb(r1) |{{f/load|<nowiki>r3 = Right Hand Shield Equipment Type</nowiki>}} {{f/std| 0x80062eb8 + 0x03 + Shield Offset}} | |
− | + | 001850b8: 3c018006 lui r1,0x8006 | | |
− | + | 001850bc: 00220821 addu r1,r1,r2 |{{f/std|<nowiki>r1 = 0x80060000 + Shield Offset</nowiki>}} | |
− | + | 001850c0: 90262ebc lbu r6,0x2ebc(r1) |{{f/load|<nowiki>r6 = Right Hand Shield Second Table ID</nowiki>}} {{f/std| 0x80062eb8 + 0x04 + Shield Offset}} | |
− | + | 001850c4: 30a20080 andi r2,r5,0x0080 |{{f/std|<nowiki>r2 = 0x80 if Right Hand Weapon is a Weapon (Based on Type flag)</nowiki>}} | |
− | + | 001850c8: 10400008 beq r2,r0,0x001850ec {{f/Cond|If Target's Right Hand Weapon is a Weapon}} /Else Branch to Right Shield check | |
− | + | 001850cc: 00000000 nop | | |
− | + | 001850d0: 10e00006 beq r7,r0,0x001850ec {{f/Cond|If Target can uses Weapon Guard}} /Else Branch to Right Shield check | |
− | + | 001850d4: 000410c0 sll r2,r4,0x03 |{{f/std|<nowiki>r2 = Right Hand Weapon 2nd Table ID * 8 (Size of Weapon data in Weapon second table)</nowiki>}} | |
− | + | 001850d8: 3c018006 lui r1,0x8006 | | |
− | + | 001850dc: 00220821 addu r1,r1,r2 |{{f/std|<nowiki>r1 = 0x80060000 + Weapon Offset</nowiki>}} | |
− | + | 001850e0: 90223abd lbu r2,0x3abd(r1) |{{f/load|<nowiki>r2 = Right Hand Weapon Evade</nowiki>}} {{f/std| 0x80063ab8 + 0x05 + Weapon Offset}} | |
− | + | 001850e4: 08061441 j 0x00185104 {{f/jump|Jumps to Right Hand Evasion storage}} | |
− | + | 001850e8: 00000000 nop | | |
− | + | 001850ec: 30620040 andi r2,r3,0x0040 |{{f/std|<nowiki>r2 = 0x40 if Right Hand Shield is a shield (Based on Type flag)</nowiki>}} | |
− | + | 001850f0: 10400006 beq r2,r0,0x0018510c {{f/Cond|If Target's Right Hand Shield is a shield}} /Else branch to Left Hand Section | |
− | + | 001850f4: 00061040 sll r2,r6,0x01 |{{f/std|<nowiki>r2 = Right Hand Shield ID * 2 (size of shield data in shield 2nd table)</nowiki>}} | |
− | + | 001850f8: 3c018006 lui r1,0x8006 | | |
− | + | 001850fc: 00220821 addu r1,r1,r2 |{{f/std|<nowiki>r1 = 0x80060000 + Shiled offset</nowiki>}} | |
− | + | 00185100: 90223eb8 lbu r2,0x3eb8(r1) |{{f/load|<nowiki>r2 = Right Hand Shield Physical Evade</nowiki>}} {{f/std| 0x80063eb8 + Shield offset}} | |
− | + | 00185104: 3c018019 lui r1,0x8019 >j | | |
− | + | 00185108: a02238df sb r2,0x38df(r1) |{{f/store|Store Right Hand Equipment's Evade in Current Ability Right Hand Evasion }} {{f/std| 0x801938df}} | |
− | + | ||
− | + | {{f/loc|---Left Hand section---}} | |
− | + | 0018510c: 3c048019 lui r4,0x8019 | | |
− | + | 00185110: 8c842d98 lw r4,0x2d98(r4) |{{f/adr|<nowiki>r4 = Target data pointer</nowiki>}} | |
− | + | 00185114: 00000000 nop | | |
− | + | 00185118: 9083001f lbu r3,0x001f(r4) |{{f/load|<nowiki>r3 = Target Left Hand Weapon</nowiki>}} | |
− | + | 0018511c: 00000000 nop | | |
− | + | 00185120: 00031040 sll r2,r3,0x01 |{{f/std|<nowiki>r2 = Left Hand Weapon ID * 2</nowiki>}} | |
− | + | 00185124: 00431021 addu r2,r2,r3 |{{f/std|<nowiki>r2 = Left Hand Weapon ID * 3</nowiki>}} | |
− | + | 00185128: 00021080 sll r2,r2,0x02 |{{f/std|<nowiki>r2 = Left Hand Weapon ID * 12 (Size of Item data)</nowiki>}} | |
− | + | 0018512c: 3c018006 lui r1,0x8006 | | |
− | + | 00185130: 00220821 addu r1,r1,r2 |{{f/std|<nowiki>r1 = 0x80060000 + Weapon Offset</nowiki>}} | |
− | + | 00185134: 90252ebb lbu r5,0x2ebb(r1) |{{f/load|<nowiki>r5 = Left Hand Weapon Item type flag</nowiki>}} {{f/std| 0x80062eb8 + 0x03 + Weapon Offset}} | |
− | + | 00185138: 90830020 lbu r3,0x0020(r4) |{{f/load|<nowiki>r3 = Target's Left Hand Shield ID</nowiki>}} | |
− | + | 0018513c: 3c018006 lui r1,0x8006 | | |
− | + | 00185140: 00220821 addu r1,r1,r2 |{{f/std|<nowiki>r1 = 0x80060000 + Weapon Offset</nowiki>}} | |
− | + | 00185144: 90242ebc lbu r4,0x2ebc(r1) |{{f/load|<nowiki>r4 = Left Hand Weapon Second Table ID</nowiki>}} {{f/std| 0x80062eb8 + 0x04 + Weapon Offset}} | |
− | + | 00185148: 00031040 sll r2,r3,0x01 |{{f/std|<nowiki>r2 = Left Hand Shield ID * 2</nowiki>}} | |
− | + | 0018514c: 00431021 addu r2,r2,r3 |{{f/std|<nowiki>r2 = Left Hand Shield ID * 3</nowiki>}} | |
− | + | 00185150: 00021080 sll r2,r2,0x02 |{{f/std|<nowiki>r2 = Left Hand Shield ID * 12 (0x0c is the size of Item data)</nowiki>}} | |
− | + | 00185154: 3c018006 lui r1,0x8006 | | |
− | + | 00185158: 00220821 addu r1,r1,r2 |{{f/std|<nowiki>r1 = 0x80060000 + Shield Offset</nowiki>}} | |
− | + | 0018515c: 90232ebb lbu r3,0x2ebb(r1) |{{f/load|<nowiki>r3 = Left Hand Shield Equipment Type</nowiki>}} {{f/std| 0x80062eb8 + 0x03 + Shield Offset}} | |
− | + | 00185160: 3c018006 lui r1,0x8006 | | |
− | + | 00185164: 00220821 addu r1,r1,r2 |{{f/std|<nowiki>r1 = 0x80060000 + Shield Offset</nowiki>}} | |
− | + | 00185168: 90262ebc lbu r6,0x2ebc(r1) |{{f/load|<nowiki>r6 = Left Hand Shield Second Table ID</nowiki>}} {{f/std| 0x80062eb8 + 0x04 + Shield Offset}} | |
− | + | 0018516c: 30a20080 andi r2,r5,0x0080 |{{f/std|<nowiki>r2 = 0x80 if Left Hand Weapon is a Weapon (Based on Type flag)</nowiki>}} | |
− | + | 00185170: 10400008 beq r2,r0,0x00185194 {{f/Cond|If Target's Left Hand Weapon is a Weapon}} /Else Branch to Left Shield check | |
− | + | 00185174: 00000000 nop | | |
− | 001851b0: a02238e0 sb r2,0x38e0(r1) | + | 00185178: 10e00006 beq r7,r0,0x00185194 {{f/Cond|If Target can uses Weapon Guard}} /Else Branch to Left Shield check |
− | 001851b4: 8fbf0010 lw r31,0x0010(r29) | + | 0018517c: 000410c0 sll r2,r4,0x03 |{{f/std|<nowiki>r2 = Left Hand Weapon 2nd Table ID * 8 (Size of Weapon data in Weapon second table)</nowiki>}} |
− | 001851b8: 27bd0018 addiu r29,r29,0x0018 | + | 00185180: 3c018006 lui r1,0x8006 | |
− | 001851bc: 03e00008 jr r31 | + | 00185184: 00220821 addu r1,r1,r2 |{{f/std|<nowiki>r1 = 0x80060000 + Weapon Offset</nowiki>}} |
− | 001851c0: 00000000 nop | + | 00185188: 90223abd lbu r2,0x3abd(r1) |{{f/load|Load Left Hand Weapon Evade}} {{f/std| 0x80063ab8 + 0x05 + Weapon Offset}} |
+ | 0018518c: 0806146b j 0x001851ac {{f/jump|Jumps to Left Hand Evasion storage}} | ||
+ | 00185190: 00000000 nop | | ||
+ | 00185194: 30620040 andi r2,r3,0x0040 |{{f/std|<nowiki>r2 = 0x40 if Left Hand Shield is a shield (Based on Type flag)</nowiki>}} | ||
+ | 00185198: 10400006 beq r2,r0,0x001851b4 {{f/Cond|If Target's Left Hand Shield is a shield}} /Else branch to END | ||
+ | 0018519c: 00061040 sll r2,r6,0x01 |{{f/std|<nowiki>r2 = Left Hand Shield ID * 2 (size of shield data in shield 2nd table)</nowiki>}} | ||
+ | 001851a0: 3c018006 lui r1,0x8006 | | ||
+ | 001851a4: 00220821 addu r1,r1,r2 |{{f/std|<nowiki>r1 = 0x80060000 + Shield offset</nowiki>}} | ||
+ | 001851a8: 90223eb8 lbu r2,0x3eb8(r1) |{{f/load|<nowiki>r2 = Left Hand Shield Physical Evade</nowiki>}} {{f/std| 0x80063eb8 + Shield offset}} | ||
+ | 001851ac: 3c018019 lui r1,0x8019 >j | | ||
+ | 001851b0: a02238e0 sb r2,0x38e0(r1) |{{f/store|Store Left Hand Equipment's Evade in Current Ability Left Hand Evasion }} {{f/std| 0x801938e0}} | ||
+ | 001851b4: 8fbf0010 lw r31,0x0010(r29) END | ||
+ | 001851b8: 27bd0018 addiu r29,r29,0x0018 | ||
+ | 001851bc: 03e00008 jr r31 | ||
+ | 001851c0: 00000000 nop | ||
− | == Return Locations == | + | === Return Locations === |
+ | '''Battle.bin''' | ||
+ | 00188520: [[Physical Evade Calculation]] | ||
+ | 00188578: [[Physical Evade Calculation(Charge)]] (Seems to never be called) | ||
− | + | === Notes === | |
− | + | Notes : [[Data/Table_Locations#Item|The Item Data/Table]] start at 80062eb8 Each items are 12 bytes long So loading 0x8006YYYY (YYYY = Item ID * 12) + 2ebb = Loading offset 0x03 (2ebb - 2eb8) of this item |
Latest revision as of 19:47, 12 April 2022
Equipment Evasion Setting (Physical)
No Parameters, returns nothing Nullify Current Ability Evasion (0x801938de to 0x801938e1), Set Ability base hit to 100 (0x801938dc) Store Unit Class Evasion if 0x801938e1 Exit Routine if Unit is a monster If not a monster store Accessory, Right Hand and Left Hand Evasion in 0x801938de, 0x801938df and 0x801938e0 Might Store Weapon Evasion if Unit uses Weapon Guard (and is able to act/react) -------------------------------------------------------------------------------------------------------------------- 00184f9c: 3c048019 lui r4,0x8019 | 00184fa0: 8c842d98 lw r4,0x2d98(r4) |r4 = Target data pointer 00184fa4: 27bdffe8 addiu r29,r29,-0x0018 | 00184fa8: afbf0010 sw r31,0x0010(r29) | 00184fac: 9082008e lbu r2,0x008e(r4) |r2 = Target 4th set of Reactions Ablity Data/Table 00184fb0: 00000000 nop | 00184fb4: 30420040 andi r2,r2,0x0040 |r2 = 0x40 if Target uses Weapon Guard 00184fb8: 10400004 beq r2,r0,0x00184fcc #If Target uses Weapon Guard 00184fbc: 00003821 addu r7,r0,r0 |r7 = 0x00 00184fc0: 0c0604c3 jal 0x0018130c |-->Weapon_Guard_Usability Returns r2 = 0x00 if Target can act/react - r2 = 0x01 if not 00184fc4: 00000000 nop | 00184fc8: 2c470001 sltiu r7,r2,0x0001 |r7 = 0x01 If Target can use Weapon Guard 00184fcc: 3c048019 lui r4,0x8019 | 00184fd0: 8c842d98 lw r4,0x2d98(r4) |r4 = Target data pointer 00184fd4: 34020064 ori r2,r0,0x0064 |r2 = 0x64 (100) 00184fd8: 3c018019 lui r1,0x8019 | 00184fdc: a02238dc sb r2,0x38dc(r1) |Store 100 in current ability base Hit 0x801938dc 00184fe0: 3c018019 lui r1,0x8019 | 00184fe4: a02038de sb r0,0x38de(r1) |Nullify Current Ability Accessory Evasion 0x801938de 00184fe8: 3c018019 lui r1,0x8019 | 00184fec: a02038df sb r0,0x38df(r1) |Nullify Current Ability Right Hand Evasion 0x801938df 00184ff0: 3c018019 lui r1,0x8019 | 00184ff4: a02038e0 sb r0,0x38e0(r1) |Nullify Current Ability Left Hand Evasion 0x801838e0 00184ff8: 90820043 lbu r2,0x0043(r4) |r2 = Target's Class Evade 00184ffc: 3c018019 lui r1,0x8019 | 00185000: a02238e1 sb r2,0x38e1(r1) |Store Target's Class evade in Current Ability Class Evade 0x801938e1 00185004: 90820006 lbu r2,0x0006(r4) |r2 = Target's Gender 00185008: 00000000 nop | 0018500c: 30420020 andi r2,r2,0x0020 |r2 = 0x20 if Target is a Monster 00185010: 14400068 bne r2,r0,0x001851b4 #If Target is not a monster /If Target is a monster, branch to END 00185014: 00000000 nop ---Accessory section--- 00185018: 9082001c lbu r2,0x001c(r4) |r2 = Target's Accessory ID 0018501c: 00000000 nop | 00185020: 00021840 sll r3,r2,0x01 |r3 = Acc. ID * 2 00185024: 00621821 addu r3,r3,r2 |r3 = Acc. ID * 3 00185028: 00031880 sll r3,r3,0x02 |r3 = Acc. ID * 12 (Size of item data = Item offset in Item data Table) 0018502c: 3c018006 lui r1,0x8006 | 00185030: 00230821 addu r1,r1,r3 |r1 = 0x80060000 + Item Offset 00185034: 90252ebb lbu r5,0x2ebb(r1) |r5 = Target's Accessory Type flag 0x80062eb8 + 0x03 + Accessory Offset 00185038: 00000000 nop | 0018503c: 30a20008 andi r2,r5,0x0008 |r2 = 0x08 if Target's Accessory Type is Accessory 00185040: 1040000b beq r2,r0,0x00185070 #If Target's Accessory is valid (second Table is Ok) /Else Skip Accessory Section 00185044: 00000000 nop | 00185048: 3c018006 lui r1,0x8006 | 0018504c: 00230821 addu r1,r1,r3 |r1 = 0x80060000 + Item Offset 00185050: 90222ebc lbu r2,0x2ebc(r1) |r2 = Target's Accessory Second Table ID 0x80062eb8 + 0x04 + Accessory Offset 00185054: 00000000 nop | 00185058: 00021040 sll r2,r2,0x01 |Acc. 2nd Table ID * 2 (Offset for secondary Table) 0018505c: 3c018006 lui r1,0x8006 | 00185060: 00220821 addu r1,r1,r2 |r1 = 0x80060000 + Acc. Offset 00185064: 90223f58 lbu r2,0x3f58(r1) |r2 = Target's Acc. P-Ev 0x80063f58 + Acc. Offset 00185068: 3c018019 lui r1,0x8019 | 0018506c: a02238de sb r2,0x38de(r1) |Store Accessory's Evade in Current Ability Accessory Evasion 0x801938de ---Right Hand section--- 00185070: 9083001d lbu r3,0x001d(r4) |r3 = Target Right Hand Weapon 00185074: 00000000 nop | 00185078: 00031040 sll r2,r3,0x01 |r2 = Right Hand Weapon ID * 2 0018507c: 00431021 addu r2,r2,r3 |r2 = Right Hand Weapon ID * 3 00185080: 00021080 sll r2,r2,0x02 |r2 = Right Hand Weapon ID * 12 (Size of Item data) 00185084: 3c018006 lui r1,0x8006 | 00185088: 00220821 addu r1,r1,r2 |r1 = 0x80060000 + Weapon Offset 0018508c: 90252ebb lbu r5,0x2ebb(r1) |r5 = Right Hand Weapon Item type flag 0x80062eb8 + 0x03 + Weapon Offset 00185090: 9083001e lbu r3,0x001e(r4) |r3 = Target's Right Hand Shield ID 00185094: 3c018006 lui r1,0x8006 | 00185098: 00220821 addu r1,r1,r2 |r1 = 0x80060000 + Weapon Offset 0018509c: 90242ebc lbu r4,0x2ebc(r1) |r4 = Right Hand Weapon Second Table ID 0x80062eb8 + 0x04 + Weapon Offset 001850a0: 00031040 sll r2,r3,0x01 |r2 = Right Hand Shield ID * 2 001850a4: 00431021 addu r2,r2,r3 |r2 = Right Hand Shield ID * 3 001850a8: 00021080 sll r2,r2,0x02 |r2 = Right Hand Shield ID * 12 (0x0c is the size of Item data) 001850ac: 3c018006 lui r1,0x8006 | 001850b0: 00220821 addu r1,r1,r2 |r1 = 0x80060000 + Shield Offset 001850b4: 90232ebb lbu r3,0x2ebb(r1) |r3 = Right Hand Shield Equipment Type 0x80062eb8 + 0x03 + Shield Offset 001850b8: 3c018006 lui r1,0x8006 | 001850bc: 00220821 addu r1,r1,r2 |r1 = 0x80060000 + Shield Offset 001850c0: 90262ebc lbu r6,0x2ebc(r1) |r6 = Right Hand Shield Second Table ID 0x80062eb8 + 0x04 + Shield Offset 001850c4: 30a20080 andi r2,r5,0x0080 |r2 = 0x80 if Right Hand Weapon is a Weapon (Based on Type flag) 001850c8: 10400008 beq r2,r0,0x001850ec #If Target's Right Hand Weapon is a Weapon /Else Branch to Right Shield check 001850cc: 00000000 nop | 001850d0: 10e00006 beq r7,r0,0x001850ec #If Target can uses Weapon Guard /Else Branch to Right Shield check 001850d4: 000410c0 sll r2,r4,0x03 |r2 = Right Hand Weapon 2nd Table ID * 8 (Size of Weapon data in Weapon second table) 001850d8: 3c018006 lui r1,0x8006 | 001850dc: 00220821 addu r1,r1,r2 |r1 = 0x80060000 + Weapon Offset 001850e0: 90223abd lbu r2,0x3abd(r1) |r2 = Right Hand Weapon Evade 0x80063ab8 + 0x05 + Weapon Offset 001850e4: 08061441 j 0x00185104 >>Jumps to Right Hand Evasion storage 001850e8: 00000000 nop | 001850ec: 30620040 andi r2,r3,0x0040 |r2 = 0x40 if Right Hand Shield is a shield (Based on Type flag) 001850f0: 10400006 beq r2,r0,0x0018510c #If Target's Right Hand Shield is a shield /Else branch to Left Hand Section 001850f4: 00061040 sll r2,r6,0x01 |r2 = Right Hand Shield ID * 2 (size of shield data in shield 2nd table) 001850f8: 3c018006 lui r1,0x8006 | 001850fc: 00220821 addu r1,r1,r2 |r1 = 0x80060000 + Shiled offset 00185100: 90223eb8 lbu r2,0x3eb8(r1) |r2 = Right Hand Shield Physical Evade 0x80063eb8 + Shield offset 00185104: 3c018019 lui r1,0x8019 >j | 00185108: a02238df sb r2,0x38df(r1) |Store Right Hand Equipment's Evade in Current Ability Right Hand Evasion 0x801938df ---Left Hand section--- 0018510c: 3c048019 lui r4,0x8019 | 00185110: 8c842d98 lw r4,0x2d98(r4) |r4 = Target data pointer 00185114: 00000000 nop | 00185118: 9083001f lbu r3,0x001f(r4) |r3 = Target Left Hand Weapon 0018511c: 00000000 nop | 00185120: 00031040 sll r2,r3,0x01 |r2 = Left Hand Weapon ID * 2 00185124: 00431021 addu r2,r2,r3 |r2 = Left Hand Weapon ID * 3 00185128: 00021080 sll r2,r2,0x02 |r2 = Left Hand Weapon ID * 12 (Size of Item data) 0018512c: 3c018006 lui r1,0x8006 | 00185130: 00220821 addu r1,r1,r2 |r1 = 0x80060000 + Weapon Offset 00185134: 90252ebb lbu r5,0x2ebb(r1) |r5 = Left Hand Weapon Item type flag 0x80062eb8 + 0x03 + Weapon Offset 00185138: 90830020 lbu r3,0x0020(r4) |r3 = Target's Left Hand Shield ID 0018513c: 3c018006 lui r1,0x8006 | 00185140: 00220821 addu r1,r1,r2 |r1 = 0x80060000 + Weapon Offset 00185144: 90242ebc lbu r4,0x2ebc(r1) |r4 = Left Hand Weapon Second Table ID 0x80062eb8 + 0x04 + Weapon Offset 00185148: 00031040 sll r2,r3,0x01 |r2 = Left Hand Shield ID * 2 0018514c: 00431021 addu r2,r2,r3 |r2 = Left Hand Shield ID * 3 00185150: 00021080 sll r2,r2,0x02 |r2 = Left Hand Shield ID * 12 (0x0c is the size of Item data) 00185154: 3c018006 lui r1,0x8006 | 00185158: 00220821 addu r1,r1,r2 |r1 = 0x80060000 + Shield Offset 0018515c: 90232ebb lbu r3,0x2ebb(r1) |r3 = Left Hand Shield Equipment Type 0x80062eb8 + 0x03 + Shield Offset 00185160: 3c018006 lui r1,0x8006 | 00185164: 00220821 addu r1,r1,r2 |r1 = 0x80060000 + Shield Offset 00185168: 90262ebc lbu r6,0x2ebc(r1) |r6 = Left Hand Shield Second Table ID 0x80062eb8 + 0x04 + Shield Offset 0018516c: 30a20080 andi r2,r5,0x0080 |r2 = 0x80 if Left Hand Weapon is a Weapon (Based on Type flag) 00185170: 10400008 beq r2,r0,0x00185194 #If Target's Left Hand Weapon is a Weapon /Else Branch to Left Shield check 00185174: 00000000 nop | 00185178: 10e00006 beq r7,r0,0x00185194 #If Target can uses Weapon Guard /Else Branch to Left Shield check 0018517c: 000410c0 sll r2,r4,0x03 |r2 = Left Hand Weapon 2nd Table ID * 8 (Size of Weapon data in Weapon second table) 00185180: 3c018006 lui r1,0x8006 | 00185184: 00220821 addu r1,r1,r2 |r1 = 0x80060000 + Weapon Offset 00185188: 90223abd lbu r2,0x3abd(r1) |Load Left Hand Weapon Evade 0x80063ab8 + 0x05 + Weapon Offset 0018518c: 0806146b j 0x001851ac >>Jumps to Left Hand Evasion storage 00185190: 00000000 nop | 00185194: 30620040 andi r2,r3,0x0040 |r2 = 0x40 if Left Hand Shield is a shield (Based on Type flag) 00185198: 10400006 beq r2,r0,0x001851b4 #If Target's Left Hand Shield is a shield /Else branch to END 0018519c: 00061040 sll r2,r6,0x01 |r2 = Left Hand Shield ID * 2 (size of shield data in shield 2nd table) 001851a0: 3c018006 lui r1,0x8006 | 001851a4: 00220821 addu r1,r1,r2 |r1 = 0x80060000 + Shield offset 001851a8: 90223eb8 lbu r2,0x3eb8(r1) |r2 = Left Hand Shield Physical Evade 0x80063eb8 + Shield offset 001851ac: 3c018019 lui r1,0x8019 >j | 001851b0: a02238e0 sb r2,0x38e0(r1) |Store Left Hand Equipment's Evade in Current Ability Left Hand Evasion 0x801938e0 001851b4: 8fbf0010 lw r31,0x0010(r29) END 001851b8: 27bd0018 addiu r29,r29,0x0018 001851bc: 03e00008 jr r31 001851c0: 00000000 nop
Return Locations
Battle.bin 00188520: Physical Evade Calculation 00188578: Physical Evade Calculation(Charge) (Seems to never be called)
Notes
Notes : The Item Data/Table start at 80062eb8 Each items are 12 bytes long So loading 0x8006YYYY (YYYY = Item ID * 12) + 2ebb = Loading offset 0x03 (2ebb - 2eb8) of this item