51 lines
1.3 KiB
Lua
Executable File
51 lines
1.3 KiB
Lua
Executable File
modifier_lily_02_buff = class({})
|
|
|
|
local public = modifier_lily_02_buff
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
function public:IsDebuff()
|
|
return false
|
|
end
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
function public:IsHidden()
|
|
return false
|
|
end
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
function public:IsPurgable()
|
|
return false
|
|
end
|
|
|
|
function public:GetTexture()
|
|
return "touhoutd/thtd_lily_02"
|
|
end
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
function public:OnCreated(kv)
|
|
if IsServer() then
|
|
local target = self:GetParent()
|
|
local ability_damage_up = self:GetAbility():GetSpecialValueFor("damage_up")
|
|
|
|
local playerid = self:GetCaster():GetPlayerOwnerID()
|
|
local crit = 1.0
|
|
if GameRules.player_bb_buff[playerid]["item_3029"] > 0 then
|
|
crit = 1 + GameRules.player_bb_buff[playerid]["item_3029"]/100
|
|
end
|
|
|
|
local bonus = math.floor(ability_damage_up * crit)
|
|
target:AddDamageOutgoingAll(bonus, "thtd_lily_02_damage_up")
|
|
end
|
|
end
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
function public:OnDestroy(kv)
|
|
if IsServer() then
|
|
self:GetParent():AddDamageOutgoingAll("thtd_lily_02_damage_up")
|
|
end
|
|
end |