Difference between revisions of "Inflicted Status Changes"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m (return link)
m
 
Line 1: Line 1:
  Inflicted Status Changes
+
  Parameters : r4 = Acting unit's data pointer
  0005e6cc: 34020001 ori r2,r0,0x0001 r2 = 1
+
              r5 = Status set
  0005e6d0: 10e20010 beq r7,r2,0x0005e714 Branch if Change Type = 1 (Disable  Statuses)
+
              r6 = Status flag
  0005e6d4: 00c01821 addu r3,r6,r0 r3 = Statuses
+
              r7 = Change Type (0x00 = Add status / 0x01 = Remove / 0x02 = Overwrittes)
  0005e6d8: 28e20002 slti r2,r7,0x0002
+
  0005e6dc: 10400005 beq r2,r0,0x0005e6f4 Branch if PV >= 2
+
Will update r4 Unit's inflicted status (0x1bb + set) and Current status (0x58 + set)
  0005e6e0: 00000000 nop
+
Adding / removing r6 Status or overwritting all satus with r6
  0005e6e4: 10e00008 beq r7,r0,0x0005e708 Branch if PV = 0 (Enable Statuses)
+
-------------------------------------------------------------------------------------------
  0005e6e8: 00851021 addu r2,r4,r5 r2 = Unit's Data Pointer + Status Set ID
+
  0005e6cc: 34020001 ori r2,r0,0x0001         |{{f/std|<nowiki>r2 = 0x01</nowiki>}}
  0005e6ec: 080179cc j 0x0005e730
+
  0005e6d0: 10e20010 beq r7,r2,0x0005e714     {{f/Cond|<nowiki>If Change Type <> 0x01</nowiki>}} /Else branch to Disable status (Change type 0x01) Section
  0005e6f0: 00851821 addu r3,r4,r5 r3 = Unit's Data Pointer + Status Set ID
+
  0005e6d4: 00c01821 addu r3,r6,r0           |{{f/std|<nowiki>r3 = Status flag</nowiki>}}
  0005e6f4: 34020002 ori r2,r0,0x0002 r2 = 2
+
  0005e6d8: 28e20002 slti r2,r7,0x0002             |{{f/std|<nowiki>r2 = 0x01 if Change type < 0x02</nowiki>}}
  0005e6f8: 10e2000b beq r7,r2,0x0005e728 Branch if PV = 2 (Force-set Statuses)
+
  0005e6dc: 10400005 beq r2,r0,0x0005e6f4         {{f/Cond|<nowiki>If Change Type  < 0x02</nowiki>}} /Else branch to check 0x02
  0005e6fc: 00000000 nop
+
  0005e6e0: 00000000 nop                               |{{f/std|<nowiki> </nowiki>}}
  0005e700: 080179cc j 0x0005e730 (No Inflicted Status Change)
+
  0005e6e4: 10e00008 beq r7,r0,0x0005e708             {{f/Cond|<nowiki>If change Type <> 0x00</nowiki>}} /Else branch to Enable status (Change type 0x00) Section
  0005e704: 00851821 addu r3,r4,r5 r3 = Unit's Data Pointer + Status Set ID
