Difference between revisions of "0F AbsMP (Y)% Hit F(MA+X)%"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m (Links - Little infos)
m
 
Line 1: Line 1:
[0f]
+
  00189084: 27bdffe8 addiu r29,r29,-0x0018 
  00189084: 27bdffe8 addiu r29,r29,0xffe8
+
  00189088: afbf0010 sw r31,0x0010(r29)    
  00189088: afbf0010 sw r31,0x0010(r29)
+
  0018908c: 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
  0018908c: 0c06216e jal 0x 001885b8            [[Magical_Evade_Calculation|Magic Evade]]
+
  00189090: 00000000 nop                     |
  00189090: 00000000 nop
+
  00189094: 1440000d bne r2,r0,0x001890cc    {{f/Cond|If Attack is not evaded}}
  00189094: 1440000d bne r2,r0,0x 001890cc
+
  00189098: 00000000 nop                         |
  00189098: 00000000 nop
+
  0018909c: 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
  0018909c: 0c062273 jal 0x 001889cc          [[Calculate_Accuracy_for_Magical_Spells]] - Calculate (MA + X)*Faith% This is essentially the same routine as 0x188a24 except without elemental boosting.
+
  001890a0: 00000000 nop                         |
  001890a0: 00000000 nop
+
  001890a4: 14400009 bne r2,r0,0x001890cc        {{f/Cond|If Attack hits}}
  001890a4: 14400009 bne r2,r0,0x 001890cc
+
  001890a8: 00000000 nop                             |
  001890a8: 00000000 nop
+
  001890ac: 0c0619a3 jal 0x0018668c                  |{{f/jal|Calculate_MP%25_damage|Calculate MP% Damage}} Set MP damage = Y% of Target Max MP
  001890ac: 0c0619a3 jal 0x 0018668c          [[MP_Damage_Routine_(Uses_Y_instead_of_X.)|MP Damage]]
+
  001890b0: 00000000 nop                             |
  001890b0: 00000000 nop
+
  001890b4: 3c038019 lui r3,0x8019                   |
  001890b4: 3c038019 lui r3,0x8019
+
  001890b8: 8c632d90 lw r3,0x2d90(r3)                 |{{f/adr|<nowiki>r3 = Target Current Action (TCA) data pointer</nowiki>}}
  001890b8: 8c632d90 lw r3,0x2d90(r3)
+
  001890bc: 00000000 nop                             |
  001890bc: 00000000 nop
+
  001890c0: 94620008 lhu r2,0x0008(r3)               |{{f/load|<nowiki>r2 = TCA MP damage</nowiki>}}
  001890c0: 94620008 lhu r2,0x0008(r3)           r2 = MP Dmg
+
  001890c4: 0c061d1b jal 0x0018746c                  |{{f/jal|MP_Absorption|MP_Absorption}} Set Attacker Current Action data to restore MP (= TCA HP damage)
  001890c4: 0c061d1b jal 0x 0018746c          [[MP_Recovery_Routine]]
+
  001890c8: a4620004 sh r2,0x0004(r3)                 |{{f/store|<nowiki>Set TCA HP damage = to MP Dmg (used in MP Abosrption routine - HP Dmg set to 0x00 in MP recovery routine)</nowiki>}}
  001890c8: a4620004 sh r2,0x0004(r3)           Store r2 as HP Dmg (used in MP recovery routine - HP Dmg set to 0x00 in MP recovery routine)    
+
  001890cc: 8fbf0010 lw r31,0x0010(r29)       END
  001890cc: 8fbf0010 lw r31,0x0010(r29)
+
  001890d0: 27bd0018 addiu r29,r29,0x0018   
  001890d0: 27bd 0018 addiu r29,r29,0x 0018
+
  001890d4: 03e00008 jr r31                
  001890d4: 03e00008 jr r31
+
  001890d8: 00000000 nop    
  001890d8: 00000000 nop
+
=== Return location ===
 +
'''Battle.bin'''
 +
  8018b97c - [[Pre Formula Setup (FDC)|Pre Formula Setup]]

Latest revision as of 19:48, 16 April 2022

00189084: 27bdffe8 addiu r29,r29,-0x0018   
00189088: afbf0010 sw r31,0x0010(r29)      
0018908c: 0c06216e jal 0x001885b8           |-->Magical_Evade_Calculation If Abillity is evadeable roll Ability Evade byte against Ability base Hit / Returns r2
00189090: 00000000 nop                      |
00189094: 1440000d bne r2,r0,0x001890cc     #If Attack is not evaded
00189098: 00000000 nop                          |
0018909c: 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
001890a0: 00000000 nop                          |
001890a4: 14400009 bne r2,r0,0x001890cc         #If Attack hits
001890a8: 00000000 nop                              |
001890ac: 0c0619a3 jal 0x0018668c                   |-->Calculate MP% Damage Set MP damage = Y% of Target Max MP
001890b0: 00000000 nop                              |
001890b4: 3c038019 lui r3,0x8019                    |
001890b8: 8c632d90 lw r3,0x2d90(r3)                 |r3 = Target Current Action (TCA) data pointer
001890bc: 00000000 nop                              |
001890c0: 94620008 lhu r2,0x0008(r3)                |r2 = TCA MP damage
001890c4: 0c061d1b jal 0x0018746c                   |-->MP_Absorption Set Attacker Current Action data to restore MP (= TCA HP damage)
001890c8: a4620004 sh r2,0x0004(r3)                 |Set TCA HP damage = to MP Dmg (used in MP Abosrption routine - HP Dmg set to 0x00 in MP recovery routine)
001890cc: 8fbf0010 lw r31,0x0010(r29)       END
001890d0: 27bd0018 addiu r29,r29,0x0018    
001890d4: 03e00008 jr r31                  
001890d8: 00000000 nop      

Return location

Battle.bin
 8018b97c - Pre Formula Setup