Difference between revisions of "Attacker Berserk/Frog Check"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
 
Line 1: Line 1:
  Attacker Berserk/Frog Check
+
  No Parameters - Returns Nothing
  00186254: 3c028019 lui r2,0x8019
+
  00186258: 8c422d94 lw r2,0x2d94(r2) Load Attacker's Data Pointer
+
If Attacker has berserk : XA = 150% of initial value
  0018625c: 00000000 nop
+
If Attacker has frog : XA = 0x01
  00186260: 9042005a lbu r2,0x005a(r2) Load Attacker's 3rd set of statuses
+
--------------------------------------------------------------------------------------------------------------
  00186264: 00000000 nop
+
  00186254: 3c028019 lui r2,0x8019           |
  00186268: 30420008 andi r2,r2,0x0008
+
  00186258: 8c422d94 lw r2,0x2d94(r2)         |{{f/adr|<nowiki>r2 = Attacker's Data Pointer</nowiki>}}
  0018626c: 1040000b beq r2,r0,0x0018629c Branch if Attacker is not Berserk
+
  0018625c: 00000000 nop                     |
  00186270: 00000000 nop
+
  00186260: 9042005a lbu r2,0x005a(r2)       |{{f/load|<nowiki>r2 = Attacker's 3rd set of Statuses byte</nowiki>}}
  00186274: 3c048019 lui r4,0x8019
+
  00186264: 00000000 nop                     |
  00186278: 248438ce addiu r4,r4,0x38ce
+
  00186268: 30420008 andi r2,r2,0x0008       |{{f/std|<nowiki>r2 = 0x08 if Attacker has berserk</nowiki>}}
  0018627c: 84830000 lh r3,0x0000(r4) Load XA
+
  0018626c: 1040000b beq r2,r0,0x0018629c     {{f/Cond|If Attacker has berserk}}
  00186280: 00000000 nop
+
  00186270: 00000000 nop                         |
  00186284: 00031040 sll r2,r3,0x01 XA * 2
+
  00186274: 3c048019 lui r4,0x8019               |
  00186288: 00431021 addu r2,r2,r3 XA * 3
+
  00186278: 248438ce addiu r4,r4,0x38ce           |{{f/adr|<nowiki>r4 = Ability XA pointer</nowiki>}}      {{f/std|0x801938ce / 801938ce}}
  0018628c: 00021fc2 srl r3,r2,0x1f
+
  0018627c: 84830000 lh r3,0x0000(r4)             |{{f/load|<nowiki>r3 = Ability XA</nowiki>}}
  00186290: 00431021 addu r2,r2,r3
+
  00186280: 00000000 nop                         |
  00186294: 00021043 sra r2,r2,0x01 XA * 3 / 2
+
  00186284: 00031040 sll r2,r3,0x01               |{{f/std|XA * 2}}
  00186298: a4820000 sh r2,0x0000(r4) Store new XA
+
  00186288: 00431021 addu r2,r2,r3               |{{f/std|XA * 3}}
  0018629c: 3c028019 lui r2,0x8019
+
  0018628c: 00021fc2 srl r3,r2,0x1f               |{{f/std|<nowiki>r3 = Higher bit of r2 (should be 0x00)</nowiki>}}
  001862a0: 8c422d94 lw r2,0x2d94(r2) Load Attacker's Data Pointer
+
  00186290: 00431021 addu r2,r2,r3               |
  001862a4: 00000000 nop
+
  00186294: 00021043 sra r2,r2,0x01               |{{f/std|<nowiki>r2 = XA*3/2</nowiki>}}
  001862a8: 9042005a lbu r2,0x005a(r2) Load Attacker's 3rd set of statuses
+
  00186298: a4820000 sh r2,0x0000(r4)             |{{f/store|Store XA (150% of initial value)}}
  001862ac: 00000000 nop
+
  0018629c: 3c028019 lui r2,0x8019           |
  001862b0: 30420002 andi r2,r2,0x0002
+
  001862a0: 8c422d94 lw r2,0x2d94(r2)         |{{f/adr|<nowiki>r2 = Attacker data pointer</nowiki>}}
  001862b4: 10400003 beq r2,r0,0x001862c4 Branch if Attacker is not a Frog
+
  001862a4: 00000000 nop                     |
  001862b8: 34020001 ori r2,r0,0x0001
+
  001862a8: 9042005a lbu r2,0x005a(r2)       |{{f/load|<nowiki>r2 = Attacker's 3rd set of Statuses byte</nowiki>}}
  001862bc: 3c018019 lui r1,0x8019
+
  001862ac: 00000000 nop                     |
  001862c0: a42238ce sh r2,0x38ce(r1) Store XA = 1
+
  001862b0: 30420002 andi r2,r2,0x0002       |{{f/std|<nowiki>r2 = 0x02 if Attacker is a frog</nowiki>}}
  001862c4: 03e00008 jr r31
+
  001862b4: 10400003 beq r2,r0,0x001862c4     {{f/Cond|If Attacker is a frog}}
  001862c8: 00000000 nop
+
  001862b8: 34020001 ori r2,r0,0x0001             |{{f/std|<nowiki>r2 = 0x01</nowiki>}}
 
+
  001862bc: 3c018019 lui r1,0x8019               |
== Return Locations ==
+
  001862c0: a42238ce sh r2,0x38ce(r1)             |{{f/store|<nowiki>Store XA = 1</nowiki>}}
 
+
  001862c4: 03e00008 jr r31                   END   
*Battle.bin
+
  001862c8: 00000000 nop
  00188608: [[Physical XA Modifying Statuses/Support ]]
+
=== Return Locations ===
  00188ae4: [[Magical XA * YA]]
+
'''Battle.bin'''
  00189898: [[28 StealExp_(Lowest of TarCurExp & SP+Y) Hit_(SP+X)%]]
+
  00188610: [[Physical XA Modifying Statuses/Support ]]
  00189e40: [[33 Hit_(PA+X)%]]
+
  00188aec: [[Magical XA * YA]]
 +
  001898a0: [[28 StealExp_(Lowest of TarCurExp & SP+Y) Hit_(SP+X)%]]
 +
  00189e48: [[33 Hit_(PA+X)%]]

Latest revision as of 21:01, 26 March 2022

No Parameters - Returns Nothing

If Attacker has berserk : XA = 150% of initial value
If Attacker has frog : XA = 0x01
--------------------------------------------------------------------------------------------------------------
00186254: 3c028019 lui r2,0x8019            |
00186258: 8c422d94 lw r2,0x2d94(r2)         |r2 = Attacker's Data Pointer
0018625c: 00000000 nop                      |
00186260: 9042005a lbu r2,0x005a(r2)        |r2 = Attacker's 3rd set of Statuses byte
00186264: 00000000 nop                      |
00186268: 30420008 andi r2,r2,0x0008        |r2 = 0x08 if Attacker has berserk
0018626c: 1040000b beq r2,r0,0x0018629c     #If Attacker has berserk
00186270: 00000000 nop                          |
00186274: 3c048019 lui r4,0x8019                |
00186278: 248438ce addiu r4,r4,0x38ce           |r4 = Ability XA pointer       0x801938ce / 801938ce
0018627c: 84830000 lh r3,0x0000(r4)             |r3 = Ability XA
00186280: 00000000 nop                          |
00186284: 00031040 sll r2,r3,0x01               |XA * 2
00186288: 00431021 addu r2,r2,r3                |XA * 3
0018628c: 00021fc2 srl r3,r2,0x1f               |r3 = Higher bit of r2 (should be 0x00)
00186290: 00431021 addu r2,r2,r3                |
00186294: 00021043 sra r2,r2,0x01               |r2 = XA*3/2
00186298: a4820000 sh r2,0x0000(r4)             |Store XA (150% of initial value)
0018629c: 3c028019 lui r2,0x8019            |
001862a0: 8c422d94 lw r2,0x2d94(r2)         |r2 = Attacker data pointer
001862a4: 00000000 nop                      |
001862a8: 9042005a lbu r2,0x005a(r2)        |r2 = Attacker's 3rd set of Statuses byte
001862ac: 00000000 nop                      |
001862b0: 30420002 andi r2,r2,0x0002        |r2 = 0x02 if Attacker is a frog
001862b4: 10400003 beq r2,r0,0x001862c4     #If Attacker is a frog
001862b8: 34020001 ori r2,r0,0x0001             |r2 = 0x01
001862bc: 3c018019 lui r1,0x8019                |
001862c0: a42238ce sh r2,0x38ce(r1)             |Store XA = 1 
001862c4: 03e00008 jr r31                   END    
001862c8: 00000000 nop  

Return Locations

Battle.bin
00188610: Physical XA Modifying Statuses/Support 
00188aec: Magical XA * YA
001898a0: 28 StealExp_(Lowest of TarCurExp & SP+Y) Hit_(SP+X)%
00189e48: 33 Hit_(PA+X)%