Set XA + YA for Status Formulas (Stupid section)

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
No Parameters - Returns Nothing

If Ability is not Golem (hard coded) Apply compatibility effects on YA

Adds XA and YA and store the result in Target Current Action HP damage
------------------------------------------------------------------------------
0018659c: 27bdffe8 addiu r29,r29,-0x0018    |
001865a0: 3c038019 lui r3,0x8019            |
001865a4: 946338d6 lhu r3,0x38d6(r3)        |r3 = Current Ability used Ability ID
001865a8: 34020041 ori r2,r0,0x0041         |r2 = 0x41 (Golem ID)
001865ac: afbf0014 sw r31,0x0014(r29)       |
001865b0: 1062000f beq r3,r2,0x001865f0     #If Ability is not Golem
001865b4: afb00010 sw r16,0x0010(r29)           |
001865b8: 3c028019 lui r2,0x8019                |
001865bc: 944238d0 lhu r2,0x38d0(r2)            |r2 = current Ability YA
001865c0: 3c108019 lui r16,0x8019               |
001865c4: 961038ce lhu r16,0x38ce(r16)          |r2 = current Ability XA
001865c8: 3c018019 lui r1,0x8019                |
001865cc: a42238ce sh r2,0x38ce(r1)             |Store YA as XA
001865d0: 0c061259 jal 0x00184964               |-->Compatibility
001865d4: 00000000 nop                          |
001865d8: 3c028019 lui r2,0x8019                |
001865dc: 944238ce lhu r2,0x38ce(r2)            |r2 = Current Ability YA altered by compatibility
001865e0: 3c018019 lui r1,0x8019                |
001865e4: a43038ce sh r16,0x38ce(r1)            |Restore original XA
001865e8: 3c018019 lui r1,0x8019                |
001865ec: a42238d0 sh r2,0x38d0(r1)             |Store New YA (altered by compatibility)
001865f0: 3c028019 lui r2,0x8019                |
001865f4: 944238ce lhu r2,0x38ce(r2)        |r2 = Current Ability XA
001865f8: 3c038019 lui r3,0x8019            |
001865fc: 946338d0 lhu r3,0x38d0(r3)        |r3 = Current Ability YA
00186600: 3c048019 lui r4,0x8019            |
00186604: 8c842d90 lw r4,0x2d90(r4)         |r4 = Trget Current Action (TCA) data pointer
00186608: 00431021 addu r2,r2,r3            |XA + YA
0018660c: a4820004 sh r2,0x0004(r4)         |Store XA + YA as TCA HP damage
00186610: 8fbf0014 lw r31,0x0014(r29)       END
00186614: 8fb00010 lw r16,0x0010(r29)       
00186618: 27bd0018 addiu r29,r29,0x0018     
0018661c: 03e00008 jr r31                   
00186620: 00000000 nop                      

Hard coded mechanics

Ability ID 0x41 (Golem) will ignore the compatibility effects

Return location

Battle.bin
001886ec: Routine used in formula 2B
00188820: MA + X
001888a8: Accuracy as User Faith * (MA + X)% (golem accuracy)
001889ec: Calculate Accuracy for Magical Spells 
00188a4c: Calculate Accuracy for Magical
00188aac: MA_+_X_without_faith
00188b34: Physical Routine for Hit % abilities
00189028: 0E Dmg_(Y)% Hit_F(MA+X)% 100% Status Hide Status
001892e4: 28 StealExp_(Lowest of TarCurExp & SP+Y) Hit_(SP+X)%
00189930: 29 OppositeSex: Hit_(MA+X)%
00189a54: 2B Hit_(PA+X)% // -PA/MA/SP_(X)
00189db4: 32 Dmg_(Rdm(1…X)*(PA*3+Y))
00189e58: 33 Hit_(PA+X)%
00189f30: 35 Heal_(Y)% Hit_(PA+X)%
0018a04c: 3F Hit_(SP+X)%
0018a0a8: 40 Undead: Hit_(SP+X)%
0018a518: 51 Hit_(MA+X)%
0018a854: 58 Generic: Set_Morbol: Hit(MA+X)%