// abilities/item_cheese_custom.lua
item_cheese_custom = class({})
LinkLuaModifier("modifier_item_cheese_custom", "abilities/item_cheese_custom", LUA_MODIFIER_MOTION_NONE)
LinkLuaModifier("modifier_item_cheese_custom_passive", "abilities/item_cheese_custom", LUA_MODIFIER_MOTION_NONE)
function item_cheese_custom:GetIntrinsicModifierName()
return "modifier_item_cheese_custom"
end
function item_cheese_custom:OnToggle()
self:GetCaster():AddNewModifier(self:GetCaster(), nil, "modifier_item_cheese_custom_passive", {})
self:Destroy()
end
modifier_item_cheese_custom = class({
IsHidden = function(self) return true end,
IsPurgable = function(self) return false end,
IsDebuff = function(self) return false end,
IsBuff = function(self) return true end,
RemoveOnDeath = function(self) return false end,
DeclareFunctions = function(self)
return {
MODIFIER_PROPERTY_STATS_STRENGTH_BONUS,
}
end,
})
function modifier_item_cheese_custom:OnCreated(params)
bonus_str = self:GetAbility():GetSpecialValueFor("bonus_str")
end
function modifier_item_cheese_custom:GetModifierBonusStats_Strength()
return bonus_str
end
modifier_item_cheese_custom_passive = class({
IsHidden = function(self) return false end,
IsPurgable = function(self) return false end,
IsDebuff = function(self) return false end,
IsBuff = function(self) return true end,
RemoveOnDeath = function(self) return true end,
DeclareFunctions = function(self)
return {
MODIFIER_PROPERTY_STATS_STRENGTH_BONUS,
}
end,
})
function modifier_item_cheese_custom_passive:GetModifierBonusStats_Strength()
return bonus_str
end