feat(0.1.16-P1): 资源闭环引擎(修为耗草/炼丹概率化/铸器/灵脉收益/NPC战力/灾变落效)+ C13C14
【A 经济闭环】 - 修为经济化:练气以上修行者月耗灵草(闭关2普通1),无草速修0.6~1.0衰减+缺草年告警 - 炼丹等级化:bonusOf 表达式引擎(白名单安全求值),craftChance 转正;丹方单源 PILL_RECIPES(聚气L1/凝元L2/破境L3)+ 失败折半退料 - 炼器筑宝:FORGE_RECIPES(法器/灵器/法宝,灵矿+兽核+灵石) - 秘境灵脉:secretQiOf→rollWarbooty 收益门槛(0.5~1.3折算);掉落按秘境 techGrades 过滤 - NPC 实力参战:raid 强度/风险随 npc.power 浮动(0.5~1.8) - 灾年落效:疫病/兽潮一次性袭击 + CALAMITY_FAMILY 月度减产乘子 【C 治理】 - C13 破境丹渡劫修正:大境界时药力→tribBoost 加成(+12%)入渡劫事件,不再跳过三选 - C14 存储防线:loadState 补 migrate;MigrationError(TOO_NEW/未知版本)提示升级 【UI 半批】 - 坊市新增 定制tab(丹方/铸器);ChroniclePanel 手写史书输入条;MemberModal 册立家主钮 - 年报摘要(要闻5条+辞世讣告);EventModal 选项收益预览 - 结盟引擎:setAlliance(relation≥40)/盟友岁差不降/年利15灵石
This commit is contained in:
@@ -50,6 +50,8 @@ describe('aspirations 志向', () => {
|
||||
it('耕读志向提升灵田产出', () => {
|
||||
const w = baseWorld('asp-d')
|
||||
w.state.family.buildings = { lingtian: 1 }
|
||||
for (const c of Object.values(w.state.members)) c.realm = { major: 'mortal', minor: 0 }
|
||||
w.state.worldSim = undefined as never
|
||||
w.state.members['x3'].aspiration = 'geng'
|
||||
const c0 = w.state.family.inventory['lingcao'] ?? 0
|
||||
w.advanceMonth()
|
||||
|
||||
@@ -7,6 +7,7 @@ describe('economy 经济系统', () => {
|
||||
it('灵田月产随等级线性增长', () => {
|
||||
const w = World.create({ seed: 'eco-a', surname: '简', familyName: '简家', motto: 'm', difficulty: 'normal' })
|
||||
w.state.family.buildings = { lingtian: 1 }
|
||||
for (const c of Object.values(w.state.members)) c.realm = { major: 'mortal', minor: 0 }
|
||||
const c0 = w.state.family.inventory['lingcao'] ?? 0
|
||||
w.advanceMonth() // month 2 = 春季,田地有±季相但至少≥9
|
||||
const c1 = w.state.family.inventory['lingcao'] ?? 0
|
||||
@@ -73,7 +74,7 @@ describe('economy 经济系统', () => {
|
||||
|
||||
it('丹房炼制消耗正确产出丹药', () => {
|
||||
const w = World.create({ seed: 'eco-h', surname: '宋', familyName: '宋家', motto: 'm', difficulty: 'normal' })
|
||||
w.state.family.buildings = { danfang: 1 }
|
||||
w.state.family.buildings = { danfang: 5 }
|
||||
const fam = w.state.family
|
||||
fam.inventory['lingcao'] = 100
|
||||
fam.inventory['beastcore'] = 10
|
||||
|
||||
@@ -43,7 +43,7 @@ describe('CapabilityRegistry 能力卡', () => {
|
||||
const c0 = w.state.family.inventory['lingcao'] ?? 0
|
||||
w.toggleSystem('production')
|
||||
for (let i = 0; i < 6; i++) w.advanceMonth()
|
||||
expect(w.state.family.inventory['lingcao'] ?? 0).toBe(c0)
|
||||
expect(w.state.family.inventory['lingcao'] ?? 0).toBeLessThanOrEqual(c0)
|
||||
w.toggleSystem('production')
|
||||
for (let i = 0; i < 6; i++) w.advanceMonth()
|
||||
expect(w.state.family.inventory['lingcao'] ?? 0).toBeGreaterThan(c0)
|
||||
|
||||
Reference in New Issue
Block a user