Dance abilities

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

Uses Ability ID - Hard coded
Jump to Ability Dedicated section and Update Action data 
Update Attack type too (disables previous flags)
------------------------------------------------------------------------------------------------------
00186af8: 3c028019 lui r2,0x8019            |
00186afc: 944238d6 lhu r2,0x38d6(r2)        |r2 = Current Ability used ability ID                 0x801938d6 / 801938d6
00186b00: 27bdffe8 addiu r29,r29,-0x0018    |
00186b04: 2443ffa3 addiu r3,r2,0xffa3       |r3 = Ability ID - 0x5D
00186b08: 2c620007 sltiu r2,r3,0x0007       |r2 = 0x01 If ability ID was between 0x5D and 0x62 (Dance Abilities)
00186b0c: 10400035 beq r2,r0,0x00186be4     #If Used Ability is a dance ability
00186b10: afbf0010 sw r31,0x0010(r29)           |
00186b14: 00031080 sll r2,r3,0x02               |r2 = Dance ability Offset    (ID-0x5d) * 4
00186b18: 3c018017 lui r1,0x8017                |
00186b1c: 00220821 addu r1,r1,r2                |r1 = 0x801700xx (xx is Ability offset)
00186b20: 8c22425c lw r2,0x425c(r1)             |r2 = Dance abilities jump adress  (cf.Dance abilities table)
00186b24: 00000000 nop                          |
00186b28: 00400008 jr r2                        |Jump to hardocoded Ability section
00186b2c: 00000000 nop                          
00186b30: 3c028019 lui r2,0x8019                WITCH HUNT
00186b34: 944238ce lhu r2,0x38ce(r2)                |r2 = Ability XA
00186b38: 3c038019 lui r3,0x8019                    |
00186b3c: 946338d0 lhu r3,0x38d0(r3)                |r3 = Ability YA
00186b40: 3c048019 lui r4,0x8019                    |
00186b44: 8c842d90 lw r4,0x2d90(r4)                 |r4 = Target current action (TCA) data pointer
00186b48: 00431021 addu r2,r2,r3                    |r2 = XA + YA
00186b4c: a4820008 sh r2,0x0008(r4)                 |Set TCA MP damage
00186b50: 34020020 ori r2,r0,0x0020                 |
00186b54: 08061afd j 0x00186bf4                     >>Jump to END
00186b58: a0820025 sb r2,0x0025(r4)                 |Set TCA  Attack type to MP Dmg (disables other flags)
00186b5c: 3c028019 lui r2,0x8019                WIZNAIBUS
00186b60: 944238ce lhu r2,0x38ce(r2)                |r2 = Ability XA
00186b64: 3c038019 lui r3,0x8019                    |
00186b68: 946338d0 lhu r3,0x38d0(r3)                |r3 = Ability YA
00186b6c: 3c048019 lui r4,0x8019                    |
00186b70: 8c842d90 lw r4,0x2d90(r4)                 |r4 = Target current action (TCA) data pointer
00186b74: 00431021 addu r2,r2,r3                    |r2 = XA + YA
00186b78: a4820004 sh r2,0x0004(r4)                 |Set TCA HP damage
00186b7c: 34020080 ori r2,r0,0x0080                 |
00186b80: 08061afd j 0x00186bf4                     >>Jump to END
00186b84: a0820025 sb r2,0x0025(r4)                 |Set TCA  Attack type to HP Dmg (disables other flags)
00186b88: 3c038019 lui r3,0x8019                SLOW DANCE
00186b8c: 8c632d90 lw r3,0x2d90(r3)                 |r3 = TCA data pointer
00186b90: 34020001 ori r2,r0,0x0001                 |r2 = 0x01 (Stat malus of 1 (bonus flag is 0x80))
00186b94: 08061af9 j 0x00186be4                     >>jump to set Attack type to pseudo status
00186b98: a0620012 sb r2,0x0012(r3)                 |Set TCA speed change to -1 
00186b9c: 3c038019 lui r3,0x8019                POLKA POLKA
00186ba0: 8c632d90 lw r3,0x2d90(r3)                 |r3 = TCA data pointer
00186ba4: 34020001 ori r2,r0,0x0001                 |r2 = 0x01 (Stat malus of 1 (bonus flag is 0x80))
00186ba8: 08061af9 j 0x00186be4                     >>jump to set Attack type to pseudo status
00186bac: a0620014 sb r2,0x0014(r3)                 |Set TCA PA change to -1 
00186bb0: 3c038019 lui r3,0x8019                DISILLUSION
00186bb4: 8c632d90 lw r3,0x2d90(r3)                 |r3 = TCA data pointer
00186bb8: 34020001 ori r2,r0,0x0001                 |r2 = 0x01 (Stat malus of 1 (bonus flag is 0x80))
00186bbc: 08061af9 j 0x00186be4                     >>jump to set Attack type to pseudo status
00186bc0: a0620015 sb r2,0x0015(r3)                 |Set TCA MA change to -1 
                                                NAMELESS DANCE
00186bc4: 0c061fc9 jal 0x00187f24                   |-->Apply_status_(to_action) Add Ability status - if successful update TCA Attack type
00186bc8: 00000000 nop                              |
00186bcc: 08061afd j 0x00186bf4                     >>Jump to End
00186bd0: 00000000 nop                              |
00186bd4: 3c038019 lui r3,0x8019                LAST DANCE
00186bd8: 8c632d90 lw r3,0x2d90(r3)                 |r3 = TCA data pointer
00186bdc: 3402007f ori r2,r0,0x007f                 |r2 = 0x7f (Malus of 127 (bonus flag is 0x80))
00186be0: a0620013 sb r2,0x0013(r3)                 |store-127 in current action CT change (CT 00)
00186be4: 3c038019 lui r3,0x8019            |Landing site off all pseudo status jumps
00186be8: 8c632d90 lw r3,0x2d90(r3)         |r3 = TCA data pointer
00186bec: 34020001 ori r2,r0,0x0001         |r2 = 0x01 (Pseudo status attack type flag)
00186bf0: a0620025 sb r2,0x0025(r3)         |Set TCA Attack type to pseudo status (disables others flags)
00186bf4: 8fbf0010 lw r31,0x0010(r29)       END
00186bf8: 27bd0018 addiu r29,r29,0x0018     
00186bfc: 03e00008 jr r31                   
00186c00: 00000000 nop   

Hard coded mechanics

Uses Ability ID to load the dedicated jump address. Calling this routines with another Ability will skip the routine.

 Witch Hunt      (0x5D)    80186b30
 Wiznaibus       (0x5E)    80186b5c 
 Slow Dance      (0x5F)    80186b88
 Polka Polka     (0x60)    80186b9c
 Disillusion     (0x61)    80186bb0 
 Nameless Dance  (0x62)    80186bc4
 Last Dance      (0x63)    80186bd4

Return location

BAttle.bin
00189424: Formula 1D - Hit (X)%