Difference between revisions of "Damage Split Usability"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " Damage Split Usability: 0018d318: 3c028019 lui r2,0x8019 0018d31c: 8c422d90 lw r2,0x2d90(r2) Current Action Data Pointer 0018d320: 27bdffe8 addiu r29,r29,0xffe8...")
 
m
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
  Damage Split Usability:
+
  If HP damage > 0 , Checks random vs Brave%, if ok Store Damage Split ID in TCA Reaction ID and HP damage/2 in TCA 0x26
  0018d318: 3c028019 lui r2,0x8019    
+
  0018d31c: 8c422d90 lw r2,0x2d90(r2)     Current Action Data Pointer
+
TCA = Targeted unit Current Action data pointer
  0018d320: 27bdffe8 addiu r29,r29,0xffe8     
+
------------------------------------------------------------------------------------------------------------------------
  0018d324: afbf0014 sw r31,0x0014(r29)    
+
  0018d318: 3c028019 lui r2,0x8019           |
  0018d328: afb00010 sw r16,0x0010(r29)    
+
  0018d31c: 8c422d90 lw r2,0x2d90(r2)         |{{f/adr|<nowiki>r2 = TCA data pointer</nowiki>}}
  0018d32c: 94500004 lhu r16,0x0004(r2)     Load Damage?
+
  0018d320: 27bdffe8 addiu r29,r29,-0x0018    |
  0018d330: 00000000 nop          
+
  0018d324: afbf0014 sw r31,0x0014(r29)       |
  0018d334: 1200000e beq r16,r0,0x0018d370   Branch if no Damage
+
  0018d328: afb00010 sw r16,0x0010(r29)       |
  0018d338: 00000000 nop          
+
  0018d32c: 94500004 lhu r16,0x0004(r2)       |{{f/load|<nowiki>r16 = TCA HP damage amount</nowiki>}}
  0018d33c: 3c048019 lui r4,0x8019    
+
  0018d330: 00000000 nop                     |
  0018d340: 8c842d98 lw r4,0x2d98(r4)     Load Defender's Stats
+
  0018d334: 1200000e beq r16,r0,0x0018d370   {{f/Cond|If HP damage > 0}} /Else branch to  {{f/loc|END}}
  0018d344: 0c0634e1 jal 0x0018d384     Chance to React
+
  0018d338: 00000000 nop                         |{{f/std|}}
  0018d348: 00000000 nop          
+
  0018d33c: 3c048019 lui r4,0x8019               |{{f/std|}}
  0018d34c: 14400008 bne r2,r0,0x0018d370    
+
  0018d340: 8c842d98 lw r4,0x2d98(r4)             |{{f/adr|<nowiki>r4 = Targeted Unit data pointer</nowiki>}}
  0018d350: 26100001 addiu r16,r16,0x0001    
+
  0018d344: 0c0634e1 jal 0x0018d384               |{{f/jal|Chance to React|Chance to React}} Returns r2 = 0x00 If Unit will react (Chances are Br%)
  0018d354: 3202ffff andi r2,r16,0xffff    
+
  0018d348: 00000000 nop                         |
  0018d358: 00028042 srl r16,r2,0x01     Damage / 2  
+
  0018d34c: 14400008 bne r2,r0,0x0018d370         {{f/Cond|If Targeted Unit is reacting}}
  0018d35c: 3c038019 lui r3,0x8019    
+
  0018d350: 26100001 addiu r16,r16,0x0001             |{{f/std|<nowiki>r16 = TCA HP damage + 0x01</nowiki>}}
  0018d360: 8c632d90 lw r3,0x2d90(r3)     Current Action Data Pointer
+
  0018d354: 3202ffff andi r2,r16,0xffff               |{{f/std|<nowiki>r2 = TCA HP damage (halfword)</nowiki>}}
  0018d364: 340201be ori r2,r0,0x01be    
+
  0018d358: 00028042 srl r16,r2,0x01                 |{{f/std|<nowiki>r16 = TCA HP Damage / 2 (rounded up)</nowiki>}}
  0018d368: a4700026 sh r16,0x0026(r3)    
+
  0018d35c: 3c038019 lui r3,0x8019                   |
  0018d36c: a462000e sh r2,0x000e(r3)     Store Reaction
