肉鸽
This commit is contained in:
parent
07c11aded9
commit
d8a9bc459d
@ -377,6 +377,11 @@ local BUFF_NAME = {
|
|||||||
FOREVER_THORNS = "forever_thorns",
|
FOREVER_THORNS = "forever_thorns",
|
||||||
RANDOM_UNIVERSAL = "random_universal",
|
RANDOM_UNIVERSAL = "random_universal",
|
||||||
MAIN_HERO_ENERGYADD = "main_hero_energyadd",
|
MAIN_HERO_ENERGYADD = "main_hero_energyadd",
|
||||||
|
RED_REFRESH_WEIGHT = "red_refresh_weight",
|
||||||
|
YELLOW_REFRESH_WEIGHT = "yellow_refresh_weight",
|
||||||
|
GREEN_REFRESH_WEIGHT = "green_refresh_weight",
|
||||||
|
BLUE_REFRESH_WEIGHT = "blue_refresh_weight",
|
||||||
|
PURPLE_REFRESH_WEIGHT = "purple_refresh_weight",
|
||||||
}
|
}
|
||||||
BattleConst.BUFF_NAME = BUFF_NAME
|
BattleConst.BUFF_NAME = BUFF_NAME
|
||||||
|
|
||||||
|
|||||||
@ -2318,7 +2318,12 @@ function BattleBaseController:getRandomGridInfo()
|
|||||||
-- local index = GFunc.getRandomIndex(self.getRandomGridInfoIndexs)
|
-- local index = GFunc.getRandomIndex(self.getRandomGridInfoIndexs)
|
||||||
-- elementType = self.getRandomGridInfoTypeList[index]
|
-- elementType = self.getRandomGridInfoTypeList[index]
|
||||||
-- end
|
-- end
|
||||||
local elementType = math.random(1, BattleConst.ELEMENT_TYPE.PURPLE)
|
local weights = {2000, 2000, 2000, 2000, 2000}
|
||||||
|
local extWeights = self.atkTeam:getElementExtRatio()
|
||||||
|
for i,v in ipairs(weights) do
|
||||||
|
weights[i] = weights[i] + (extWeights[i] or 0)
|
||||||
|
end
|
||||||
|
local elementType = GFunc.getRandomIndex(weights)
|
||||||
local isUniversal = false
|
local isUniversal = false
|
||||||
if self.atkTeam:checkUniversal() and not self.battleData:hadUniversalGrid() then
|
if self.atkTeam:checkUniversal() and not self.battleData:hadUniversalGrid() then
|
||||||
isUniversal = true
|
isUniversal = true
|
||||||
|
|||||||
@ -703,6 +703,24 @@ function BattleTeam:hadUMainHeroExtAddBuff()
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function BattleTeam:getElementExtRatio()
|
||||||
|
local weights = {}
|
||||||
|
for i,v in ipairs(self.buffList) do
|
||||||
|
if v.buff:getName() == BattleConst.BUFF_NAME.RED_REFRESH_WEIGHT then
|
||||||
|
weights[BattleConst.ELEMENT_TYPE.RED] = v.buff:getEffectNum()
|
||||||
|
elseif v.buff:getName() == BattleConst.BUFF_NAME.GREEN_REFRESH_WEIGHT then
|
||||||
|
weights[BattleConst.ELEMENT_TYPE.GREEN] = v.buff:getEffectNum()
|
||||||
|
elseif v.buff:getName() == BattleConst.BUFF_NAME.YELLOW_REFRESH_WEIGHT then
|
||||||
|
weights[BattleConst.ELEMENT_TYPE.YELLOW] = v.buff:getEffectNum()
|
||||||
|
elseif v.buff:getName() == BattleConst.BUFF_NAME.BLUE_REFRESH_WEIGHT then
|
||||||
|
weights[BattleConst.ELEMENT_TYPE.BLUE] = v.buff:getEffectNum()
|
||||||
|
elseif v.buff:getName() == BattleConst.BUFF_NAME.PURPLE_REFRESH_WEIGHT then
|
||||||
|
weights[BattleConst.ELEMENT_TYPE.PURPLE] = v.buff:getEffectNum()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return weights
|
||||||
|
end
|
||||||
|
|
||||||
-- 检查是否带有万能块buff
|
-- 检查是否带有万能块buff
|
||||||
function BattleTeam:checkUniversal()
|
function BattleTeam:checkUniversal()
|
||||||
if self:hadUniversalBuff() then
|
if self:hadUniversalBuff() then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user