小兵打关,攻击力改成 战斗力

tcx_xiyou_dev
PC-202302260912\Administrator 2024-05-08 16:16:23 +08:00
parent 0014938817
commit b1cc0f660e
3 changed files with 32 additions and 12 deletions

View File

@ -17,7 +17,7 @@ local fightType -- 1关卡 2副本 3限时怪, 5兽潮, 6新关卡, 7公会boss
local orginLayer
local boxList={}--新将来袭奖励盒子
local boxList2={}--踏碎凌霄奖励盒子
local _NO_JUMP_ROUND = 2
local _NO_JUMP_ROUND = 0
-- 显示跳过战斗使用

View File

@ -13,6 +13,7 @@ local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local aaa=ConfigManager.GetConfigData(ConfigName.SpecialConfig,180).Value
local soliderSettingConfig=ConfigManager.GetConfig(ConfigName.SoldiersSetting)
local soldierStageConfig=ConfigManager.GetConfig(ConfigName.SoldierStageConfig)
local propertyConfig=ConfigManager.GetConfig(ConfigName.PropertyConfig)
local roleConfig=ConfigManager.GetConfig(ConfigName.RoleConfig)
local curSoliderStageConfig
local cost=string.split(aaa,"#")
@ -439,8 +440,11 @@ function FightPointPassMainPanel:BindEvent()
end)
--数字游戏
Util.AddClick(this.numberGameBtn,function()
NetManager.GetComparenumInfoRequest(function()
UIManager.OpenPanel(UIName.RatioNumberLevelPanel)
end)
--RatioNumberManager.SelectInit()
UIManager.OpenPanel(UIName.RatioNumberLevelPanel)
end)
Util.AddClick(this.btnOpenSeverWelfare, function()
UIManager.OpenPanel(UIName.OpenSeverWelfarePanel)
@ -776,12 +780,14 @@ function this.BattleLogic()
end
this.heroList[i].spine.AnimationState:SetAnimation(0, "idle", true)
--LogError("this.heroList[i].data.attack=="..this.heroList[i].data.attack)
local proList=HeroPropManager.GetHeroProp(this.heroList[i].data.dynamicId, FormationTypeDef.FORMATION_NORMAL)
--local proList=HeroPropManager.GetHeroProp(this.heroList[i].data.dynamicId, FormationTypeDef.FORMATION_NORMAL)
--LogError("prolist[2]==============="..proList[2])
--for i=1,5 do
bossHp=bossHp - math.floor(proList[2]*(1+SmallSoldierManager.soliderAdd/100)+0.5)
allAttacck=allAttacck+math.floor(proList[2]*(1+SmallSoldierManager.soliderAdd/100)+0.5)
this.Floater:ArtFloatingOnHook(ArtFloatingType.Damage,ArtFloatingColor.White,proList[2])
local power=HeroPowerManager.GetHeroPower(this.heroList[i].data.dynamicId, FormationTypeDef.FORMATION_NORMAL)
--LogError("power===================================================="..power)
bossHp=bossHp - math.floor(power*(1+SmallSoldierManager.soliderAdd/100)+0.5)
allAttacck=allAttacck+math.floor(power*(1+SmallSoldierManager.soliderAdd/100)+0.5)
this.Floater:ArtFloatingOnHook(ArtFloatingType.Damage,ArtFloatingColor.White,power)
--end
isHit=true
@ -820,7 +826,13 @@ function this.BattleLogic()
if aaa.effect then
aaa.effect:SetActive(false)
end
local attack=math.floor(math.floor(aaa.data.attributes[2].value*(1+add)+0.5)*(1+SmallSoldierManager.soliderAdd/100)+0.5)
local power=0
for p=1,4 do
power= power+ aaa.data.attributes[p].value*propertyConfig[p].Score
end
power=math.floor(power)
local attack=math.floor(math.floor(power*(1+add)+0.5)*(1+SmallSoldierManager.soliderAdd/100)+0.5)
--LogError("attack============================================="..power)
bossHp=bossHp-attack
allAttacck=allAttacck+attack
this.Floater:ArtFloatingOnHook(ArtFloatingType.Damage,ArtFloatingColor.White,attack)

View File

@ -2,6 +2,7 @@ SmallSoldierManager = {}
local this = SmallSoldierManager
local ItemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig)
local settingConfig=ConfigManager.GetConfig(ConfigName.SoldiersSetting)
local propertyConfig=ConfigManager.GetConfig(ConfigName.PropertyConfig)
this.level=1
this.changeSolider=nil
this.upEndTime=0
@ -115,20 +116,27 @@ function this.GetCurrAllAttack()
for i=1,6 do
if team.teamHeroInfos[i] then
local heroId=team.teamHeroInfos[i].heroId
local proList=HeroPropManager.GetHeroProp(heroId, FormationTypeDef.FORMATION_NORMAL)
if proList then
allAttack=allAttack+ math.floor(proList[2]*(1+this.soliderAdd/100)+0.5)
--local proList=HeroPropManager.GetHeroProp(heroId, FormationTypeDef.FORMATION_NORMAL)
-- prolist[2]
local power=HeroPowerManager.GetHeroPower(heroId, FormationTypeDef.FORMATION_NORMAL)
if power then
allAttack=allAttack+ math.floor(power*(1+this.soliderAdd/100)+0.5)
end
end
end
local lotteryConfig=ConfigManager.GetConfigData(ConfigName.SoldiersLotteryConfig,SmallSoldierManager.level)
local add=lotteryConfig.SoldiersUP/10000
for k, v in pairs(this.soldierList) do
local add=math.floor(v.attributes[2].value*(1+add)+0.5)
local power=0
for p=1, 4 do
power=power + (v.attributes[p].value*propertyConfig[p].Score)
end
power=math.floor(power)
local add=math.floor(power*(1+add)+0.5)
--LogError("add============================"..add.." math.floor(add*(1+this.soliderAdd/100)+0.5=="..math.floor(add*(1+this.soliderAdd/100)+0.5))
allAttack=allAttack+ math.floor(add*(1+this.soliderAdd/100)+0.5)
end
--LogError("挂机总伤害===================================================="..allAttack)
LogError("挂机总伤害===================================================="..allAttack)
return allAttack
end