Difference between revisions of "Reaction check"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m (Notes and links)
m (Nyzer moved page Reaction check? to Reaction check: Fucking question marks)
 
(3 intermediate revisions by one other user not shown)
Line 3: Line 3:
 
  r4 = unit data
 
  r4 = unit data
 
  Returns r2
 
  Returns r2
     r2 = 0x00 if target 0x019a = 0x00 (Target current action reaction ID)
+
     r2 = 0x00 if target 0x019a = 0x00 (Target current action reaction ID) -  {{f/std|<nowiki>When an ability proc r2 is = 0x00</nowiki>}}
 
     r2 = 0x01 if current ability reaction ID <> 0x00 ( 0x801938c6 ) AND 0x801938c8 = 0x00 (current ability post action flag ?)
 
     r2 = 0x01 if current ability reaction ID <> 0x00 ( 0x801938c6 ) AND 0x801938c8 = 0x00 (current ability post action flag ?)
 
     r2 = 0x02 if target 0x019a <> 0x00 (Target current action reaction ID)
 
     r2 = 0x02 if target 0x019a <> 0x00 (Target current action reaction ID)
 
  -----------------------------------------
 
  -----------------------------------------
 
  0018c9a0: 3c028019 lui r2,0x8019            |
 
  0018c9a0: 3c028019 lui r2,0x8019            |
  0018c9a4: 944238c6 lhu r2,0x38c6(r2)        |{{f/load|<nowiki>r2 = current ability reaction ID</nowiki>}} {{f/std|<nowiki> 0x801938c6 </nowiki>}}
+
  0018c9a4: 944238c6 lhu r2,0x38c6(r2)        |{{f/load|<nowiki>r2 = current ability reaction ID</nowiki>}}  
 
  0018c9a8: 00000000 nop                      |
 
  0018c9a8: 00000000 nop                      |
  0018c9ac: 10400006 beq r2,r0,0x0018c9c8    {{f/Cond|<nowiki>If reaction ID <> 0x00</nowiki>}} /Else branch to target current action reaction ID check
+
  0018c9ac: 10400006 beq r2,r0,0x0018c9c8    {{f/Cond|<nowiki>If Current ability reaction ID <> 0x00</nowiki>}} {{f/std|<nowiki> 0x801938c6 <> 0 </nowiki>}}
  0018c9b0: 00000000 nop                     |
+
  0018c9b0: 00000000 nop                           |
  0018c9b4: 3c028019 lui r2,0x8019           |
+
  0018c9b4: 3c028019 lui r2,0x8019                 |
 
  0018c9b8: 944238c8 lhu r2,0x38c8(r2)            |{{f/load|<nowiki>r2 = ? Flag (pos action ?)</nowiki>}} {{f/std|<nowiki> 0x801938c8</nowiki>}}
 
  0018c9b8: 944238c8 lhu r2,0x38c8(r2)            |{{f/load|<nowiki>r2 = ? Flag (pos action ?)</nowiki>}} {{f/std|<nowiki> 0x801938c8</nowiki>}}
 
  0018c9bc: 00000000 nop                          |
 
  0018c9bc: 00000000 nop                          |
 
  0018c9c0: 10400006 beq r2,r0,0x0018c9dc          {{f/Cond|<nowiki>If post action flag is <> 0x00</nowiki>}} /Else branch to end (r2 = 0x01)
 
  0018c9c0: 10400006 beq r2,r0,0x0018c9dc          {{f/Cond|<nowiki>If post action flag is <> 0x00</nowiki>}} /Else branch to end (r2 = 0x01)
 
  0018c9c4: 34020001 ori r2,r0,0x0001              |{{f/std|<nowiki>r2 = 0x01</nowiki>}}
 
  0018c9c4: 34020001 ori r2,r0,0x0001              |{{f/std|<nowiki>r2 = 0x01</nowiki>}}
  0018c9c8: 8482019a lh r2,0x019a(r4)        |{{f/load|<nowiki>r2 = target current data reaction ID</nowiki>}}
+
  0018c9c8: 8482019a lh r2,0x019a(r4)        '''#'''        |{{f/load|<nowiki>r2 = target current data reaction ID</nowiki>}}
  0018c9cc: 00000000 nop                     |
+
  0018c9cc: 00000000 nop                               |
  0018c9d0: 10400002 beq r2,r0,0x0018c9dc     {{f/Cond|<nowiki>If reaction ID <> 0x00</nowiki>}} /Else branch to end (r2 = 0x00)
+
  0018c9d0: 10400002 beq r2,r0,0x0018c9dc             {{f/Cond|<nowiki>If Unit's reaction ID <> 0x00</nowiki>}} /Else branch to end (r2 = 0x00)
  0018c9d4: 00000000 nop                     |
+
  0018c9d4: 00000000 nop                                   |
  0018c9d8: 34020002 ori r2,r0,0x0002             |{{f/std|<nowiki>r2 = 0x02 (if self reaction ? / Guard reaction ?)</nowiki>}}
+
  0018c9d8: 34020002 ori r2,r0,0x0002                     |{{f/std|<nowiki>r2 = 0x02 (if self reaction ? / Guard reaction ?)</nowiki>}}
 
  0018c9dc: 03e00008 jr r31                         
 
  0018c9dc: 03e00008 jr r31                         
 
  0018c9e0: 00000000 nop     
 
  0018c9e0: 00000000 nop     

Latest revision as of 22:03, 22 December 2024

Reaction check
-----------------------------------------
r4 = unit data
Returns r2
    r2 = 0x00 if target 0x019a = 0x00 (Target current action reaction ID) -  When an ability proc r2 is = 0x00
    r2 = 0x01 if current ability reaction ID <> 0x00 ( 0x801938c6 ) AND 0x801938c8 = 0x00 (current ability post action flag ?)
    r2 = 0x02 if target 0x019a <> 0x00 (Target current action reaction ID)
-----------------------------------------
0018c9a0: 3c028019 lui r2,0x8019            |
0018c9a4: 944238c6 lhu r2,0x38c6(r2)        |r2 = current ability reaction ID 
0018c9a8: 00000000 nop                      |
0018c9ac: 10400006 beq r2,r0,0x0018c9c8     #If Current ability reaction ID <> 0x00  0x801938c6 <> 0 
0018c9b0: 00000000 nop                           |
0018c9b4: 3c028019 lui r2,0x8019                 |
0018c9b8: 944238c8 lhu r2,0x38c8(r2)             |r2 = ? Flag (pos action ?)  0x801938c8
0018c9bc: 00000000 nop                           |
0018c9c0: 10400006 beq r2,r0,0x0018c9dc          #If post action flag is <> 0x00 /Else branch to end (r2 = 0x01)
0018c9c4: 34020001 ori r2,r0,0x0001              |r2 = 0x01
0018c9c8: 8482019a lh r2,0x019a(r4)         #        |r2 = target current data reaction ID
0018c9cc: 00000000 nop                               |
0018c9d0: 10400002 beq r2,r0,0x0018c9dc              #If Unit's reaction ID <> 0x00 /Else branch to end (r2 = 0x00)
0018c9d4: 00000000 nop                                   |
0018c9d8: 34020002 ori r2,r0,0x0002                      |r2 = 0x02 (if self reaction ? / Guard reaction ?)
0018c9dc: 03e00008 jr r31                        
0018c9e0: 00000000 nop    

Return locations

0018c944: Check_if_unit_can_react_1
0018ca1c: 'Reflect',_Blade_Grasp,_and_Arrow_Guard