Attacker Berserk/Frog Check

From Final Fantasy Hacktics Wiki
Revision as of 21:01, 26 March 2022 by Orkney (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
No Parameters - Returns Nothing

If Attacker has berserk : XA = 150% of initial value
If Attacker has frog : XA = 0x01
--------------------------------------------------------------------------------------------------------------
00186254: 3c028019 lui r2,0x8019            |
00186258: 8c422d94 lw r2,0x2d94(r2)         |r2 = Attacker's Data Pointer
0018625c: 00000000 nop                      |
00186260: 9042005a lbu r2,0x005a(r2)        |r2 = Attacker's 3rd set of Statuses byte
00186264: 00000000 nop                      |
00186268: 30420008 andi r2,r2,0x0008        |r2 = 0x08 if Attacker has berserk
0018626c: 1040000b beq r2,r0,0x0018629c     #If Attacker has berserk
00186270: 00000000 nop                          |
00186274: 3c048019 lui r4,0x8019                |
00186278: 248438ce addiu r4,r4,0x38ce           |r4 = Ability XA pointer       0x801938ce / 801938ce
0018627c: 84830000 lh r3,0x0000(r4)             |r3 = Ability XA
00186280: 00000000 nop                          |
00186284: 00031040 sll r2,r3,0x01               |XA * 2
00186288: 00431021 addu r2,r2,r3                |XA * 3
0018628c: 00021fc2 srl r3,r2,0x1f               |r3 = Higher bit of r2 (should be 0x00)
00186290: 00431021 addu r2,r2,r3                |
00186294: 00021043 sra r2,r2,0x01               |r2 = XA*3/2
00186298: a4820000 sh r2,0x0000(r4)             |Store XA (150% of initial value)
0018629c: 3c028019 lui r2,0x8019            |
001862a0: 8c422d94 lw r2,0x2d94(r2)         |r2 = Attacker data pointer
001862a4: 00000000 nop                      |
001862a8: 9042005a lbu r2,0x005a(r2)        |r2 = Attacker's 3rd set of Statuses byte
001862ac: 00000000 nop                      |
001862b0: 30420002 andi r2,r2,0x0002        |r2 = 0x02 if Attacker is a frog
001862b4: 10400003 beq r2,r0,0x001862c4     #If Attacker is a frog
001862b8: 34020001 ori r2,r0,0x0001             |r2 = 0x01
001862bc: 3c018019 lui r1,0x8019                |
001862c0: a42238ce sh r2,0x38ce(r1)             |Store XA = 1 
001862c4: 03e00008 jr r31                   END    
001862c8: 00000000 nop  

Return Locations

Battle.bin
00188610: Physical XA Modifying Statuses/Support 
00188aec: Magical XA * YA
001898a0: 28 StealExp_(Lowest of TarCurExp & SP+Y) Hit_(SP+X)%
00189e48: 33 Hit_(PA+X)%