Difference between revisions of "29 OppositeSex: Hit (MA+X)%"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(Created page with " [29] 00189910: 27bdffe8 addiu r29,r29,0xffe8 00189914: afbf0010 sw r31,0x0010(r29) 00189918: 0c061760 jal 0x 00185d80 Load MA and X 0018991c: 00000000 nop ...")
 
m
 
Line 1: Line 1:
 
  [29]
 
  [29]
  00189910: 27bdffe8 addiu r29,r29,0xffe8
+
  00189910: 27bdffe8 addiu r29,r29,-0x0018    |
  00189914: afbf0010 sw r31,0x0010(r29)
+
  00189914: afbf0010 sw r31,0x0010(r29)       |
  00189918: 0c061760 jal 0x 00185d80      Load MA and X
+
  00189918: 0c061760 jal 0x00185d80          |{{f/jal|Store_MA_and_X|Store_MA_and_X}} Set Ability XA = Attacker's MA and YA = used Ability X
  0018991c: 00000000 nop
+
  0018991c: 00000000 nop                     |
  00189920: 0c061259 jal 0x 00184964      Zodiac Calculation
+
  00189920: 0c061259 jal 0x00184964          |{{f/jal|Compatibility|Compatibility}} Alters XA (-50% to +50%) based on compatibility
  00189924: 00000000 nop
+
  00189924: 00000000 nop                     |
  00189928: 0c061967 jal 0x 0018659c      (MA + X)% Hit
+
  00189928: 0c061967 jal 0x0018659c          |{{f/jal|Set_XA_%2B_YA_for_Status_Formulas_(Stupid_section)|XA + YA for Accuracy}} XA+YA becomes TCA HP damage (YA is processed via compatibility) - Will be used as accuracy
  0018992c: 00000000 nop
+
  0018992c: 00000000 nop                     |
  00189930: 0c061d44 jal 0x 00187510      Final Accuracy Check
+
  00189930: 0c061d44 jal 0x00187510          |{{f/jal|Uses_HP_damage_as_Action_hit%25|Uses_HP_damage_as_Action_hit%}} HP damage becomes Hit% - Roll Hit% vs random (0 to 100), Set Action hit flag to miss if it fails
  00189934: 00000000 nop
+
  00189934: 00000000 nop                     |
  00189938: 3c028019 lui r2,0x8019
+
  00189938: 3c028019 lui r2,0x8019           |
  0018993c: 8c422d90 lw r2,0x2d90(r2)
+
  0018993c: 8c422d90 lw r2,0x2d90(r2)         |{{f/adr|<nowiki>r2 = Target Current Action (TCA) data pointer</nowiki>}}
  00189940: 00000000 nop
+
  00189940: 00000000 nop                     |
  00189944: 90420000 lbu r2,0x0000(r2)
+
  00189944: 90420000 lbu r2,0x0000(r2)       |{{f/load|<nowiki>r2 = TCA hit flag</nowiki>}}
  00189948: 00000000 nop
+
  00189948: 00000000 nop                     |
  0018994c: 10400011 beq r2,r0,0x 00189994
+
  0018994c: 10400011 beq r2,r0,0x00189994    {{f/Cond|If Attack hits}}
  00189950: 00000000 nop
+
  00189950: 00000000 nop                         |
  00189954: 3c028019 lui r2,0x8019
+
  00189954: 3c028019 lui r2,0x8019               |
  00189958: 8c422d98 lw r2,0x2d98(r2)
+
  00189958: 8c422d98 lw r2,0x2d98(r2)             |{{f/adr|<nowiki>r2 = Target data pointer</nowiki>}}
  0018995c: 3c048019 lui r4,0x8019
+
  0018995c: 3c048019 lui r4,0x8019               |
  00189960: 8c842d94 lw r4,0x2d94(r4)
+
  00189960: 8c842d94 lw r4,0x2d94(r4)             |{{f/adr|<nowiki>r4 = Attacker data pointer</nowiki>}}
  00189964: 90430006 lbu r3,0x0006(r2)
+
  00189964: 90430006 lbu r3,0x0006(r2)           |{{f/load|<nowiki>r3 = Target Gender byte</nowiki>}}
  00189968: 90820006 lbu r2,0x0006(r4)
+
  00189968: 90820006 lbu r2,0x0006(r4)           |{{f/load|<nowiki>r2 = Attacker Gender byte</nowiki>}}
  0018996c: 306300e0 andi r3,r3,0x00e0
+
  0018996c: 306300e0 andi r3,r3,0x00e0           |{{f/std|<nowiki>r3 = Target Gender flags</nowiki>}}
  00189970: 304200e0 andi r2,r2,0x00e0
+
  00189970: 304200e0 andi r2,r2,0x00e0           |{{f/std|<nowiki>r2 = Attacker Gender flags</nowiki>}}
  00189974: 14620005 bne r3,r2,0x 0018998c
