游戏狂人
 
- 贡献度
- 231
- 金元
- 7429
- 积分
- 1667
- 精华
- 0
- 注册时间
- 2013-4-5
|
本帖最后由 Broken_Puppet 于 2023-7-23 22:09 编辑
function GetSumOperationStats(mercs, stat, stat_multiplier)
local forgiving_mode = IsGameRuleActive("ForgivingMode")
local sum_stat = 0
local min_stat_boost = GameRuleDefs.ForgivingMode:ResolveValue("MinStatBoost") or 0
local has_perk = false
for _, m in ipairs(mercs) do
local stat_val = m[stat] or 0
if forgiving_mode and min_stat_boost > stat_val then
stat_val = stat_val + (min_stat_boost - stat_val) / 2
end
stat_val = MulDivRound(stat_val, stat_multiplier, 100)
if HasPerk(m, "JackOfAllTrades") then
has_perk = true
end
sum_stat = sum_stat + stat_val
end
if has_perk then
local mod = CharacterEffectDefs.JackOfAllTrades:ResolveValue("activityDurationMod")
sum_stat = sum_stat + MulDivRound(sum_stat, mod, 100)
end
return sum_stat
这个技能带代码是这样的 没仔细看 应该是影响。
|
|