Remove charging status/ability CT
Jump to navigation
Jump to search
Parameter r4 = Unit data pointer r5 = Disabling charge flag (0x00 if not disabling) Returns : r2 = 0x00 if unit is not charging via charge skillset r2 = 0x01 if unit is charging via charge skillset r2 = 0x01 if unit is ridden by a unit charging via charge skillset ------------------------------------------------------------------------------------------------------------ 00180178: 27bdffe8 addiu r29,r29,-0x0018 | 0018017c: afbf0010 sw r31,0x0010(r29) | 00180180: 90820058 lbu r2,0x0058(r4) |Load 1st set of Unit current status 00180184: 00000000 nop | 00180188: 30420008 andi r2,r2,0x0008 |Check for charging 0018018c: 1040000f beq r2,r0,0x001801cc #If Unit Is charging 00180190: 340200ff ori r2,r0,0x00ff |r2 = 0x00ff 00180194: 9083015d lbu r3,0x015d(r4) |Load Unit current Ability CT 00180198: 00000000 nop | 0018019c: 1062000b beq r3,r2,0x001801cc #If Current ability has a CT (not 0x00ff) 001801a0: 34020008 ori r2,r0,0x0008 |r2 = 0x0008 (charge skillset ID) 001801a4: 9083016f lbu r3,0x016f(r4) |load skillset of attack 001801a8: 00000000 nop | 001801ac: 14620007 bne r3,r2,0x001801cc #If Skillset is Charge 001801b0: 00000000 nop | 001801b4: 10a00012 beq r5,r0,0x00180200 #If disabling flag is ON (parameter r5 <> 0x00) Else branch to END with r2 = 0x01 001801b8: 34020001 ori r2,r0,0x0001 |r2 = 0x01 001801bc: 0c060084 jal 0x00180210 |-->Disable_acting_statuses 001801c0: 00000000 nop | 001801c4: 08060080 j 0x00180200 >>Jump to END with r2 = 0x01 001801c8: 34020001 ori r2,r0,0x0001 |r2 = 0x01 #Else : Unit is not charging 001801cc: 90830182 lbu r3,0x0182(r4) |Load Unit mount info 001801d0: 00000000 nop | 001801d4: 30620040 andi r2,r3,0x0040 |Check if unit is being ridden 001801d8: 10400008 beq r2,r0,0x001801fc #If Unit is being ridden 001801dc: 3062001f andi r2,r3,0x001f |Load ID of the ridding unit 001801e0: 000218c0 sll r3,r2,0x03 |ID * 8 001801e4: 00621823 subu r3,r3,r2 |ID * 7 001801e8: 00031980 sll r3,r3,0x06 |ID * 448 (unit table data size) 001801ec: 3c028019 lui r2,0x8019 | 001801f0: 244208cc addiu r2,r2,0x08cc | 001801f4: 08060060 j 0x00180180 >>Jump back with ridding unit ID and check for charging via charge skillset 001801f8: 00622021 addu r4,r3,r2 |r4 = Rdding unit data pointer #Else : Unit is not being ridden 001801fc: 00001021 addu r2,r0,r0 |Return 0x00 (not charging?) 00180200: 8fbf0010 lw r31,0x0010(r29) END 00180204: 27bd0018 addiu r29,r29,0x0018 00180208: 03e00008 jr r31 0018020c: 00000000 nop
Return location
Battle.bin 000722bc: Main_Post_Movement r5 = 0x01 00180100: Set_target_for_mounted_unit,_move_find_item/trap r5 = 0x00 0018c494: Attack Finalisation & Reaction Flagging r5 = 0x00