+
  0005e6e8: 00851021 addu r2,r4,r5                     |{{f/std|<nowiki>r2 = Unit's Data Pointer + Status Set ID</nowiki>}}
  0005e708: 904201bb lbu r2,0x01bb(r2) Load Unit's Inflicted Statuses
+
  0005e6ec: 080179cc j 0x0005e730                         {{f/jump|<nowiki>Jump to innate status section (no infliction)</nowiki>}}
  0005e70c: 080179cb j 0x0005e72c
+
  0005e6f0: 00851821 addu r3,r4,r5                         |{{f/std|<nowiki>r3 = Unit's Data Pointer + Status Set ID</nowiki>}}
  0005e710: 00464025 or r8,r2,r6 Enable Inflicted Statuses
+
  0005e6f4: 34020002 ori r2,r0,0x0002             |{{f/std|<nowiki>r2 = 0x02</nowiki>}}
  0005e714: 00851021 addu r2,r4,r5 r2 = Unit's Data Pointer + Status Set ID
+
  0005e6f8: 10e2000b beq r7,r2,0x0005e728         {{f/Cond|<nowiki>If Change type <> 0x02</nowiki>}} /Else branch to owerwritte (0x02) Section
  0005e718: 904301bb lbu r3,0x01bb(r2) Load Inflicted Statuses
+
  0005e6fc: 00000000 nop                               |
  0005e71c: 00061027 nor r2,r0,r6 r2 = Statuses to Disable
+
  0005e700: 080179cc j 0x0005e730                     {{f/jump|<nowiki>Jump to innate status section (no infliction)</nowiki>}}
  0005e720: 080179cb j 0x0005e72c
+
  0005e704: 00851821 addu r3,r4,r5                     |{{f/std|<nowiki>r3 = Unit's Data Pointer + Status Set ID</nowiki>}}
  0005e724: 00624024 and r8,r3,r2 Disable Inflicted Statuses
+
  0005e728: 00604021 addu r8,r3,r0 r8 = Statuses
+
                                            {{f/com|<nowiki>** ENABLE STATUS **</nowiki>}}
  0005e72c: 00851821 addu r3,r4,r5 r3 = Unit's Data Pointer + Status Set ID
+
  0005e708: 904201bb lbu r2,0x01bb(r2)             |{{f/load|<nowiki>r2 = Acting unit's inflicted status matching r5 set</nowiki>}}
  0005e730: 9062004e lbu r2,0x004e(r3) Load Unit's Innate Statuses
+
  0005e70c: 080179cb j 0x0005e72c                 {{f/jump|<nowiki>jump to innate status section</nowiki>}}
  0005e734: a06801bb sb r8,0x01bb(r3) Store new Inflicted Statuses
+
  0005e710: 00464025 or r8,r2,r6                   |{{f/std|<nowiki>Update inficted status with status flag (r6)</nowiki>}}
  0005e738: 01021025 or r2,r8,r2 Enable/Disable Innate Statuses
+
  0005e73c: 03e00008 jr r31  
+
                                            {{f/com|<nowiki>** DISABLE STATUS **</nowiki>}}
  0005e740: a0620058 sb r2,0x0058(r3) Store new Current Statuses
+
  0005e714: 00851021 addu r2,r4,r5                 |{{f/std|<nowiki>r2 = Unit's Data Pointer + Status Set ID</nowiki>}}
 
+
  0005e718: 904301bb lbu r3,0x01bb(r2)             |{{f/load|<nowiki>r3 = Acting unit's inflicted status matching r5 set</nowiki>}}
 
+
  0005e71c: 00061027 nor r2,r0,r6                 |{{f/std|<nowiki>r2 = Every status but the one(s) in r6</nowiki>}}
 
+
  0005e720: 080179cb j 0x0005e72c                 {{f/jump|<nowiki>jump to innate status section</nowiki>}}
== Return Locations ==
+
  0005e724: 00624024 and r8,r3,r2                 |{{f/std|<nowiki>Update inficted status without status flag (r6)</nowiki>}}
 
+
  0005e85c: [[Status_infliction/removal%3F]]
+
                                            {{f/com|<nowiki>** OVERRIDE STATUS **</nowiki>}}
  0005e870: [[Status_infliction/removal%3F]] (again)
+
  0005e728: 00604021 addu r8,r3,r0                 |{{f/std|<nowiki>r8 = Statuses (will be stored, overwritting every other status)</nowiki>}}
  0018f26c:
+
 +
                                            {{f/com|<nowiki>** Resolution **</nowiki>}}
 +
  0005e72c: 00851821 addu r3,r4,r5           |{{f/std|<nowiki>r3 = Unit's Data Pointer + Status Set ID</nowiki>}}
 +
  0005e730: 9062004e lbu r2,0x004e(r3)       |{{f/load|<nowiki>r2 Acting Unit's Innate Statuses (matching status set)</nowiki>}}
 +
  0005e734: a06801bb sb r8,0x01bb(r3)         |{{f/store|<nowiki>Store new Inflicted Statuses (Added / removed / overwritten)</nowiki>}}
 +
  0005e738: 01021025 or r2,r8,r2             |{{f/std|<nowiki>r2 = Acting unit innate status  + Acting units inflicted status</nowiki>}}
 +
  0005e73c: 03e00008 jr r31                   |
 +
  0005e740: a0620058 sb r2,0x0058(r3)         |{{f/store|<nowiki>Store Inflicted Statuses and innate status as Acting unit current status</nowiki>}}
 +
=== Return locations ===
 +
'''SCUS_942.21'''
 +
  0005e864: [[Status_infliction/removal%3F]] r5 = 0x00 / r6 = variable / r7 = 0x00
 +
  0005e878: [[Status_infliction/removal%3F]] r5 = 0x00 / r6 = variable / r7 = 0x01
 +
 +
'''Battle.bin'''
 +
  0018f274: [[Mimic_ability_setting]]      r5 = 0x00 / r6 = 0xd / r7 = 0x01

Latest revision as of 21:23, 23 February 2022

Parameters : r4 = Acting unit's data pointer
             r5 = Status set
             r6 = Status flag
             r7 = Change Type (0x00 = Add status / 0x01 = Remove / 0x02 = Overwrittes)

Will update r4 Unit's inflicted status (0x1bb + set) and Current status (0x58 + set) 
Adding / removing r6 Status or overwritting all satus with r6
-------------------------------------------------------------------------------------------
0005e6cc: 34020001 ori r2,r0,0x0001         |r2 = 0x01
0005e6d0: 10e20010 beq r7,r2,0x0005e714     #If Change Type <> 0x01 /Else branch to Disable status (Change type 0x01) Section
0005e6d4: 00c01821 addu r3,r6,r0            |r3 = Status flag
0005e6d8: 28e20002 slti r2,r7,0x0002             |r2 = 0x01 if Change type < 0x02
0005e6dc: 10400005 beq r2,r0,0x0005e6f4          #If Change Type  < 0x02 /Else branch to check 0x02
0005e6e0: 00000000 nop                               | 
0005e6e4: 10e00008 beq r7,r0,0x0005e708              #If change Type <> 0x00 /Else branch to Enable status (Change type 0x00) Section
0005e6e8: 00851021 addu r2,r4,r5                     |r2 = Unit's Data Pointer + Status Set ID
0005e6ec: 080179cc j 0x0005e730                          >>Jump to innate status section (no infliction)
0005e6f0: 00851821 addu r3,r4,r5                         |r3 = Unit's Data Pointer + Status Set ID
0005e6f4: 34020002 ori r2,r0,0x0002              |r2 = 0x02
0005e6f8: 10e2000b beq r7,r2,0x0005e728          #If Change type <> 0x02 /Else branch to owerwritte (0x02) Section
0005e6fc: 00000000 nop                               |
0005e700: 080179cc j 0x0005e730                      >>Jump to innate status section (no infliction)
0005e704: 00851821 addu r3,r4,r5                     |r3 = Unit's Data Pointer + Status Set ID

                                            ** ENABLE STATUS **
0005e708: 904201bb lbu r2,0x01bb(r2)             |r2 = Acting unit's inflicted status matching r5 set
0005e70c: 080179cb j 0x0005e72c                  >>jump to innate status section
0005e710: 00464025 or r8,r2,r6                   |Update inficted status with status flag (r6)

                                            ** DISABLE STATUS **
0005e714: 00851021 addu r2,r4,r5                 |r2 = Unit's Data Pointer + Status Set ID
0005e718: 904301bb lbu r3,0x01bb(r2)             |r3 = Acting unit's inflicted status matching r5 set
0005e71c: 00061027 nor r2,r0,r6                  |r2 = Every status but the one(s) in r6
0005e720: 080179cb j 0x0005e72c                  >>jump to innate status section
0005e724: 00624024 and r8,r3,r2                  |Update inficted status without status flag (r6)

                                            ** OVERRIDE STATUS **
0005e728: 00604021 addu r8,r3,r0                 |r8 = Statuses (will be stored, overwritting every other status)

                                            ** Resolution **
0005e72c: 00851821 addu r3,r4,r5            |r3 = Unit's Data Pointer + Status Set ID
0005e730: 9062004e lbu r2,0x004e(r3)        |r2 Acting Unit's Innate Statuses (matching status set)
0005e734: a06801bb sb r8,0x01bb(r3)         |Store new Inflicted Statuses (Added / removed / overwritten)
0005e738: 01021025 or r2,r8,r2              |r2 = Acting unit innate status  + Acting units inflicted status
0005e73c: 03e00008 jr r31                   |
0005e740: a0620058 sb r2,0x0058(r3)         |Store Inflicted Statuses and innate status as Acting unit current status

Return locations

SCUS_942.21
0005e864: Status_infliction/removal?  r5 = 0x00 / r6 = variable / r7 = 0x00
0005e878: Status_infliction/removal?  r5 = 0x00 / r6 = variable / r7 = 0x01

Battle.bin
0018f274: Mimic_ability_setting       r5 = 0x00 / r6 = 0xd / r7 = 0x01