Difference between revisions of "15 Set CT00 Hit F(MA+X)%"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m (M-Ev link)
m
 
Line 1: Line 1:
 
  [15]
 
  [15]
  001891ac: 27bdffe8 addiu r29,r29,0xffe8
+
  001891ac: 27bdffe8 addiu r29,r29,-0x0018    |
  001891b0: afbf0010 sw r31,0x0010(r29)
+
  001891b0: afbf0010 sw r31,0x0010(r29)       |
  001891b4: 0c06216e jal 0x 001885b8      [[Magical_Evade_Calculation]]
+
  001891b4: 0c06216e jal 0x001885b8          |{{f/jal|Magical_Evade_Calculation|Magical_Evade_Calculation}} If Abillity is evadeable roll Ability Evade byte against Ability base Hit / Returns r2
  001891b8: 00000000 nop
+
  001891b8: 00000000 nop                     |
  001891bc: 1440000d bne r2,r0,0x 001891f4
+
  001891bc: 1440000d bne r2,r0,0x001891f4    {{f/Cond|If Attack is not evaded}}
  001891c0: 00000000 nop
+
  001891c0: 00000000 nop                         |
  001891c4: 0c062273 jal 0x 001889cc      [[Calculate Accuracy for Magical Spells]]
+
  001891c4: 0c062273 jal 0x001889cc              |{{f/jal|Calculate Accuracy for Magical Spells|Calculate Accuracy for Magical Spells}} Set XA and YA, applies XA changes (Status, Compat, Support), uses XA+YA as Hit% (Modified by faith) / Returns r2
  001891c8: 00000000 nop
+
  001891c8: 00000000 nop                         |
  001891cc: 14400009 bne r2,r0,0x 001891f4
+
  001891cc: 14400009 bne r2,r0,0x001891f4        {{f/Cond|If Attack hits}}
  001891d0: 3402007f ori r2,r0,0x007f
+
  001891d0: 3402007f ori r2,r0,0x007f                 |{{f/std|<nowiki>r2 = 0x7f</nowiki>}}
  001891d4: 3c038019 lui r3,0x8019
+
  001891d4: 3c038019 lui r3,0x8019                   |
  001891d8: 8c632d90 lw r3,0x2d90(r3) r3 = target current action data pointer
+
  001891d8: 8c632d90 lw r3,0x2d90(r3)                 |{{f/adr|<nowiki>r3 = Target Current Action (TCA) data pointer</nowiki>}}
  001891dc: 00000000 nop
+
  001891dc: 00000000 nop                             |
  001891e0: a0620013 sb r2,0x0013(r3) Set target CT to -127. / Set Action to CT change (0x7F = CT00)
+
  001891e0: a0620013 sb r2,0x0013(r3)                 |{{f/store|Set TCA CT change to 0x7f (will becomes - 127)}}
  001891e4: 3c038019 lui r3,0x8019
+
  001891e4: 3c038019 lui r3,0x8019                   |
  001891e8: 8c632d90 lw r3,0x2d90(r3)
+
  001891e8: 8c632d90 lw r3,0x2d90(r3)                 |{{f/adr|<nowiki>r3 = TCA data pointer</nowiki>}}
  001891ec: 34020001 ori r2,r0,0x0001
+
  001891ec: 34020001 ori r2,r0,0x0001                 |{{f/std|<nowiki>r2 = 0x01 (pseudo status attack type</nowiki>}}
  001891f0: a0620025 sb r2,0x0025(r3) Set damage type to Pseudo-Status
+
  001891f0: a0620025 sb r2,0x0025(r3)                 |{{f/store|Set TCA Attack type to pseudo status (disables other flags)}}
  001891f4: 8fbf0010 lw r31,0x0010(r29)
+
  001891f4: 8fbf0010 lw r31,0x0010(r29)       END
  001891f8: 27bd 0018 addiu r29,r29,0x 0018
+
  001891f8: 27bd0018 addiu r29,r29,0x0018   
  001891fc: 03e00008 jr r31
+
  001891fc: 03e00008 jr r31                  
  00189200: 00000000 nop
+
  00189200: 00000000 nop                    
 +
=== Return locations ===
 +
'''Battle.bin'''
 +
0018b97c - [[Pre Formula Setup (FDC)|Pre Formula Setup]]

Latest revision as of 18:45, 17 April 2022

[15]
001891ac: 27bdffe8 addiu r29,r29,-0x0018    |
001891b0: afbf0010 sw r31,0x0010(r29)       |
001891b4: 0c06216e jal 0x001885b8           |-->Magical_Evade_Calculation If Abillity is evadeable roll Ability Evade byte against Ability base Hit / Returns r2
001891b8: 00000000 nop                      |
001891bc: 1440000d bne r2,r0,0x001891f4     #If Attack is not evaded
001891c0: 00000000 nop                          |
001891c4: 0c062273 jal 0x001889cc               |-->Calculate Accuracy for Magical Spells Set XA and YA, applies XA changes (Status, Compat, Support), uses XA+YA as Hit% (Modified by faith) / Returns r2
001891c8: 00000000 nop                          |
001891cc: 14400009 bne r2,r0,0x001891f4         #If Attack hits
001891d0: 3402007f ori r2,r0,0x007f                 |r2 = 0x7f
001891d4: 3c038019 lui r3,0x8019                    |
001891d8: 8c632d90 lw r3,0x2d90(r3)                 |r3 = Target Current Action (TCA) data pointer
001891dc: 00000000 nop                              |
001891e0: a0620013 sb r2,0x0013(r3)                 |Set TCA CT change to 0x7f (will becomes - 127)
001891e4: 3c038019 lui r3,0x8019                    |
001891e8: 8c632d90 lw r3,0x2d90(r3)                 |r3 = TCA data pointer
001891ec: 34020001 ori r2,r0,0x0001                 |r2 = 0x01 (pseudo status attack type
001891f0: a0620025 sb r2,0x0025(r3)                 |Set TCA Attack type to pseudo status (disables other flags)
001891f4: 8fbf0010 lw r31,0x0010(r29)       END
001891f8: 27bd0018 addiu r29,r29,0x0018     
001891fc: 03e00008 jr r31                   
00189200: 00000000 nop                      

Return locations

Battle.bin
0018b97c - Pre Formula Setup