c1_lua/lua/app/userdata/battle/skill/battle_buff_entity.lua
2023-04-18 10:36:00 +08:00

60 lines
1.1 KiB
Lua

local BattleBuffEntity = class("BattleBuffEntity", BaseData)
function BattleBuffEntity:ctor()
end
function BattleBuffEntity:init(effectParams, owner)
self.name = effectParams.type
self.effectNum = effectParams.num
self.round = effectParams.round
self.ratio = effectParams.ratio
self.owner = owner
self.buffInfo = ConfigManager:getConfigWithOtherKey("buff", "name")[self.name]
self.buffType = self.buffInfo.buff_type
end
function BattleBuffEntity:setOwner(owner)
self.owner = owner
end
function BattleBuffEntity:getName()
return self.name
end
function BattleBuffEntity:getBuffType()
return self.buffType
end
function BattleBuffEntity:getEffectNum()
return self.effectNum
end
function BattleBuffEntity:setEffectNum(num)
self.effectNum = num
end
function BattleBuffEntity:getFormula()
return self.buffInfo.formula
end
function BattleBuffEntity:getRatio()
return self.ratio
end
function BattleBuffEntity:setRatio(ratio)
self.ratio = ratio
end
function BattleBuffEntity:getRound()
return self.round
end
function BattleBuffEntity:setRound(num)
self.round = num
end
function BattleBuffEntity:getBuffHitFxId()
return nil
end
return BattleBuffEntity