Sunken State, Caution, Dragon Spirit, counters, absorbs usability
(Redirected from Sunken State, Caution, Dragon Spirit, etc. usability)
Jump to navigation
Jump to search
Parameters : None If Used Formula ( 0x801938e5 ) = 0x07 (Heal weapon), skip the routine Else if unit can react, check Targeted unit reaction set looking for several abilities. If one is found, roll it and exit (one roll only) If succesfull, Unit 0x19a and 0x1b2 holds new values. ---------------------------------------------------------------------------------------------- 0018cb00: 27bdffe8 addiu r29,r29,-0x0018 | 0018cb04: 3c038019 lui r3,0x8019 | 0018cb08: 906338e5 lbu r3,0x38e5(r3) |r3 = Ability Formula 0018cb0c: 34020007 ori r2,r0,0x0007 |r2 = 0x07 0018cb10: 10620044 beq r3,r2,0x0018cc24 #If not using Formula 0x07 (Heal weapon) /Else branch to END 0018cb14: afbf0010 sw r31,0x0010(r29) | 0018cb18: 3c048019 lui r4,0x8019 | 0018cb1c: 8c842d98 lw r4,0x2d98(r4) |r4 = Targeted Unit's data pointer 0018cb20: 0c063248 jal 0x0018c920 |-->Check_if_unit_can_react_1 returns r2 = 0x00 if Unit can react 0018cb24: 00000000 nop | 0018cb28: 1440003e bne r2,r0,0x0018cc24 #If Targeted Unit can react /Else branch to END 0018cb2c: 00000000 nop | 0018cb30: 3c048019 lui r4,0x8019 | 0018cb34: 8c842d98 lw r4,0x2d98(r4) |r4 = Targeted Unit's data pointer 0018cb38: 00000000 nop | 0018cb3c: 9083008b lbu r3,0x008b(r4) |r3 = Target unit 1st set of Reaction abilities 0018cb40: 00000000 nop | 0018cb44: 30620010 andi r2,r3,0x0010 |r2 = 0x10 if Target unit uses sunken state 0018cb48: 10400003 beq r2,r0,0x0018cb58 #If Targeted Unit uses Sunken State 0018cb4c: 34050010 ori r5,r0,0x0010 |r5 = 0x10 (Ability flag "blade grasp") 0018cb50: 08063307 j 0x0018cc1c >>Jump to Resolution 0018cb54: 340401a9 ori r4,r0,0x01a9 |r4 = 0x1a9 (sunken state ID) 0018cb58: 30620008 andi r2,r3,0x0008 |r2 = 0x08 If Unit uses caution 0018cb5c: 10400003 beq r2,r0,0x0018cb6c #If Targeted Unit uses Caution 0018cb60: 30620004 andi r2,r3,0x0004 |r2 = 0x04 If Targeted Unit uses Dragon spirit 0018cb64: 08063307 j 0x0018cc1c >>Jump to Resolution 0018cb68: 340401aa ori r4,r0,0x01aa |r4 = 0x1aa (Caution ID) 0018cb6c: 10400003 beq r2,r0,0x0018cb7c #If Targeted Unit uses dragon spirit 0018cb70: 34050010 ori r5,r0,0x0010 |r5 = 0x10 0018cb74: 08063307 j 0x0018cc1c >>Jump to Resolution 0018cb78: 340401ab ori r4,r0,0x01ab |r4 = 0x1ab (Dragon spirit ID) 0018cb7c: 30620001 andi r2,r3,0x0001 |r2 = 0x01 if Targeted Unit uses Brave Up 0018cb80: 10400003 beq r2,r0,0x0018cb90 #If Targeted Unit uses Brave Up 0018cb84: 00000000 nop | 0018cb88: 08063307 j 0x0018cc1c >>Jump to Resolution 0018cb8c: 340401ad ori r4,r0,0x01ad |r4 = 0x1ad (Brave Up ID) 0018cb90: 9083008c lbu r3,0x008c(r4) |r3 = Target unit 2nd set of Reaction abilities 0018cb94: 00000000 nop | 0018cb98: 30620080 andi r2,r3,0x0080 |r2 = 0x80 if Targeted Unit uses Face Up 0018cb9c: 10400005 beq r2,r0,0x0018cbb4 #If Targeted unit uses Face Up 0018cba0: 30620002 andi r2,r3,0x0002 |r2 = 0x02 if Targeted Unit uses Counter Tackle 0018cba4: 0c0633dd jal 0x0018cf74 |-->Face_Up_and_Absorb_Used_MP_usability r4 is stored as reaction ID if succesfull 0018cba8: 340401ae ori r4,r0,0x01ae |r4 = 0x1ae (Face Up ID) 0018cbac: 08063309 j 0x0018cc24 >>Jump to END 0018cbb0: 00000000 nop | 0018cbb4: 10400003 beq r2,r0,0x0018cbc4 #if Targeted Unit uses Counter Tackle 0018cbb8: 34050010 ori r5,r0,0x0010 |r5 = 0x10 0018cbbc: 08063307 j 0x0018cc1c >>Jump to Resolution 0018cbc0: 340401b4 ori r4,r0,0x01b4 |r4 = 0x1b4 (Counter Tackle ID) 0018cbc4: 30620001 andi r2,r3,0x0001 |r2 = 0x01 if Targeted Unit uses Counter Flood 0018cbc8: 10400003 beq r2,r0,0x0018cbd8 #If Targeted Unit uses Counter Flood 0018cbcc: 34050080 ori r5,r0,0x0080 |r5 = 0x80 (Counter floodable Ability flag 4) 0018cbd0: 08063307 j 0x0018cc1c >>Jump to Resolution 0018cbd4: 340401b5 ori r4,r0,0x01b5 |r4 = 0x1b5 (Counterflood ID) 0018cbd8: 9084008d lbu r4,0x008d(r4) |r3 = Target unit 3rd set of Reaction abilities 0018cbdc: 00000000 nop | 0018cbe0: 30820080 andi r2,r4,0x0080 |r2 =0x80 if Targeted Unit uses Absorb Used MP 0018cbe4: 10400005 beq r2,r0,0x0018cbfc #if Targeted Unit uses Absorb Used MP 0018cbe8: 30820008 andi r2,r4,0x0008 |r2 = 0x08 if Targeted Unit uses Counter 0018cbec: 0c0633dd jal 0x0018cf74 |-->Face_Up_and_Absorb_Used_MP_usability r4 is stored as reaction ID if succesfull 0018cbf0: 340401b6 ori r4,r0,0x01b6 |r4 = 0x1b6 (Absord used MP ID) 0018cbf4: 08063309 j 0x0018cc24 >>Jump to END 0018cbf8: 00000000 nop | 0018cbfc: 10400003 beq r2,r0,0x0018cc0c #if Targeted Unit uses Counter 0018cc00: 340401ba ori r4,r0,0x01ba |r4 = 0x1ba (Couter Ability ID) 0018cc04: 08063307 j 0x0018cc1c >>Jump to Resolution 0018cc08: 34050010 ori r5,r0,0x0010 |r5 = 0x10 (Ability flag "blade grasp") 0018cc0c: 30620004 andi r2,r3,0x0004 |r2 = 0x04 if Targeted Unit uses Counter Magic ? Strange - Counter Magic is referenced in Reaction set 2 (wiki) 0018cc10: 10400004 beq r2,r0,0x0018cc24 #If Targeted Unit uses Counter Magic /Else branch to END 0018cc14: 340401b3 ori r4,r0,0x01b3 |r4 = 0x1b3 (Counter Magic ID) 0018cc18: 34050040 ori r5,r0,0x0040 |r5 = 0x40 (Counter Magic flag in Ability data) Resolution 0018cc1c: 0c063381 jal 0x0018ce04 |-->Counter,_Counter_Tackle,_Counter_Flood,_Brave_Up,_Dragon_Spirit,_Sunken_State,_and_Caution_Usability 0018cc20: 00000000 nop |r5 is checked in Used Ability flags - r4 is stored as reaction ID if succesfull 0018cc24: 8fbf0010 lw r31,0x0010(r29) | 0018cc28: 27bd0018 addiu r29,r29,0x0018 | 0018cc2c: 03e00008 jr r31 | 0018cc30: 00000000 nop |
Return location
Battle.bin 0018bef4: Attack_Finalisation_&_Reaction_Flagging