Difference between revisions of "Dance abilities"

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

Revision as of 18:38, 18 April 2022

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)%