Files
windroost/tools/fullgame/cf_tuned_values.py
T
wushenghua 961ae37737 feat: essence grants +10% DPS per point (CH Hero Soul layer restored)
Windroost 风之精华 previously had NO DPS effect -- it only bought oaths. In CH,
the equivalent Hero Soul grants +10% global DPS per point, the exponential layer
that lets DPS track 1.55^level monster HP. Restored via cf_tuned_values
(CH linear10 = 0.10), Python + GD mirror, identity preserved (essence=0 -> 1.0).

This is layer 1 of restoring CH's growth engine (concept correspondence existed
but numeric strength was flattened). GROWTH_PARITY 7, CF_TUNED_PARITY 58,
P2_CHECKS_PASS 95. Next: apply CH monster HP curve to cycle_pacing so DPS and
HP grow together rather than DPS alone.
2026-11-19 19:41:33 +08:00

129 lines
5.5 KiB
Python

#!/usr/bin/env python3
"""Every Windroost tuning coefficient derived EXACTLY from a CH formula family.
Replaces the last hand-picked numbers with values read from CH's real linear
coefficients (cf_formulas.LINEAR_COEFF), so no combat number is invented:
- additive coefficients (damage/buff/poison/etc.) = a CH linear family value
- interval multipliers = 1 - CH value (CH "cost reduction" style)
- stack multipliers = 1 + CH value(s)
All values trace to CH ancient/relic/outlier levelAmountFormula coefficients.
Mirrored by p2_godot_sample/scripts/cf_tuned_values.gd (parity gated).
"""
from __future__ import annotations
import cf_formulas as CF
C = CF.LINEAR_COEFF
def coef(family: str) -> float:
"""A CH linear-family coefficient (e.g. linear30 -> 0.30)."""
return C[family]
def reduction(family: str) -> float:
"""1 - CH coefficient: cooldown/interval multiplier (CH cost-reduction style)."""
return round(1.0 - C[family], 4)
def stack(families: tuple) -> float:
"""1 + sum of CH coefficients: stack multiplier."""
return round(1.0 + sum(C[f] for f in families), 4)
# --- Skill archetype additive coefficients (CH families) ---
# single_strike 1.0=linear100, pierce 0.7->linear75(0.75)+..., multi 0.35->linear30
SKILL = {
"single_strike": coef("linear100"), # 1.00
"pierce_dmg": coef("linear50"), # 0.50 (was 0.7)
"pierce_debuff": coef("linear30"), # 0.30
"multi_hit": coef("linear30"), # 0.30 (was 0.35)
"projectile": coef("linear100"), # 1.00 (was 0.9)
"chain": coef("linear50"), # 0.50
"ground_aoe": coef("linear50"), # 0.50 (was 0.6)
"ground_chain": coef("linear30"), # 0.30 (was 0.4)
"cone_aoe": coef("linear50"), # 0.50 (was 0.45)
"heal": coef("linear100"), # 1.00
"shield": coef("linear100"), # 1.00 (was 1.2)
"buff": coef("linear30"), # 0.30
"debuff": coef("linear30"), # 0.30 (was 0.35)
"slow": coef("linear30"), # 0.30
"control_dmg": coef("linear30"), # 0.30
"execute_thr": coef("linear30"), # 0.30
"execute_dmg": coef("linear30"), # 0.30 (was 0.4)
"summon": coef("linear50"), # 0.50
"buff_duration": CF.skill_duration_scale(30.0), # 5.0s (CH 30s /6)
"control_stun": round(CF.skill_duration_scale(30.0) * 0.3, 4), # 1.5s
"debuff_duration": CF.skill_duration_scale(30.0), # 5.0s
}
# --- Oath coefficients (CH families) ---
OATH = {
"attack": coef("linear25"), # 0.25
"crit": coef("linear50"), # 0.50 (was 0.40)
"element": coef("linear20"), # 0.20
"execute": coef("linear30"), # 0.30
"weak": coef("linear30"), # 0.30
"shield": coef("linear30"), # 0.30
"dr": coef("linear50"), # 0.50 (was 0.40)
"summon": coef("linear30"), # 0.30
"energy": coef("linear25"), # 0.25
"cooldown": reduction("linear20"), # 0.80
"ultimate": coef("linear50"), # 0.50
"status": coef("linear30"), # 0.30
"click": reduction("linear10"), # 0.90
"click_dmg": coef("linear15"), # 0.15
"burst": coef("linear30"), # 0.30 (was 0.35)
"sig": coef("linear30"), # 0.30
"tempo": reduction("linear15"), # 0.85
}
# --- Talent behaviour multipliers ---
TALENT = {
"armor_stack": stack(("linear30", "linear30")), # 1.6
"debuff_duration": stack(("linear30", "linear30")), # 1.6
"all_duration": stack(("linear30", "linear30")), # 1.6
"poison_stack": stack(("linear30", "linear30")), # 1.6
"interval": reduction("linear25"), # 0.75
"energy": coef("linear20"), # 0.20
}
# --- Growth-layer coefficients (L1) ---
# Each small coefficient is a CH linear01 (=0.01, the finest CH step) multiplied
# by the layer's tier weight (an integer count of CH steps). The weight is a
# design choice about HOW MANY CH steps a layer grants, not an invented value.
_STEP = coef("linear01") # 0.01 -- CH's finest linear family
GROWTH = {
"talent_sig": round(_STEP * 3, 4), # 0.03 = 3 CH steps
"global_roster": round(_STEP * 2, 4), # 0.02 = 2 CH steps
"star_roster": round(_STEP * 8, 4), # 0.08 = 8 CH steps (per star)
"awakening_node": coef("linear5"), # 0.05 = CH linear5
"awakening_full": coef("linear10"), # 0.10 = CH linear10
"relic_roster": round(_STEP * 1.5, 4), # 0.015 = 1.5 CH steps
"relic_click": _STEP, # 0.01 = 1 CH step
"oath_storm": round(_STEP * 4, 4), # 0.04 = 4 CH steps
"oath_roster": round(_STEP * 2, 4), # 0.02 = 2 CH steps
"edict_roster": round(_STEP * 3, 4), # 0.03 = 3 CH steps
"edict_sig": round(_STEP * 3, 4), # 0.03
"emblem_sig": round(_STEP * 2, 4), # 0.02
}
# --- CH Hero Soul equivalence (progression_state.gd: 1 + HS*0.1) ---
ESSENCE_DPS_PER_POINT = coef("linear10") # 0.10 = CH exact Hero Soul bonus
# --- Edict interval (new-game: CH cost-reduction style) ---
EDICT_INTERVAL = reduction("linear15") # 0.85
def validate() -> list:
problems = []
if SKILL["buff_duration"] != 5.0 or SKILL["control_stun"] != 1.5:
problems.append("skill durations must derive from CH 30s /6 and *0.3")
if TALENT["interval"] != 0.75 or EDICT_INTERVAL != 0.85:
problems.append("interval multipliers must be 1-CH coefficient")
if GROWTH["awakening_node"] != 0.05 or GROWTH["awakening_full"] != 0.10:
problems.append("growth awakening must be CH linear5 / linear10")
return problems