
//============================================================================
/**
 *
 *@file		sub_069.s
 *@brief	戦闘シーケンス
 *			やどりぎのたね効果発動シーケンス

 *@author	HisashiSogabe
 *@data		2006.01.19
 *
 */
//============================================================================
	.text

	.include	"waza_seq_def.h"

SUB_069:
	STATUS_EFFECT2	SIDE_ATTACK_WORK,SIDE_DEFENCE_WORK,STATUS_DAMAGE_YADORIGI
	SERVER_WAIT
	//HPMAXの1/8
	PSP_VALUE_WORK	VAL_GET,SIDE_DEFENCE_WORK,ID_PSP_hpmax,BUF_PARA_HP_CALC_WORK
	DAMAGE_DIV		BUF_PARA_HP_CALC_WORK,8
	VALUE			VAL_MUL,BUF_PARA_HP_CALC_WORK,-1
	//ダメージエフェクトで点滅しないフラグを立てる
	VALUE			VAL_BIT,BUF_PARA_SERVER_STATUS_FLAG,SERVER_STATUS_FLAG_NO_BLINK
	//HP操作対象をDefenceClientに
	VALUE_WORK		VAL_SET,BUF_PARA_CLIENT_WORK,BUF_PARA_DEFENCE_CLIENT_WORK
	GOSUB			SUB_SEQ_HP_CALC
	//実際に与えたダメージ量を取得
	VALUE_WORK		VAL_SET,BUF_PARA_HP_CALC_WORK,BUF_PARA_HIT_DAMAGE
	//装備効果で吸い取る系の威力アップは、威力アップ
	SOUBI_CHECK		SOUBI_NO_HAVE,SIDE_ATTACK_WORK,SOUBI_KYUSYUURYOKUUP,SUB_069_NEXT
	SOUBI_ATK_GET	SIDE_ATTACK_WORK,BUF_PARA_CALC_WORK
	VALUE			VAL_ADD,BUF_PARA_CALC_WORK,100
	VALUE_WORK		VAL_MUL,BUF_PARA_HP_CALC_WORK,BUF_PARA_CALC_WORK
	VALUE			VAL_DIV,BUF_PARA_HP_CALC_WORK,100
SUB_069_NEXT:
	//HP操作対象をAttackClientに
	VALUE_WORK		VAL_SET,BUF_PARA_CLIENT_WORK,BUF_PARA_ATTACK_CLIENT_WORK
	//ダメージエフェクトで点滅しないフラグを立てる
	VALUE			VAL_BIT,BUF_PARA_SERVER_STATUS_FLAG,SERVER_STATUS_FLAG_NO_BLINK
	//ヘドロえきをもっている相手からは、ダメージ
	TOKUSEI_CHECK	TOKUSEI_HAVE,SIDE_DEFENCE_WORK,TOKUSYU_HEDOROEKI,Hedoroeki
Normal:
	IF_PSP			IF_FLAG_NE,SIDE_WORK,ID_PSP_wkw_healblock_count,0,Healblock
	//回復のために符号反転
	VALUE			VAL_MUL,BUF_PARA_HP_CALC_WORK,-1
	GOSUB			SUB_SEQ_HP_CALC
	MESSAGE			YadorigiSuckMineMsg,TAG_NICK,SIDE_DEFENCE_WORK
	SERVER_WAIT
	WAIT			MSG_WAIT
	SEQ_END
Healblock:
	VALUE			VAL_SET,BUF_PARA_WAZA_WORK,WAZANO_KAIHUKUHUUZI
	MESSAGE			HealblockRecoverNGMineMsg,TAG_NICK_WAZA,SIDE_WORK,SIDE_WORK
	SERVER_WAIT
	WAIT			MSG_WAIT
	SEQ_END
Hedoroeki:
	//マジックガードをもっている場合はヘドロダメージなし
	TOKUSEI_CHECK	TOKUSEI_HAVE,SIDE_ATTACK_WORK,TOKUSYU_MAZIKKUGAADO,TokuseiGuard
	GOSUB			SUB_SEQ_HP_CALC
	MESSAGE			HedoroekiMsg,TAG_NONE
	SERVER_WAIT
	WAIT			MSG_WAIT
SUB_069_END:
	SEQ_END

TokuseiGuard:
	MESSAGE			HedoroekiMsg,TAG_NONE
	SERVER_WAIT
	WAIT			MSG_WAIT
	MESSAGE			TokuseiNoTokuseiM2MMsg,TAG_NICK_TOKU_NICK_TOKU,SIDE_ATTACK_WORK,SIDE_ATTACK_WORK,SIDE_DEFENCE_WORK,SIDE_DEFENCE_WORK
	SERVER_WAIT
	WAIT			MSG_WAIT
	SEQ_END

