Difference between revisions of "Abandon Calculation"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
 
Line 1: Line 1:
  Abandon Calculation
+
  No Parameters - Returns Nothing
  0018537c: 3c048019 lui r4,0x8019
+
  00185380: 8c842d98 lw r4,0x2d98(r4) Load Target's Data Pointer
+
If Target can Act/React and uses Abandon : Halves Current Ability base Hit ( 0x801938dc )
  00185384: 27bdffe8 addiu r29,r29,0xffe8
+
----------------------------------------------------------------------------------------------------------
  00185388: afbf0010 sw r31,0x0010(r29)
+
  0018537c: 3c048019 lui r4,0x8019           |
  0018538c: 0c0604c3 jal 0x0018130c [[Weapon Guard Usability]]
+
  00185380: 8c842d98 lw r4,0x2d98(r4)         |{{f/adr|<nowiki>r4 = Target data pointer</nowiki>}}
  00185390: 00000000 nop
+
  00185384: 27bdffe8 addiu r29,r29,-0x0018    |
  00185394: 14400013 bne r2,r0,0x001853e4 Branch if Target can't use Weapon Guard
+
  00185388: afbf0010 sw r31,0x0010(r29)       |
  00185398: 00000000 nop
+
  0018538c: 0c0604c3 jal 0x0018130c           |{{f/jal|Weapon Guard Usability|Weapon Guard Usability}} Returns r2 = 0x00 if Target can Act/React
  0018539c: 3c028019 lui r2,0x8019
+
  00185390: 00000000 nop                     |
  001853a0: 8c422d98 lw r2,0x2d98(r2) Load Target's Data Pointer
+
  00185394: 14400013 bne r2,r0,0x001853e4     {{f/Cond|If Target can React}} /Else branch to  {{f/loc|END}}
  001853a4: 00000000 nop
+
  00185398: 00000000 nop                         |{{f/std|}}
  001853a8: 9042008e lbu r2,0x008e(r2) Load Target's 4th set of Reactions
+
  0018539c: 3c028019 lui r2,0x8019               |{{f/std|}}
  001853ac: 00000000 nop
+
  001853a0: 8c422d98 lw r2,0x2d98(r2)             |{{f/adr|<nowiki>r2 = Target data pointer</nowiki>}}
  001853b0: 30420010 andi r2,r2,0x0010
+
  001853a4: 00000000 nop                         |
  001853b4: 1040000b beq r2,r0,0x001853e4 Branch if Target doesn't have Abandon
+
  001853a8: 9042008e lbu r2,0x008e(r2)           |{{f/load|<nowiki>r2 = Target 4th set of Reaction byte</nowiki>}}
  001853b8: 00000000 nop
+
  001853ac: 00000000 nop                         |
  001853bc: 3c038019 lui r3,0x8019
+
  001853b0: 30420010 andi r2,r2,0x0010           |{{f/std|<nowiki>r2 = 0x10 if Target uses Abandon</nowiki>}}
  001853c0: 246338dc addiu r3,r3,0x38dc
+
  001853b4: 1040000b beq r2,r0,0x001853e4         {{f/Cond|If Target uses Abandon}}
  001853c4: 90620000 lbu r2,0x0000(r3) Load Base Hit
+
  001853b8: 00000000 nop                             |{{f/std|}}
  001853c8: 00000000 nop
+
  001853bc: 3c038019 lui r3,0x8019                   |{{f/std|}}
  001853cc: 00021042 srl r2,r2,0x01 Base Hit / 2
+
  001853c0: 246338dc addiu r3,r3,0x38dc               |{{f/adr|<nowiki>r3 = 0x801938dc (Ability Base Hit data pointer)</nowiki>}}
  001853d0: a0620000 sb r2,0x0000(r3) Store new Hit%
+
  001853c4: 90620000 lbu r2,0x0000(r3)               |{{f/load|<nowiki>r2 = Current Ability Base Hit</nowiki>}}
  001853d4: 3c038019 lui r3,0x8019
+
  001853c8: 00000000 nop                             |
  001853d8: 8c632d90 lw r3,0x2d90(r3) Current Action Data Pointer
