local BattleConst = require "app/module/battle/battle_const" local BattleBuffEntity = class("BattleBuffEntity", BaseData) local BUFF_TYPE_DIRECT_HURT = BattleConst.BUFF_TYPE.DIRECT_HURT function BattleBuffEntity:ctor() end function BattleBuffEntity:init(effectParams, owner, hostSkill) self.name = effectParams.type self.effectNum = effectParams.num self.round = effectParams.round self.ratio = effectParams.ratio self.owner = owner self.hostSkill = hostSkill self.targetSide = nil 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:getHostSkill() return self.hostSkill end function BattleBuffEntity:getDesc() if self.desc == nil then local buff18NInfo = I18N:getConfigWithOtherKey("buff", "name")[self.name] if buff18NInfo then self.desc = buff18NInfo.desc or GConst.EMPTY_STRING else self.desc = GConst.EMPTY_STRING end end return self.desc end function BattleBuffEntity:getBuffType() return self.buffType end function BattleBuffEntity:getIsHurtType() return self.buffType == BUFF_TYPE_DIRECT_HURT 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:getTartgetSide() return self.targetSide end function BattleBuffEntity:setTargetSide(side) self.targetSide = side end function BattleBuffEntity:getStack() return self.buffInfo.stack end function BattleBuffEntity:getDecr() return self.buffInfo.decr end function BattleBuffEntity:getIcon() return self.buffInfo.icon end function BattleBuffEntity:getFxContinued() return self.buffInfo.fx_continued end function BattleBuffEntity:getFxGet() return self.buffInfo.fx_get end function BattleBuffEntity:getFxTake() return self.buffInfo.fx_take end function BattleBuffEntity:getFxDisappear() return self.buffInfo.fx_disappear end return BattleBuffEntity