【山河社稷图】条件:5回合内打出8万伤害,如果我在第三回合打出7万伤害,第四回合直接秒杀怪物,面板总计造成12万伤害但是不给星星

dev_chengFeng
gaoxin 2021-05-27 16:38:31 +08:00
parent a1ba397b9c
commit c8a8683be0
3 changed files with 19 additions and 29 deletions

View File

@ -452,17 +452,17 @@ function BattleLogic.BattleEnd(result)
BattleLogic.Event:DispatchEvent(BattleEventName.BattleEnd, result)
if hardStageId and hardStageId~=0 then
--获取精英副本 星级信息
local hardStageConfig=ConfigManager.GetConfigData(ConfigName.HardStage,hardStageId)
if hardStageConfig then
if hardStageConfig.ConditionValue then
for i = 1, #hardStageConfig.ConditionValue do
local harConfig = ConfigManager.GetConfigData(ConfigName.HardStageCondition,hardStageConfig.ConditionValue[i])
local v1=HardStageCondition.CheckCondition(harConfig.ConditionType,harConfig.ConditionValue)
table.insert(levelStarRecord,hardStageConfig.ConditionValue[i])
table.insert(levelStarRecord,v1)
end
local hardStageConfig=ConfigManager.GetConfigData(ConfigName.HardStage,hardStageId)
if hardStageConfig then
if hardStageConfig.ConditionValue then
for i = 1, #hardStageConfig.ConditionValue do
local harConfig = ConfigManager.GetConfigData(ConfigName.HardStageCondition,hardStageConfig.ConditionValue[i])
local v1 = HardStageCondition.CheckCondition(harConfig.ConditionType,harConfig.ConditionValue)
table.insert(levelStarRecord,hardStageConfig.ConditionValue[i])
table.insert(levelStarRecord,v1)
end
end
end
end
end
-- 打印结果

View File

@ -31,13 +31,11 @@ local _ConditionConfig = {
[4]=function(condition)
local v1 = condition[1]
local v2 = condition[2]
local record=HardStageEventManager.GetRoundDamageRecord()
local record = HardStageEventManager.GetRoundDamageRecord()
if record then
for key, value in pairs(record) do
if key<=v1 and value[2]>=v2 then
return 1
end
end
if record[v1] and record[v1] >= v2 then
return 1
end
end
return 0
end,

View File

@ -79,23 +79,15 @@ end
function this.OnRecordDamage(atkRole,defRole,damage)
if not atkRole or atkRole.camp==1 then
return
end
local curRound,maxRound=BattleLogic.GetCurRound()
CurRound=curRound
--如果进入下一回合,记录上一回合的伤害
if CurRound==recordRound+1 then
table.insert(recordRoundDamage,{recordRound,roundDamage})
recordRound=CurRound
end
roundDamage=roundDamage+damage
end
local curRound,maxRound=BattleLogic.GetCurRound()
CurRound=curRound
roundDamage=roundDamage+damage
recordRoundDamage[CurRound] = roundDamage
end
--获取回合伤害记录
function this.GetRoundDamageRecord()
--如果一回合就结束战斗了,就直接把记录的回合数伤害加进去
if CurRound==1 then
table.insert(recordRoundDamage,{recordRound,roundDamage})
end
return recordRoundDamage
end