v0.1.32: 万宝琳琅——物品六类化 + 新材料七种 + 循环接入 + 测试 5009
【资源物品大扩容】 - ItemKind 6 值:resource/material/pill/talisman/brew/artifact——市场分群/背包/售卖/modSchema 全链 - 新材料七种:灵玉/灵木/兽皮/灵果(POOL_BASE+MARKET_IDS+worldgen 偏移四同步入世界池)、 灵露/丹砂/符纸(道具料) - 循环接入:新建筑灵果园(灵果)/灵木坊(灵木);productionTick 泛化逐建筑读 produceTable 全键; 秘境掉落材料化(灵玉/兽皮/灵木);材料类同向微漂(物产同源生态) 【新用途】 - 符箓:war 战斗开战武备自动消耗(talismanWarPrep 零 rng) - 灵酿:渡劫伤后自动回气 +5 - 新丹方和灵丹/虚元丹 + 玉澜刃/灵酿铸器配方 【测试 5009】86 套件(+1000:matrix-treasure-a/b 950 + 断链修整); 【金钟罩】0.1.32 基线重算(物品/池/生产泛化受控变更);build 通过
This commit is contained in:
@@ -6,7 +6,7 @@ import { ITEMS } from '../../data/items'
|
||||
import { npcById, getNpcDefs, registerNpcDef, unregisterNpcDef } from '../../data/npcs'
|
||||
import { MAJORS, MAJOR_ORDER } from '../../data/realms'
|
||||
|
||||
const MARKET_IDS = ['lingcao', 'lingkuang', 'beastcore', 'pill-qiyuan', 'pill-ningyuan']
|
||||
const MARKET_IDS = ['lingcao', 'lingkuang', 'beastcore', 'lingyu', 'lingmu', 'shoupi', 'lingguo', 'pill-qiyuan', 'pill-ningyuan']
|
||||
|
||||
export class WorldSim {
|
||||
constructor(private w: World) {}
|
||||
@@ -411,6 +411,8 @@ function npcTrade(w: World, s: WorldSimState, noise: number): void {
|
||||
|
||||
function driftMarket(s: WorldSimState, noise: number): void {
|
||||
let n = noise
|
||||
// W3 材料生态相关:自然资源同向微漂(灵木/符链共享偏置——物产同源)
|
||||
const matBias = (noise - 0.5) * 0.012
|
||||
for (const id of MARKET_IDS) {
|
||||
const per = n; n += 0.13
|
||||
const base = poolBase(id)
|
||||
@@ -418,8 +420,9 @@ function driftMarket(s: WorldSimState, noise: number): void {
|
||||
// 向基准再平衡(弱化锚定:让供需流与 era 真正撬动价格)+ 噪声漂移(价格弹性)
|
||||
const rebalance = (base - cur) * WORLDSIM.marketRebalance
|
||||
const drift = ((per % 1) - 0.5) * WORLDSIM.marketDriftRate * base
|
||||
const isMaterial = ['lingyu', 'lingmu', 'shoupi', 'lingguo'].includes(id)
|
||||
|
||||
s.marketPool[id] = Math.max(base * WORLDSIM.poolFloorPct, cur + rebalance + drift)
|
||||
s.marketPool[id] = Math.max(base * WORLDSIM.poolFloorPct, cur + rebalance + drift + (isMaterial ? matBias * base : 0))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -179,6 +179,10 @@ export function generateWorld(seed: string): WorldGenResult {
|
||||
lingcao: (rng.next() - 0.5) * 0.24,
|
||||
lingkuang: (rng.next() - 0.5) * 0.24,
|
||||
beastcore: (rng.next() - 0.5) * 0.24,
|
||||
lingyu: (rng.next() - 0.5) * 0.24,
|
||||
lingmu: (rng.next() - 0.5) * 0.24,
|
||||
shoupi: (rng.next() - 0.5) * 0.24,
|
||||
lingguo: (rng.next() - 0.5) * 0.24,
|
||||
'pill-qiyuan': (rng.next() - 0.5) * 0.18,
|
||||
'pill-ningyuan': (rng.next() - 0.5) * 0.18
|
||||
}
|
||||
|
||||
@@ -82,6 +82,10 @@ export const POOL_BASE: Record<string, number> = {
|
||||
lingcao: 600,
|
||||
lingkuang: 300,
|
||||
beastcore: 80,
|
||||
lingyu: 120,
|
||||
lingmu: 220,
|
||||
shoupi: 160,
|
||||
lingguo: 260,
|
||||
'pill-qiyuan': 90,
|
||||
'pill-ningyuan': 40
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user