Difference between revisions of "Calculate HP% damage"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m (EnderC moved page Calculate % of damage to Calculate HP% damage: Clarifies the damage is based on HP % rather than a buff or debuff TO damage)
(No difference)

Revision as of 04:14, 4 January 2021

Calculate % of damage
00186624: 3c028019 lui r2,0x8019		
00186628: 8c422d98 lw r2,0x2d98(r2)		Load Defender's Stats
0018662c: 00000000 nop				
00186630: 9443002a lhu r3,0x002a(r2)		Load Defender's Max HP
00186634: 3c028019 lui r2,0x8019		
00186638: 904238fa lbu r2,0x38fa(r2)		Load Abilities Y
0018663c: 00000000 nop				
00186640: 00620018 mult r3,r2			Max HP * Y
00186644: 3c0351eb lui r3,0x51eb		
00186648: 00001012 mflo r2			Move to R2
0018664c: 3463851f ori r3,r3,0x851f		
00186650: 24420063 addiu r2,r2,0x0063		
00186654: 00430018 mult r2,r3			
00186658: 3c038019 lui r3,0x8019		
0018665c: 8c632d90 lw r3,0x2d90(r3)		Load Current Action Data Pointer
00186660: 00000000 nop				
00186664: 90620025 lbu r2,0x0025(r3)		Load Attack Flag
00186668: 27bdfff8 addiu r29,r29,0xfff8		
0018666c: 34420080 ori r2,r2,0x0080		
00186670: a0620025 sb r2,0x0025(r3)		Store Attack Flag as HP Damage
00186674: 00001010 mfhi r2			Move Hi to r2
00186678: 00021143 sra r2,r2,0x05		
0018667c: a4620004 sh r2,0x0004(r3)		Store HP Damage
00186680: 27bd0008 addiu r29,r29,0x0008		
00186684: 03e00008 jr r31			
00186688: 00000000 nop


Return Locations

  • Battle.bin
00188e1c: 09 Dmg_(Y/100)% Hit_F(MA+X)%
00188f70: 0D Heal_(Y)% Hit_F(MA+X)%
00189064: 0E Dmg_(Y)% Hit_F(MA+X)% 100% Status Hide Status
00189104: 10 AbsHP_(Y)% Hit_F(MA+X)%
00189f64: 35 Heal_(Y)% Hit_(PA+X)%
0018a228: 47 AbsHP_(Y)% 100% Status
0018a400: 4D AbsHP_(Y)% Hit_(MA+X)% 
0018a60c: 53 Dmg_(X)% Hit_(MA+X)%