+
  001853cc: 00021042 srl r2,r2,0x01                   |{{f/std|<nowiki>r2 = Base Hit / 2</nowiki>}}
  001853dc: 340201c1 ori r2,r0,0x01c1
+
  001853d0: a0620000 sb r2,0x0000(r3)                 |{{f/store|Store Halved Ability base hit}}
  001853e0: a462000e sh r2,0x000e(r3) Store Reaction = Abandon
+
  001853d4: 3c038019 lui r3,0x8019                   |
  001853e4: 8fbf0010 lw r31,0x0010(r29)
+
  001853d8: 8c632d90 lw r3,0x2d90(r3)                 |{{f/adr|<nowiki>r2 = Target Current Action data pointer</nowiki>}}
  001853e8: 27bd0018 addiu r29,r29,0x0018
+
  001853dc: 340201c1 ori r2,r0,0x01c1                 |{{f/std|<nowiki>r2 = 0x1c1</nowiki>}}
  001853ec: 03e00008 jr r31
+
  001853e0: a462000e sh r2,0x000e(r3)                 |{{f/store|Store Abandon ID as Reaction ID in Target Current Action data}}
  001853f0: 00000000 nop
+
  001853e4: 8fbf0010 lw r31,0x0010(r29)       '''END'''
 
+
  001853e8: 27bd0018 addiu r29,r29,0x0018  
 +
  001853ec: 03e00008 jr r31                
 +
  001853f0: 00000000 nop                    
  
 
== Return Locations ==
 
== Return Locations ==

Latest revision as of 20:14, 22 March 2022

No Parameters - Returns Nothing

If Target can Act/React and uses Abandon : Halves Current Ability base Hit ( 0x801938dc )
----------------------------------------------------------------------------------------------------------
0018537c: 3c048019 lui r4,0x8019            |
00185380: 8c842d98 lw r4,0x2d98(r4)         |r4 = Target data pointer
00185384: 27bdffe8 addiu r29,r29,-0x0018    |
00185388: afbf0010 sw r31,0x0010(r29)       |
0018538c: 0c0604c3 jal 0x0018130c           |-->Weapon Guard Usability Returns r2 = 0x00 if Target can Act/React
00185390: 00000000 nop                      |
00185394: 14400013 bne r2,r0,0x001853e4     #If Target can React /Else branch to  END
00185398: 00000000 nop                          |
0018539c: 3c028019 lui r2,0x8019                |
001853a0: 8c422d98 lw r2,0x2d98(r2)             |r2 = Target data pointer
001853a4: 00000000 nop                          |
001853a8: 9042008e lbu r2,0x008e(r2)            |r2 = Target 4th set of Reaction byte
001853ac: 00000000 nop                          |
001853b0: 30420010 andi r2,r2,0x0010            |r2 = 0x10 if Target uses Abandon
001853b4: 1040000b beq r2,r0,0x001853e4         #If Target uses Abandon
001853b8: 00000000 nop                              |
001853bc: 3c038019 lui r3,0x8019                    |
001853c0: 246338dc addiu r3,r3,0x38dc               |r3 = 0x801938dc (Ability Base Hit data pointer)
001853c4: 90620000 lbu r2,0x0000(r3)                |r2 = Current Ability Base Hit
001853c8: 00000000 nop                              |
001853cc: 00021042 srl r2,r2,0x01                   |r2 = Base Hit / 2
001853d0: a0620000 sb r2,0x0000(r3)                 |Store Halved Ability base hit
001853d4: 3c038019 lui r3,0x8019                    |
001853d8: 8c632d90 lw r3,0x2d90(r3)                 |r2 = Target Current Action data pointer
001853dc: 340201c1 ori r2,r0,0x01c1                 |r2 = 0x1c1
001853e0: a462000e sh r2,0x000e(r3)                 |Store Abandon ID as Reaction ID in Target Current Action data
001853e4: 8fbf0010 lw r31,0x0010(r29)       END
001853e8: 27bd0018 addiu r29,r29,0x0018    
001853ec: 03e00008 jr r31                  
001853f0: 00000000 nop                     

Return Locations

Battle.bin
00188538: Physical Evade Calculation
00188590: Physical Evade Calculation(Charge)   (Seems to never be called)
001885d8: Magical Evade Calculation