Difference between revisions of "Sleep Check"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m
 
Line 1: Line 1:
  Sleep Check:
+
  Sleep Check:  
  001875fc: 3c028019 lui r2,0x8019
+
  00187600: 8c422d98 lw r2,0x2d98(r2) Load Defenders Stats
+
No Parameters - Returns nothing
  00187604: 27bdffe8 addiu r29,r29,0xffe8
+
  00187608: afbf0010 sw r31,0x0010(r29)
+
If Target is Sleeping, Forces the Attack to miss
  0018760c: 9042005c lbu r2,0x005c(r2) Load 5th set of Current Status
+
---------------------------------------------------------------
  00187610: 00000000 nop
+
  001875fc: 3c028019 lui r2,0x8019           |
  00187614: 30420010 andi r2,r2,0x0010
+
  00187600: 8c422d98 lw r2,0x2d98(r2)         |{{f/adr|<nowiki>r2 = Target data pointer</nowiki>}}
  00187618: 10400003 beq r2,r0,0x00187628 Branch to end if unit is not sleep
+
  00187604: 27bdffe8 addiu r29,r29,-0x0018    |
  0018761c: 00000000 nop
+
  00187608: afbf0010 sw r31,0x0010(r29)       |
  00187620: 0c0610c3 jal 0x0018430c [[Force_Attack_Miss]]
+
  0018760c: 9042005c lbu r2,0x005c(r2)       |{{f/load|<nowiki>r2 = Target Current Statuses (5th set)</nowiki>}}
  00187624: 00000000 nop
+
  00187610: 00000000 nop                     |
  00187628: 8fbf0010 lw r31,0x0010(r29)
+
  00187614: 30420010 andi r2,r2,0x0010       |{{f/std|<nowiki>r2 = 0x10 if Target has Sleep</nowiki>}}
  0018762c: 27bd0018 addiu r29,r29,0x0018
+
  00187618: 10400003 beq r2,r0,0x00187628     {{f/Cond|If Target is sleeping}}
  00187630: 03e00008 jr r31
+
  0018761c: 00000000 nop                         |
  00187634: 00000000 nop
+
  00187620: 0c0610c3 jal 0x0018430c               |{{f/jal|Force_Attack_Miss|Force_Attack_Miss}} TCA hit flag = 0x00, Evade type = 0x07, Hit% = 0%
 +
  00187624: 00000000 nop                         |
 +
  00187628: 8fbf0010 lw r31,0x0010(r29)       END
 +
  0018762c: 27bd0018 addiu r29,r29,0x0018    
 +
  00187630: 03e00008 jr r31                  
 +
  00187634: 00000000 nop                    
  
 
+
=== Return Locations ===
== Return Locations ==
+
'''Battle.bin'''
 
+
  0018938c: [[1C Hit_(X)%]]
*Battle.bin
+
  001893e8: [[1D Hit_(X)% ]]
  00189384: [[1C Hit_(X)%]]
+
  001899b4: [[2A Hit_(MA+X)% // AffectBraveOrFaith(Y)]]
  001893e0: [[1D Hit_(X)% ]]
 
  001899ac: [[2A Hit_(MA+X)% // AffectBraveOrFaith(Y)]]
 

Latest revision as of 20:10, 17 April 2022

Sleep Check: 

No Parameters - Returns nothing

If Target is Sleeping, Forces the Attack to miss
---------------------------------------------------------------
001875fc: 3c028019 lui r2,0x8019            |
00187600: 8c422d98 lw r2,0x2d98(r2)         |r2 = Target data pointer
00187604: 27bdffe8 addiu r29,r29,-0x0018    |
00187608: afbf0010 sw r31,0x0010(r29)       |
0018760c: 9042005c lbu r2,0x005c(r2)        |r2 = Target Current Statuses (5th set)
00187610: 00000000 nop                      |
00187614: 30420010 andi r2,r2,0x0010        |r2 = 0x10 if Target has Sleep
00187618: 10400003 beq r2,r0,0x00187628     #If Target is sleeping
0018761c: 00000000 nop                          |
00187620: 0c0610c3 jal 0x0018430c               |-->Force_Attack_Miss TCA hit flag = 0x00, Evade type = 0x07, Hit% = 0%
00187624: 00000000 nop                          |
00187628: 8fbf0010 lw r31,0x0010(r29)       END
0018762c: 27bd0018 addiu r29,r29,0x0018     
00187630: 03e00008 jr r31                   
00187634: 00000000 nop                      

Return Locations

Battle.bin
0018938c: 1C Hit_(X)%
001893e8: 1D Hit_(X)% 
001899b4: 2A Hit_(MA+X)% // AffectBraveOrFaith(Y)