v0.1.34a: 功法万象+世界自演化——流派效果/元素时节/悟位大成/战争疲劳/换代半衰/断供应急/新秘境

【功法】TechniqueDef 新增 critChance/guardBonus/tribBonus/secretBonus(optional 零漂);
6 部新功法(玄冰凝甲/紫电惊雷/丹鼎护道/风遁青冥/山灵镇岳/澜海听涛);
季节元素共鸣(春木夏火秋金冬水——修炼额外×1.04);演武场联动悟位积累;悟位2大成战斗效果倍增
【世界】warFatigue 互攻累积→世界温度冷降→乱世加速(打不动即荒年);
NpcDyn 换代恩义清(关系网向零收敛×0.5);断供应急(连续3月池深<70%→广播+价×1.5);
新秘境灵机(年首几率·乱世×2·模板化生成 addMission 扩展口);addMission 公共口(secrets.ts)
【修复】shortage 广播模块级全局污染→世界状态化(多世界确定性恢复)
【测试】world 确定性恢复绿;金钟罩预期漂移(换代/共鸣/warFatigue)——0.1.34 基线待重算
This commit is contained in:
2026-08-23 22:00:55 +08:00
parent b7c5f1eca0
commit a491b9c54a
12 changed files with 163 additions and 15 deletions
@@ -90,7 +90,16 @@ export function resolveEncounter(
const talisman = opts.kind === 'war' ? talismanWarPrep(w) : null
const talismMult = talisman === 'feng' ? 1.12 : talisman === 'shan' ? 1.15 : 1
let team = 0
for (const c of opts.team) team += combatPowerOf(w, c)
let guard = 0
let crit = 0
for (const c of opts.team) {
team += combatPowerOf(w, c)
const t = techniqueById(c.techniqueId)
guard += (t?.guardBonus ?? 0)
crit += (t?.critChance ?? 0)
}
guard /= Math.max(1, opts.team.length)
crit /= Math.max(1, opts.team.length)
team *= talismMult
const enemy = Math.round(enemyPowerOf(opts.enemy, opts.risk) * form.def)
const jitter = w.rng.between(0.88, 1.12)
@@ -118,7 +127,7 @@ export function resolveEncounter(
if (!c.alive || c.state === 'wounded') continue
const severity = w.rng.next()
if (!win) {
if (severity < 0.1 && w.rng.chance(opts.risk * 0.08 + 0.02)) {
if (severity < 0.1 && w.rng.chance((opts.risk * 0.08 + 0.02) * (1 - crit))) {
c.alive = false
c.deathYear = year
c.deathCause = `战殁于${opts.enemy.name}之手`
@@ -126,13 +135,13 @@ export function resolveEncounter(
w.chronicle('death', `${c.name} 战殁于${opts.enemy.name},一身所学俱付尘烟。`, c.id, true)
w.emitFx('ripple', `death:${c.id}`)
} else if (severity < 0.45) {
const woundAmt = Math.round((40 + w.rng.int(0, 25)) * form.retreatWound * (talisman === 'shan' ? 0.5 : 1))
const woundAmt = Math.round((40 + w.rng.int(0, 25)) * form.retreatWound * (talisman === 'shan' ? 0.5 : 1) * (1 - guard))
c.health = Math.max(1, c.health - woundAmt)
c.state = 'wounded'
loss.push(`${c.name} 重伤`)
}
} else if (w.rng.chance(0.12)) {
c.health = Math.max(1, c.health - 20 - w.rng.int(0, 15))
c.health = Math.max(1, c.health - Math.round((20 + w.rng.int(0, 15)) * (1 - guard)))
if (c.health < 35) c.state = 'wounded'
loss.push(`${c.name} 轻伤`)
}