
//============================================================================
/**
 *
 *@file		sub_171.s
 *@brief	戦闘シーケンス
 *			きりはらい追加効果シーケンス
 *@author	HisashiSogabe
 *@data		2006.02.15
 *
 */
//============================================================================
	.text

	.include	"waza_seq_def.h"

SUB_171:
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_NZ_CHECK,SCC_butsuri_guard_count,					SUB_171_NEXT
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_NZ_CHECK,SCC_tokusyu_guard_count,					SUB_171_NEXT
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_NZ_CHECK,SCC_shiroikiri_count,					SUB_171_NEXT
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_NZ_CHECK,SCC_shinpi_count,						SUB_171_NEXT
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_NZ_CHECK,SCC_makibisi_count,						SUB_171_NEXT
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_NZ_CHECK,SCC_dokubisi_count,						SUB_171_NEXT
	IF						IF_FLAG_BIT,BUF_PARA_SIDE_CONDITION_DEFENCE,SIDE_CONDITION_STEALTHROCK,	SUB_171_NEXT
	IF						IF_FLAG_BIT,BUF_PARA_FIELD_CONDITION,FIELD_CONDITION_HUKAIKIRI,			SUB_171_NEXT
	BRANCH					SUB_171_START
SUB_171_NEXT:
	GOSUB					SUB_SEQ_WAZA_OUT_EFF
SUB_171_START:
	//回避を1段階下げるをセット
	VALUE					VAL_SET,BUF_PARA_TSUIKA_PARA,ADD_COND2_AVOIDDOWN
	GOSUB					SUB_SEQ_ABICNT_CALC

	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_Z_CHECK,SCC_butsuri_guard_count,					SUB_171_NEXT1
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_CLEAR,SCC_butsuri_guard_count,					SUB_171_NEXT1
	VALUE					VAL_SET,BUF_PARA_WAZA_WORK,WAZANO_RIHUREKUTAA
	GOSUB					SUB_SEQ_KIRIHARAI_MSG

SUB_171_NEXT1:
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_Z_CHECK,SCC_tokusyu_guard_count,					SUB_171_NEXT2
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_CLEAR,SCC_tokusyu_guard_count,					SUB_171_NEXT2
	VALUE					VAL_SET,BUF_PARA_WAZA_WORK,WAZANO_HIKARINOKABE
	GOSUB					SUB_SEQ_KIRIHARAI_MSG

SUB_171_NEXT2:
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_Z_CHECK,SCC_shiroikiri_count,						SUB_171_NEXT3
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_CLEAR,SCC_shiroikiri_count,						SUB_171_NEXT3
	VALUE					VAL_SET,BUF_PARA_WAZA_WORK,WAZANO_SIROIKIRI
	GOSUB					SUB_SEQ_KIRIHARAI_MSG

SUB_171_NEXT3:
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_Z_CHECK,SCC_shinpi_count,							SUB_171_NEXT4
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_CLEAR,SCC_shinpi_count,							SUB_171_NEXT4
	VALUE					VAL_SET,BUF_PARA_WAZA_WORK,WAZANO_SINPINOMAMORI
	GOSUB					SUB_SEQ_KIRIHARAI_MSG

SUB_171_NEXT4:
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_Z_CHECK,SCC_makibisi_count,						SUB_171_NEXT5
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_CLEAR,SCC_makibisi_count,							SUB_171_NEXT5
	VALUE					VAL_NBIT,BUF_PARA_SIDE_CONDITION_DEFENCE,SIDE_CONDITION_MAKIBISHI
	VALUE					VAL_SET,BUF_PARA_WAZA_WORK,WAZANO_MAKIBISI
	GOSUB					SUB_SEQ_KIRIHARAI_MSG

SUB_171_NEXT5:
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_Z_CHECK,SCC_dokubisi_count,						SUB_171_NEXT6
	SIDE_CONDITION_CHECK	SIDE_DEFENCE,SCC_MODE_CLEAR,SCC_dokubisi_count,							SUB_171_NEXT6
	VALUE					VAL_SET,BUF_PARA_WAZA_WORK,WAZANO_DOKUBISI
	GOSUB					SUB_SEQ_KIRIHARAI_MSG

SUB_171_NEXT6:
	IF						IF_FLAG_NBIT,BUF_PARA_SIDE_CONDITION_DEFENCE,SIDE_CONDITION_STEALTHROCK,SUB_171_NEXT7
	VALUE					VAL_NBIT,BUF_PARA_SIDE_CONDITION_DEFENCE,SIDE_CONDITION_STEALTHROCK
	VALUE					VAL_SET,BUF_PARA_WAZA_WORK,WAZANO_SUTERUSUROKKU
	GOSUB					SUB_SEQ_KIRIHARAI_MSG

SUB_171_NEXT7:
	IF						IF_FLAG_NBIT,BUF_PARA_FIELD_CONDITION,FIELD_CONDITION_HUKAIKIRI,SUB_171_END
	VALUE					VAL_NBIT,BUF_PARA_FIELD_CONDITION,FIELD_CONDITION_HUKAIKIRI
	MESSAGE					KiriharaiHukaikiriEndMineMsg,TAG_NICK_WAZA,SIDE_ATTACK,SIDE_ATTACK
	SERVER_WAIT
	WAIT					MSG_WAIT

SUB_171_END:
	SEQ_END

