#include "CS_Boss_GroupHpBar.h"

CS_Boss_GroupHpBar::CS_Boss_GroupHpBar()
{
	hp = hp_max = 100;
}

void CS_Boss_GroupHpBar::SetState(int stateID, int lr)
{
	if (lr == 1)
		hp = hp_max = stateID;
}

bool CS_Boss_GroupHpBar::Hurt(std::weak_ptr<Entity> src, int getDamage, float angle, bool bTakedown, int elemType, float shockForce, float heavy, int* outRealDamage)
{
	*outRealDamage = getDamage;
	shock_counter = 30;
	hp -= getDamage;
	if (hp <= 0)
		hp = 0;
	return true;
}

std::shared_ptr<Entity> CreateCS_Boss_GroupHpBar()
{
	return std::make_shared<CS_Boss_GroupHpBar>();
}