+
  00189974: 14620005 bne r3,r2,0x0018998c        {{f/Cond|If Attacker and Target share the same gender}}
  00189978: 00000000 nop
+
  00189978: 00000000 nop                             |
  0018997c: 0c0610c3 jal 0x 0018430c      ELSE, MISS Routine (Except for graphics, this just wastes space.)
+
  0018997c: 0c0610c3 jal 0x0018430c                  |{{f/jal|Force_Attack_Miss|Force_Attack_Miss}} Hit Flag = Miss Hit% = 0 - Evade type = 0x07
  00189980: 00000000 nop
+
  00189980: 00000000 nop                             |
  00189984: 08062665 j 0x 00189994
+
  00189984: 08062665 j 0x00189994                    {{f/jump|jump to END}}
  00189988: 00000000 nop
+
  00189988: 00000000 nop                             |
  0018998c: 0c061fc9 jal 0x 00187f24      Inflict Status at (MA + X)%
+
                                                {{f/Cond|Else : Different Gender}}
  00189990: 00000000 nop
+
  0018998c: 0c061fc9 jal 0x00187f24                  |{{f/jal|Apply_status_(to_action)|Apply_status_(to_action)}} Add Ability status - if successful update TCA Attack type
  00189994: 8fbf0010 lw r31,0x0010(r29)
+
  00189990: 00000000 nop                             |
  00189998: 27bd 0018 addiu r29,r29,0x 0018
+
  00189994: 8fbf0010 lw r31,0x0010(r29)       END
  0018999c: 03e00008 jr r31
+
  00189998: 27bd0018 addiu r29,r29,0x0018   
 +
  0018999c: 03e00008 jr r31                  
 
  001899a0: 00000000 nop
 
  001899a0: 00000000 nop
 +
=== Return location ===
 +
'''Battle.bin'''
 +
0018b97c - [[Pre Formula Setup (FDC)|Pre Formula Setup]]

Latest revision as of 18:37, 22 April 2022

[29]
00189910: 27bdffe8 addiu r29,r29,-0x0018    |
00189914: afbf0010 sw r31,0x0010(r29)       |
00189918: 0c061760 jal 0x00185d80           |-->Store_MA_and_X Set Ability XA = Attacker's MA and YA = used Ability X
0018991c: 00000000 nop                      |
00189920: 0c061259 jal 0x00184964           |-->Compatibility Alters XA (-50% to +50%) based on compatibility
00189924: 00000000 nop                      |
00189928: 0c061967 jal 0x0018659c           |-->XA + YA for Accuracy XA+YA becomes TCA HP damage (YA is processed via compatibility) - Will be used as accuracy
0018992c: 00000000 nop                      |
00189930: 0c061d44 jal 0x00187510           |-->Uses_HP_damage_as_Action_hit% HP damage becomes Hit% - Roll Hit% vs random (0 to 100), Set Action hit flag to miss if it fails
00189934: 00000000 nop                      |
00189938: 3c028019 lui r2,0x8019            |
0018993c: 8c422d90 lw r2,0x2d90(r2)         |r2 = Target Current Action (TCA) data pointer
00189940: 00000000 nop                      |
00189944: 90420000 lbu r2,0x0000(r2)        |r2 = TCA hit flag
00189948: 00000000 nop                      |
0018994c: 10400011 beq r2,r0,0x00189994     #If Attack hits
00189950: 00000000 nop                          |
00189954: 3c028019 lui r2,0x8019                |
00189958: 8c422d98 lw r2,0x2d98(r2)             |r2 = Target data pointer
0018995c: 3c048019 lui r4,0x8019                |
00189960: 8c842d94 lw r4,0x2d94(r4)             |r4 = Attacker data pointer
00189964: 90430006 lbu r3,0x0006(r2)            |r3 = Target Gender byte
00189968: 90820006 lbu r2,0x0006(r4)            |r2 = Attacker Gender byte
0018996c: 306300e0 andi r3,r3,0x00e0            |r3 = Target Gender flags
00189970: 304200e0 andi r2,r2,0x00e0            |r2 = Attacker Gender flags
00189974: 14620005 bne r3,r2,0x0018998c         #If Attacker and Target share the same gender
00189978: 00000000 nop                              |
0018997c: 0c0610c3 jal 0x0018430c                   |-->Force_Attack_Miss Hit Flag = Miss Hit% = 0 - Evade type = 0x07
00189980: 00000000 nop                              |
00189984: 08062665 j 0x00189994                     >>jump to END
00189988: 00000000 nop                              |
                                                #Else : Different Gender
0018998c: 0c061fc9 jal 0x00187f24                   |-->Apply_status_(to_action) Add Ability status - if successful update TCA Attack type
00189990: 00000000 nop                              |
00189994: 8fbf0010 lw r31,0x0010(r29)       END
00189998: 27bd0018 addiu r29,r29,0x0018     
0018999c: 03e00008 jr r31                   
001899a0: 00000000 nop

Return location

Battle.bin
0018b97c - Pre Formula Setup