
//============================================================================
/**
 *
 *@file		sub_264.s
 *@brief	戦闘シーケンス
 *			抜群の威力を弱める装備効果のチェック
 *@author	HisashiSogabe
 *@data		2006.05.19
 *
 */
//============================================================================
	.text

	.include	"waza_seq_def.h"

SUB_264:
	//タイプチェックしなくていいフラグが立っている時は不発
	IF				IF_FLAG_BIT,BUF_PARA_SERVER_STATUS_FLAG,SERVER_STATUS_FLAG_TYPE_FLAT|SERVER_STATUS_FLAG_TYPE_NONE,SUB_264_END
	//一撃必殺は不発
	IF				IF_FLAG_BIT,BUF_PARA_WAZA_STATUS_FLAG,WAZA_STATUS_FLAG_ICHIGEKI,SUB_264_END
	//特性ノーマルスキンはタイプをノーマルに
	TOKUSEI_CHECK	TOKUSEI_NO_HAVE,SIDE_ATTACK,TOKUSYU_NOOMARUSUKIN,NoTokusyu
	VALUE			VAL_SET,BUF_PARA_CALC_WORK,NORMAL_TYPE
	BRANCH			SUB_264_NEXT
NoTokusyu:
	IF				IF_FLAG_EQ,BUF_PARA_WAZA_TYPE,0,TypeGet
	VALUE_WORK		VAL_GET,BUF_PARA_WAZA_TYPE,BUF_PARA_CALC_WORK
	BRANCH			SUB_264_NEXT
TypeGet:
	//技のタイプを取得
	WAZA_PARAM_GET	ID_WTD_wazatype
SUB_264_NEXT:
	//装備効果を取得
	SOUBI_EQP_GET	SIDE_DEFENCE,BUF_PARA_TEMP_WORK
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_NOOMARUHANGEN,		NormalCheck

	IF				IF_FLAG_NBIT,BUF_PARA_WAZA_STATUS_FLAG,WAZA_STATUS_FLAG_BATSUGUN,SUB_264_END
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_HONOWOBATUGUNGUARD,	HonooCheck
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_MIZUBATUGUNGUARD,	MizuCheck
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_DENKIBATUGUNGUARD,	DenkiCheck
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_KUSABATUGUNGUARD,	KusaCheck
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_KOORIBATUGUNGUARD,	KooriCheck
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_KAKUTOUBATUGUNGUARD,KakutouCheck
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_DOKUBATUGUNGUARD,	DokuCheck
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_ZIMENBATUGUNGUARD,	JimenCheck
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_HIKOUBATUGUNGUARD,	HikouCheck
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_ESUPAABATUGUNGUARD,	EsperCheck
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_MUSIGUARD,			MushiCheck
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_IWAGUARD,			IwaCheck
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_GOOSUTOGUARD,		GhostCheck
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_DORAGONGUARD,		DragonCheck
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_AKUGUARD,			AkuCheck
	IF				IF_FLAG_EQ,BUF_PARA_TEMP_WORK,SOUBI_HAGANEGUARD,		MetalCheck
	BRANCH			SUB_264_END
NormalCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,NORMAL_TYPE,DamageHalf
	BRANCH			SUB_264_END
HonooCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,FIRE_TYPE,DamageHalf
	BRANCH			SUB_264_END
MizuCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,WATER_TYPE,DamageHalf
	BRANCH			SUB_264_END
DenkiCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,ELECTRIC_TYPE,DamageHalf
	BRANCH			SUB_264_END
KusaCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,KUSA_TYPE,DamageHalf
	BRANCH			SUB_264_END
KooriCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,KOORI_TYPE,DamageHalf
	BRANCH			SUB_264_END
KakutouCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,BATTLE_TYPE,DamageHalf
	BRANCH			SUB_264_END
DokuCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,POISON_TYPE,DamageHalf
	BRANCH			SUB_264_END
JimenCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,JIMEN_TYPE,DamageHalf
	BRANCH			SUB_264_END
HikouCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,HIKOU_TYPE,DamageHalf
	BRANCH			SUB_264_END
EsperCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,SP_TYPE,DamageHalf
	BRANCH			SUB_264_END
MushiCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,MUSHI_TYPE,DamageHalf
	BRANCH			SUB_264_END
IwaCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,IWA_TYPE,DamageHalf
	BRANCH			SUB_264_END
GhostCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,GHOST_TYPE,DamageHalf
	BRANCH			SUB_264_END
DragonCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,DRAGON_TYPE,DamageHalf
	BRANCH			SUB_264_END
AkuCheck:
	IF				IF_FLAG_EQ,BUF_PARA_CALC_WORK,AKU_TYPE,DamageHalf
	BRANCH			SUB_264_END
MetalCheck:
	IF				IF_FLAG_NE,BUF_PARA_CALC_WORK,METAL_TYPE,SUB_264_END
DamageHalf:
	STATUS_EFFECT	SIDE_DEFENCE,STATUS_ITEM_POKE
	SERVER_WAIT
	DAMAGE_DIV		BUF_PARA_HP_CALC_WORK,2
	MESSAGE			ItemWazaPowDownMsg,TAG_ITEM_WAZA,SIDE_DEFENCE,SIDE_ATTACK
	SERVER_WAIT
	WAIT			MSG_WAIT
//	PSP_VALUE		VAL_SET,SIDE_DEFENCE,ID_PSP_item,0
	KILL_ITEM		SIDE_DEFENCE
SUB_264_END:
	SEQ_END

