modifier_bosses_random_attack_speed_effect = class({})

local public = modifier_bosses_random_attack_speed_effect

local m_modifier_funcs=
{
	MODIFIER_PROPERTY_ATTACKSPEED_BONUS_CONSTANT,
}

function public:IsHidden()
	return false
end

function public:IsDebuff()
	return false
end

function public:IsPurgable()
	return false
end

function public:GetTexture()
	return "random_boss_buff_attack_speed"
end

function public:DeclareFunctions()
	return m_modifier_funcs
end

function public:GetModifierAttackSpeedBonus_Constant()
	return -self:GetStackCount()
end

function public:OnCreated(kv)
	if IsServer() then
		local caster = self:GetParent()
		local playerid = caster:GetPlayerOwnerID()
		if GameRules.player_bb_buff[playerid]["item_3013"] > 0 then
			self:SetStackCount(math.floor(GameRules.player_bb_buff[playerid]["item_3013"] * 50))
		end		
	end
end