0.1.37 天人感应·因果织锦:功德系统+飞升试炼+世界奇观+MOD扩展口
This commit is contained in:
@@ -14,9 +14,12 @@ import { ASPIRATION_IDS } from '../../../data/aspirations'
|
||||
import { seasonMod } from '../../../data/season'
|
||||
import { bonusOf } from '../../../data/buildings'
|
||||
import { WorldSim } from '../../sim/WorldSim'
|
||||
import { needsTribulation, tribulationEventId } from './tribulation'
|
||||
import { needsTribulation, tribulationEventId, ascensionEventId } from './tribulation'
|
||||
import { fire } from './events'
|
||||
|
||||
/** 化神最高 minor(化神3层 → minor=2 为圆满) */
|
||||
const MAJORS_SPIRIT_MAX_MINOR = 2
|
||||
|
||||
export function monthlyRate(w: World, c: Character, herbFactor = 1): number {
|
||||
const st = w.state
|
||||
let rate = herbFactor
|
||||
@@ -134,6 +137,27 @@ export function cultivationTick(w: World): void {
|
||||
}
|
||||
}
|
||||
if (c.realmProgress >= 100) {
|
||||
// 0.1.37 飞升试炼:化神圆满(major=spirit, minor=2, progress=100)时 fire 心魔试炼
|
||||
if (c.realm.major === 'spirit' && c.realm.minor >= MAJORS_SPIRIT_MAX_MINOR && w.sysEnabled('tribulation')) {
|
||||
// 已在飞升试炼流程中(pending 或 delay 内)不重复触发
|
||||
const ascPending = w.state.pendingEvent?.startsWith('ev-ascension-') === true
|
||||
if (ascPending) {
|
||||
c.realmProgress = 100
|
||||
continue
|
||||
}
|
||||
if (c.tribDelayYear && w.state.year < c.tribDelayYear) {
|
||||
c.realmProgress = 100
|
||||
continue
|
||||
}
|
||||
// 旧版 ev-feisheng 已完成则不再触发
|
||||
if (w.state.completedEvents.includes('ev-feisheng')) {
|
||||
c.realmProgress = 100
|
||||
continue
|
||||
}
|
||||
c.tribDelayYear = undefined
|
||||
fire(w, ascensionEventId(c.id, 'heart'), 1)
|
||||
continue
|
||||
}
|
||||
const months = (w.state.year * 12 + w.state.month) - (c.lastBreakthroughAttempt ?? -999)
|
||||
if (months >= 6 && w.rng.chance(perAttemptChance(w, c))) {
|
||||
if (needsTribulation(c) && w.sysEnabled('tribulation')) {
|
||||
|
||||
Reference in New Issue
Block a user