+
  0018d360: 8c632d90 lw r3,0x2d90(r3)                 |{{f/adr|<nowiki>r3 = TCA data poijter</nowiki>}}
  0018d370: 8fbf0014 lw r31,0x0014(r29)    
+
  0018d364: 340201be ori r2,r0,0x01be                 |{{f/std|<nowiki>r2 = 0x1be (Damage split ability ID)</nowiki>}}
 +
  0018d368: a4700026 sh r16,0x0026(r3)               |{{f/store|Store HP dmg/2 in TCA 0x26 (Unit 0x1b2 )}}
 +
  0018d36c: a462000e sh r2,0x000e(r3)                 |{{f/store|Store Damage split ID in TCA 0x0e (Unit 0x19a)}}
 +
  0018d370: 8fbf0014 lw r31,0x0014(r29)       END
 
  0018d374: 8fb00010 lw r16,0x0010(r29)       
 
  0018d374: 8fb00010 lw r16,0x0010(r29)       
  0018d378: 27bd0018 addiu r29,r29,0x0018    
+
  0018d378: 27bd0018 addiu r29,r29,0x0018    
  0018d37c: 03e00008 jr r31
+
  0018d37c: 03e00008 jr r31                  
 
  0018d380: 00000000 nop
 
  0018d380: 00000000 nop
 +
=== Return location ===
 +
'''Battle.bin'''
 +
0018ccc8: [[MP_Switch,_Distribute,_and_Damage_Split_usability]]

Latest revision as of 06:03, 17 March 2022

If HP damage > 0 , Checks random vs Brave%, if ok Store Damage Split ID in TCA Reaction ID and HP damage/2 in TCA 0x26

TCA = Targeted unit Current Action data pointer
------------------------------------------------------------------------------------------------------------------------
0018d318: 3c028019 lui r2,0x8019            |
0018d31c: 8c422d90 lw r2,0x2d90(r2)         |r2 = TCA data pointer
0018d320: 27bdffe8 addiu r29,r29,-0x0018    |
0018d324: afbf0014 sw r31,0x0014(r29)       |
0018d328: afb00010 sw r16,0x0010(r29)       |
0018d32c: 94500004 lhu r16,0x0004(r2)       |r16 = TCA HP damage amount
0018d330: 00000000 nop                      |
0018d334: 1200000e beq r16,r0,0x0018d370    #If HP damage > 0 /Else branch to  END
0018d338: 00000000 nop                          |
0018d33c: 3c048019 lui r4,0x8019                |
0018d340: 8c842d98 lw r4,0x2d98(r4)             |r4 = Targeted Unit data pointer
0018d344: 0c0634e1 jal 0x0018d384               |-->Chance to React Returns r2 = 0x00 If Unit will react (Chances are Br%)
0018d348: 00000000 nop                          |
0018d34c: 14400008 bne r2,r0,0x0018d370         #If Targeted Unit is reacting
0018d350: 26100001 addiu r16,r16,0x0001             |r16 = TCA HP damage + 0x01
0018d354: 3202ffff andi r2,r16,0xffff               |r2 = TCA HP damage (halfword)
0018d358: 00028042 srl r16,r2,0x01                  |r16 = TCA HP Damage / 2 (rounded up)
0018d35c: 3c038019 lui r3,0x8019                    |
0018d360: 8c632d90 lw r3,0x2d90(r3)                 |r3 = TCA data poijter
0018d364: 340201be ori r2,r0,0x01be                 |r2 = 0x1be (Damage split ability ID)
0018d368: a4700026 sh r16,0x0026(r3)                |Store HP dmg/2 in TCA 0x26 (Unit 0x1b2 )
0018d36c: a462000e sh r2,0x000e(r3)                 |Store Damage split ID in TCA 0x0e (Unit 0x19a)
0018d370: 8fbf0014 lw r31,0x0014(r29)       END
0018d374: 8fb00010 lw r16,0x0010(r29)      
0018d378: 27bd0018 addiu r29,r29,0x0018     
0018d37c: 03e00008 jr r31                   
0018d380: 00000000 nop

Return location

Battle.bin
0018ccc8: MP_Switch,_Distribute,_and_Damage_Split_usability