Evasion Changes due to Statuses

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
No Parameters - Returns Nothing

Nullify Ability Evasion byte (0x801938de to 0x801938e1) if Target has Don't Act - Sleep - Stop - Confuse - Charging - Performing
Halve Ability base Hit (0x801938dc) If Target is Defending
----------------------------------------------------------------------------------------------------------------------------------
001853f4: 3c058019 lui r5,0x8019            |
001853f8: 8ca52d98 lw r5,0x2d98(r5)         |r5 = Target data pointer Load Target's Data Pointer
001853fc: 27bdffe8 addiu r29,r29,-0x0018    |
00185400: afbf0010 sw r31,0x0010(r29)       |
00185404: 90a2005c lbu r2,0x005c(r5)        |r2 = Target 5th set of Statuses byte
00185408: 90a3005b lbu r3,0x005b(r5)        |r3 = Target 4th set of Statuses byte
0018540c: 30420014 andi r2,r2,0x0014        |r2 <> 0x00 If Target has Don't Act or Sleep
00185410: 0002102b sltu r2,r0,r2            |r2 = 0x01 If Target has Don't Act or Sleep
00185414: 30630002 andi r3,r3,0x0002        |r3 = 0x02 if Target has Stop
00185418: 10600002 beq r3,r0,0x00185424     #If Target has Stop
0018541c: 00402021 addu r4,r2,r0            |r4 = 0x01 if Target has Don't Act or Sleep
00185420: 34040001 ori r4,r0,0x0001             |r4 = 0x01
00185424: 90a20059 lbu r2,0x0059(r5)        |r2 = Target 2nd set of Statuses byte Load Target's 2nd set of statuses
00185428: 00000000 nop                      |
0018542c: 30420010 andi r2,r2,0x0010        |r2 = 0x10 if Target is Confuse
00185430: 10400002 beq r2,r0,0x0018543c     #If Target is Confuse
00185434: 00000000 nop                          |
00185438: 34040001 ori r4,r0,0x0001             |r4 = 0x01
0018543c: 90a20058 lbu r2,0x0058(r5)        |r2 = Target 1st set of Statuses byte
00185440: 00000000 nop                      |
00185444: 30420009 andi r2,r2,0x0009        |r2 <> 0x00 if Target is Performing or Charging
00185448: 10400003 beq r2,r0,0x00185458     #If Target is Performing / Charging
0018544c: 308200ff andi r2,r4,0x00ff        |r2 = 0x01 If Target has at least one of the statuses tested above
00185450: 34040001 ori r4,r0,0x0001             |r4 = 0x01
00185454: 308200ff andi r2,r4,0x00ff            |r2 = 0x01
00185458: 10400005 beq r2,r0,0x00185470     #If Target has at least one of the statuses checked
0018545c: 00000000 nop                          |
00185460: 3c048019 lui r4,0x8019                |
00185464: 248438de addiu r4,r4,0x38de           |r4 = 0x801938de (Current Ability Accessory Evade pointer)
00185468: 0c017991 jal 0x0005e644               |-->Data Nullifying Nullify all Current Ability Evasion byte (0x801938de to 0x801938e1)
0018546c: 34050004 ori r5,r0,0x0004             |r5 = 0x04 (number of byte to nullify)
00185470: 3c028019 lui r2,0x8019            |
00185474: 8c422d98 lw r2,0x2d98(r2)         |r2 = Target data pointer
00185478: 00000000 nop                      |
0018547c: 90420058 lbu r2,0x0058(r2)        |r2 = Target 1st set of statuses byte
00185480: 00000000 nop                      |
00185484: 30420002 andi r2,r2,0x0002        |r2 = 0x02 if Target is defending
00185488: 10400007 beq r2,r0,0x001854a8     #If Target is defending
0018548c: 00000000 nop                          |
00185490: 3c038019 lui r3,0x8019                |
00185494: 246338dc addiu r3,r3,0x38dc           |r3 = 0x801938dc (Ability base hit pointer)
00185498: 90620000 lbu r2,0x0000(r3)            |r2 = Current Ability base hit
0018549c: 00000000 nop                          |
001854a0: 00021042 srl r2,r2,0x01               |r2 = Base Hit / 2
001854a4: a0620000 sb r2,0x0000(r3)             |Store Halved Current Ability Base Hit
001854a8: 8fbf0010 lw r31,0x0010(r29)       END
001854ac: 27bd0018 addiu r29,r29,0x0018     
001854b0: 03e00008 jr r31                   
001854b4: 00000000 nop                      

Return Locations

Battle.bin
00188540: Physical Evade Calculation
00188598: Physical Evade Calculation(Charge)
001885e0: Magical Evade Calculation