
//============================================================================
/**
 *
 *@file		sub_168.s
 *@brief	戦闘シーケンス
 *			ハートスワップシーケンス
 *@author	HisashiSogabe
 *@data		2006.02.15
 *
 */
//============================================================================
	.text

	.include	"waza_seq_def.h"

SUB_168:
	IF				IF_FLAG_BIT,BUF_PARA_WAZA_STATUS_FLAG,WAZA_STATUS_FLAG_NOHIT_CHG,Umakukimaran
	GOSUB			SUB_SEQ_WAZA_OUT_EFF
	PSP_VALUE_WORK	VAL_GET,SIDE_ATTACK,ID_PSP_abiritycnt_pow,BUF_PARA_CALC_WORK
	PSP_VALUE_WORK	VAL_GET,SIDE_DEFENCE,ID_PSP_abiritycnt_pow,BUF_PARA_TEMP_WORK
	PSP_VALUE_WORK	VAL_SET,SIDE_ATTACK,ID_PSP_abiritycnt_pow,BUF_PARA_TEMP_WORK
	PSP_VALUE_WORK	VAL_SET,SIDE_DEFENCE,ID_PSP_abiritycnt_pow,BUF_PARA_CALC_WORK

	PSP_VALUE_WORK	VAL_GET,SIDE_ATTACK,ID_PSP_abiritycnt_def,BUF_PARA_CALC_WORK
	PSP_VALUE_WORK	VAL_GET,SIDE_DEFENCE,ID_PSP_abiritycnt_def,BUF_PARA_TEMP_WORK
	PSP_VALUE_WORK	VAL_SET,SIDE_ATTACK,ID_PSP_abiritycnt_def,BUF_PARA_TEMP_WORK
	PSP_VALUE_WORK	VAL_SET,SIDE_DEFENCE,ID_PSP_abiritycnt_def,BUF_PARA_CALC_WORK

	PSP_VALUE_WORK	VAL_GET,SIDE_ATTACK,ID_PSP_abiritycnt_spepow,BUF_PARA_CALC_WORK
	PSP_VALUE_WORK	VAL_GET,SIDE_DEFENCE,ID_PSP_abiritycnt_spepow,BUF_PARA_TEMP_WORK
	PSP_VALUE_WORK	VAL_SET,SIDE_ATTACK,ID_PSP_abiritycnt_spepow,BUF_PARA_TEMP_WORK
	PSP_VALUE_WORK	VAL_SET,SIDE_DEFENCE,ID_PSP_abiritycnt_spepow,BUF_PARA_CALC_WORK

	PSP_VALUE_WORK	VAL_GET,SIDE_ATTACK,ID_PSP_abiritycnt_spedef,BUF_PARA_CALC_WORK
	PSP_VALUE_WORK	VAL_GET,SIDE_DEFENCE,ID_PSP_abiritycnt_spedef,BUF_PARA_TEMP_WORK
	PSP_VALUE_WORK	VAL_SET,SIDE_ATTACK,ID_PSP_abiritycnt_spedef,BUF_PARA_TEMP_WORK
	PSP_VALUE_WORK	VAL_SET,SIDE_DEFENCE,ID_PSP_abiritycnt_spedef,BUF_PARA_CALC_WORK

	PSP_VALUE_WORK	VAL_GET,SIDE_ATTACK,ID_PSP_abiritycnt_agi,BUF_PARA_CALC_WORK
	PSP_VALUE_WORK	VAL_GET,SIDE_DEFENCE,ID_PSP_abiritycnt_agi,BUF_PARA_TEMP_WORK
	PSP_VALUE_WORK	VAL_SET,SIDE_ATTACK,ID_PSP_abiritycnt_agi,BUF_PARA_TEMP_WORK
	PSP_VALUE_WORK	VAL_SET,SIDE_DEFENCE,ID_PSP_abiritycnt_agi,BUF_PARA_CALC_WORK

	PSP_VALUE_WORK	VAL_GET,SIDE_ATTACK,ID_PSP_abiritycnt_hit,BUF_PARA_CALC_WORK
	PSP_VALUE_WORK	VAL_GET,SIDE_DEFENCE,ID_PSP_abiritycnt_hit,BUF_PARA_TEMP_WORK
	PSP_VALUE_WORK	VAL_SET,SIDE_ATTACK,ID_PSP_abiritycnt_hit,BUF_PARA_TEMP_WORK
	PSP_VALUE_WORK	VAL_SET,SIDE_DEFENCE,ID_PSP_abiritycnt_hit,BUF_PARA_CALC_WORK

	PSP_VALUE_WORK	VAL_GET,SIDE_ATTACK,ID_PSP_abiritycnt_avoid,BUF_PARA_CALC_WORK
	PSP_VALUE_WORK	VAL_GET,SIDE_DEFENCE,ID_PSP_abiritycnt_avoid,BUF_PARA_TEMP_WORK
	PSP_VALUE_WORK	VAL_SET,SIDE_ATTACK,ID_PSP_abiritycnt_avoid,BUF_PARA_TEMP_WORK
	PSP_VALUE_WORK	VAL_SET,SIDE_DEFENCE,ID_PSP_abiritycnt_avoid,BUF_PARA_CALC_WORK

	PSP_VALUE_WORK	VAL_GET,SIDE_ATTACK,ID_PSP_condition2,BUF_PARA_CALC_WORK
	PSP_VALUE_WORK	VAL_GET,SIDE_DEFENCE,ID_PSP_condition2,BUF_PARA_TEMP_WORK

	IF				IF_FLAG_BIT,BUF_PARA_CALC_WORK,CONDITION2_KIAIDAME,DefenceOn
DefenceOff:
	PSP_VALUE		VAL_NBIT,SIDE_DEFENCE,ID_PSP_condition2,CONDITION2_KIAIDAME
	BRANCH			AttackCheck
DefenceOn:
	PSP_VALUE		VAL_BIT,SIDE_DEFENCE,ID_PSP_condition2,CONDITION2_KIAIDAME

AttackCheck:
	IF				IF_FLAG_BIT,BUF_PARA_TEMP_WORK,CONDITION2_KIAIDAME,AttackOn
AttackOff:
	PSP_VALUE		VAL_NBIT,SIDE_ATTACK,ID_PSP_condition2,CONDITION2_KIAIDAME
	BRANCH			SUB_168_NEXT
AttackOn:
	PSP_VALUE		VAL_BIT,SIDE_ATTACK,ID_PSP_condition2,CONDITION2_KIAIDAME

SUB_168_NEXT:
	MESSAGE			HeartSwapMineMsg,TAG_NICK,SIDE_ATTACK
	SERVER_WAIT
	WAIT			MSG_WAIT
	SEQ_END

Umakukimaran:
	VALUE			VAL_BIT,BUF_PARA_WAZA_STATUS_FLAG,WAZA_STATUS_FLAG_UMAKUKIMARAN
	SEQ_END
