Difference between revisions of "HP Absorption"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
Line 9: Line 9:
 
  00187264: 1040001e beq r2,r0,0x001872e0 Branch if target is not undead
 
  00187264: 1040001e beq r2,r0,0x001872e0 Branch if target is not undead
 
  00187268: 00000000 nop
 
  00187268: 00000000 nop
  0018726c: 0c062e91 jal 0x0018ba44
+
  0018726c: 0c062e91 jal 0x0018ba44 [[Set some data for current attack]]
 
  00187270: 00000000 nop
 
  00187270: 00000000 nop
 
  00187274: 3c048019 lui r4,0x8019
 
  00187274: 3c048019 lui r4,0x8019
Line 38: Line 38:
 
  001872d8: 08061cd0 j 0x00187340 Branch to end
 
  001872d8: 08061cd0 j 0x00187340 Branch to end
 
  001872dc: a4440006 sh r4,0x0006(r2) Store HP Damage as Recovery
 
  001872dc: a4440006 sh r4,0x0006(r2) Store HP Damage as Recovery
  001872e0: 0c062e91 jal 0x0018ba44
+
  001872e0: 0c062e91 jal 0x0018ba44 [[Set some data for current attack]] //Repeat of same subroutine?
 
  001872e4: 00000000 nop
 
  001872e4: 00000000 nop
 
  001872e8: 3c048019 lui r4,0x8019
 
  001872e8: 3c048019 lui r4,0x8019

Revision as of 15:37, 22 September 2016

HP Absorbtion (Seems needlessly complex)
00187248: 3c028019 lui r2,0x8019		
0018724c: 8c422d98 lw r2,0x2d98(r2)		Load Defender's Stats
00187250: 27bdffe8 addiu r29,r29,0xffe8		
00187254: afbf0010 sw r31,0x0010(r29)		
00187258: 90420058 lbu r2,0x0058(r2)		Load 1st set of Current Status
0018725c: 00000000 nop				
00187260: 30420010 andi r2,r2,0x0010		
00187264: 1040001e beq r2,r0,0x001872e0		Branch if target is not undead
00187268: 00000000 nop
0018726c: 0c062e91 jal 0x0018ba44		Set some data for current attack
00187270: 00000000 nop				
00187274: 3c048019 lui r4,0x8019		
00187278: 8c842d90 lw r4,0x2d90(r4)		Load Defender Current Action Data Pointer
0018727c: 00000000 nop				
00187280: 90820000 lbu r2,0x0000(r4)		Load Hit Flag
00187284: 00000000 nop				
00187288: 1040002d beq r2,r0,0x00187340		Branch to end if Attack missed
0018728c: 00000000 nop				
00187290: 3c038019 lui r3,0x8019		
00187294: 8c632d8c lw r3,0x2d8c(r3)		Load Attacker Current Action Data  Pointer
00187298: 94820004 lhu r2,0x0004(r4)		Load HP Damage
0018729c: 00000000 nop				
001872a0: a4620004 sh r2,0x0004(r3)		Store HP Damage into Attacker
001872a4: 34020080 ori r2,r0,0x0080		
001872a8: a0620025 sb r2,0x0025 (r3)		Store Attack Flag as HP Damage
001872ac: 3c038019 lui r3,0x801 9
001872b0: 8c632d8c lw r3,0x2d8c(r3)		Load Attacker Current Action Data  Pointer
001872b4: 34020001 ori r2,r0,0x0001		
001872b8: a0620000 sb r2,0x0000(r3)		
001872bc: 3c028019 lui r2,0x8019		
001872c0: 8c422d90 lw r2,0x2d90(r2)		Load Target Current Action Data  Pointer
001872c4: 00000000 nop				
001872c8: 94440004 lhu r4,0x0004(r2)		Load HP Damage
001872cc: 34030040 ori r3,r0,0x0040		
001872d0: a4400004 sh r0,0x0004(r2)		Store HP Damage Flag as 0
001872d4: a0430025 sb r3,0x0025(r2)		Store HP Damage Flag as HP Recovery
001872d8: 08061cd0 j 0x00187340			Branch to end
001872dc: a4440006 sh r4,0x0006(r2)		Store HP Damage as Recovery
001872e0: 0c062e91 jal 0x0018ba44		Set some data for current attack //Repeat of same subroutine?
001872e4: 00000000 nop				
001872e8: 3c048019 lui r4,0x8019		
001872ec: 8c842d90 lw r4,0x2d90(r4)		Load Current Action Data Pointer
001872f0: 00000000 nop				
001872f4: 90820000 lbu r2,0x0000(r4)		Load Hit Flag
001872f8: 00000000 nop				
001872fc: 10400010 beq r2,r0,0x00187340		Branch if Attack missed
00187300: 00000000 nop				
00187304: 3c038019 lui r3,0x8019		
00187308: 8c632d8c lw r3,0x2d8c(r3)		Load Attacker Current Action Data Pointer
0018730c: 94820004 lhu r2,0x0004(r4)		Load HP Damage
00187310: 00000000 nop				
00187314: a4620006 sh r2,0x0006(r3)		Store Defender HP Damage as HP Recovery for Attacker
00187318: 34020040 ori r2,r0,0x0040		
0018731c: a0620025 sb r2,0x0025(r3)		Store Attack Flag as HP Healing for Attacker
00187320: 3c038019 lui r3,0x8019		
00187324: 8c632d8c lw r3,0x2d8c(r3)		Load Attacker Current Action Data
00187328: 34020001 ori r2,r0,0x0001		
0018732c: a0620000 sb r2,0x0000(r3)		Store Attacker Hit Flag as Hit
00187330: 3c038019 lui r3,0x8019		
00187334: 8c632d90 lw r3,0x2d90(r3)		Load Defender Current Action Data
00187338: 34020080 ori r2,r0,0x0080		
0018733c: a0620025 sb r2,0x0025(r3)		Store Attack Flag as HP Damage for Defender (? Does this make sense?)
00187340: 8fbf0010 lw r31,0x0010(r29)		
00187344: 27bd0018 addiu r29,r29,0x0018		
00187348: 03e00008 jr r31			
0018734c: 00000000 nop


Return Locations

  • Battle.bin
00188d24: 06 AbsHP_(Weapon)
0018910c: 10 AbsHP_(Y)% Hit_F(MA+X)%
00189cb8: 30 AbsHP_(PA*WP)
0018a230: 47 AbsHP_(Y)% 100% Status
0018a408: 4D AbsHP_(Y)% Hit_(MA+X)%