修改冒险时长公式
This commit is contained in:
@@ -440,17 +440,10 @@ class CombatService:
|
||||
)
|
||||
return 0
|
||||
|
||||
# 1. 计算基础时间(指数增长,上限24小时)
|
||||
# 1. 计算基础时间(线性增长,上限24小时)
|
||||
base_time = CombatConfig.get_int("combat_adventure_base_time")
|
||||
max_time = CombatConfig.get_int("combat_adventure_max_time")
|
||||
|
||||
# 第n阶段的基础时间 = base_time * 2^(n-1)
|
||||
stage_base_time = min(base_time * (2 ** (stage - 1)), max_time)
|
||||
|
||||
# 2. 计算时间缩减(对数函数)
|
||||
divisor = CombatConfig.get_float("combat_time_reduction_divisor")
|
||||
time_reduction_factor = 1 + math.log10(1 + equipment_strength / divisor)
|
||||
|
||||
# 3. 果酒时间缩减buff
|
||||
wine_time_reduction = 0.0
|
||||
for wine_id in wine_buffs:
|
||||
@@ -458,7 +451,7 @@ class CombatService:
|
||||
wine_time_reduction += WINE_BUFFS[wine_id].get("time_reduction", 0.0)
|
||||
|
||||
# 4. 最终时间
|
||||
actual_time = stage_base_time / time_reduction_factor
|
||||
actual_time = min(max_time, base_time * stage)
|
||||
actual_time = actual_time * (1 - wine_time_reduction)
|
||||
actual_time = max(1, int(actual_time)) # 最少1分钟
|
||||
|
||||
|
||||
Reference in New Issue
Block a user