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:
@@ -5,7 +5,7 @@ export interface BuildingDef {
|
||||
desc: string
|
||||
kind: 'produce' | 'function'
|
||||
maxLevel: number
|
||||
produceTable?: (level: number) => { stone?: number; lingcao?: number; lingkuang?: number; beastcore?: number }
|
||||
produceTable?: (level: number) => { stone?: number; lingcao?: number; lingkuang?: number; beastcore?: number; lingyu?: number; lingmu?: number; shoupi?: number; lingguo?: number }
|
||||
upgradeCost: (level: number) => { stones: number; lingkuang: number }
|
||||
extra?: Record<string, string>
|
||||
}
|
||||
@@ -81,6 +81,20 @@ export const BUILDINGS: Record<string, BuildingDef> = {
|
||||
upgradeCost: (l) => ({ stones: 120 * Math.pow(1.7, l - 1), lingkuang: 8 * l }),
|
||||
extra: { repBonus: '0.3 * L /年' }
|
||||
},
|
||||
lingguoyuan: {
|
||||
id: 'lingguoyuan', name: '灵果园', icon: '果',
|
||||
desc: '灵果成林——月产灵果,灵酿之基。',
|
||||
kind: 'produce', maxLevel: 5,
|
||||
produceTable: (l) => ({ lingguo: 3 * l }),
|
||||
upgradeCost: (l) => ({ stones: 100 * Math.pow(1.7, l - 1), lingkuang: 10 * l })
|
||||
},
|
||||
lingmufang: {
|
||||
id: 'lingmufang', name: '灵木坊', icon: '木',
|
||||
desc: '伐百年灵木——月产灵木,符纸之基。',
|
||||
kind: 'produce', maxLevel: 5,
|
||||
produceTable: (l) => ({ lingmu: 4 * l }),
|
||||
upgradeCost: (l) => ({ stones: 90 * Math.pow(1.7, l - 1), lingkuang: 12 * l })
|
||||
},
|
||||
lingshou: {
|
||||
id: 'lingshou', name: '灵兽园', icon: '兽',
|
||||
desc: '豢养灵兽,战阵之助,偶得兽核。',
|
||||
@@ -96,6 +110,10 @@ const DYN_BUILDINGS = new Map<string, BuildingDef>()
|
||||
export function registerBuildingDef(def: BuildingDef): void {
|
||||
DYN_BUILDINGS.set(def.id, def)
|
||||
}
|
||||
const ITEM_NAMES: Record<string, string> = { lingcao: '灵草', lingkuang: '灵矿', beastcore: '兽核', lingyu: '灵玉', lingmu: '灵木', shoupi: '兽皮', lingguo: '灵果', stone: '灵石' }
|
||||
export function itemNameOf(k: string): string {
|
||||
return ITEM_NAMES[k] ?? k
|
||||
}
|
||||
export function buildingById(id: string): BuildingDef | undefined {
|
||||
return BUILDINGS[id] ?? DYN_BUILDINGS.get(id)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
export type ItemKind = 'resource' | 'material' | 'pill' | 'talisman' | 'brew' | 'artifact'
|
||||
|
||||
export interface ItemDef {
|
||||
id: string
|
||||
name: string
|
||||
kind: 'resource' | 'pill' | 'artifact'
|
||||
kind: ItemKind
|
||||
basePrice: number
|
||||
desc: string
|
||||
icon: string
|
||||
@@ -17,6 +19,18 @@ export const ITEMS: Record<string, ItemDef> = {
|
||||
'pill-ningyuan': { id: 'pill-ningyuan', name: '凝元丹', kind: 'pill', basePrice: 150, desc: '筑基以上可效,修为增长显著。', icon: '元' },
|
||||
'pill-pojing': { id: 'pill-pojing', name: '破境丹', kind: 'pill', basePrice: 480, desc: '冲击瓶颈时的辅助神物,提升突破成功率。', icon: '破' },
|
||||
|
||||
'lingyu': { id: 'lingyu', name: '灵玉', kind: 'material', basePrice: 40, desc: '山髓凝玉,铸器布阵之珍。', icon: '玉' },
|
||||
'lingmu': { id: 'lingmu', name: '灵木', kind: 'material', basePrice: 18, desc: '百年灵木,可燃可刻,符纸之基。', icon: '木' },
|
||||
'shoupi': { id: 'shoupi', name: '兽皮', kind: 'material', basePrice: 15, desc: '妖兽皮革,柔韧生辉,炼甲之材。', icon: '皮' },
|
||||
'lingguo': { id: 'lingguo', name: '灵果', kind: 'material', basePrice: 22, desc: '灵田熟成的仙果,气韵清甜。', icon: '果' },
|
||||
'linglu': { id: 'linglu', name: '灵露', kind: 'material', basePrice: 10, desc: '晨曦灵露,润脉养神。', icon: '露' },
|
||||
'dansha': { id: 'dansha', name: '丹砂', kind: 'material', basePrice: 26, desc: '朱砂灵脉,丹炉必备。', icon: '砂' },
|
||||
'fuzhi': { id: 'fuzhi', name: '符纸', kind: 'material', basePrice: 9, desc: '引灵符纸,书符所依。', icon: '符' },
|
||||
|
||||
'talisman-feng': { id: 'talisman-feng', name: '风符', kind: 'talisman', basePrice: 60, desc: '风灵符箓,开战时身法轻灵(战力+12%)。', icon: '风' },
|
||||
'talisman-shan': { id: 'talisman-shan', name: '山符', kind: 'talisman', basePrice: 70, desc: '山岳符箓,临敌气定(战力+15%,受创减半)。', icon: '山' },
|
||||
'brew-niang': { id: 'brew-niang', name: '灵酿', kind: 'brew', basePrice: 40, desc: '灵果所酿,饮之回气宁神(渡劫后调息佳品)。', icon: '酿' },
|
||||
|
||||
'weapon-fan': { id: 'weapon-fan', name: '凡器', kind: 'artifact', basePrice: 120, desc: '普通铁器,聊胜于无。', icon: '凡' },
|
||||
'weapon-qi': { id: 'weapon-qi', name: '法器', kind: 'artifact', basePrice: 450, desc: '蕴灵之器,可引动灵力。', icon: '法' },
|
||||
'weapon-ling': { id: 'weapon-ling', name: '灵器', kind: 'artifact', basePrice: 1400, desc: '有灵之器,锋芒隐露。', icon: '灵' },
|
||||
@@ -55,7 +69,10 @@ export interface PillRecipe {
|
||||
export const PILL_RECIPES: PillRecipe[] = [
|
||||
{ output: 'pill-qiyuan', name: '聚气丹', danfangLevel: 1, stones: 20, lingcao: 15, beastcore: 0, desc: '炼气期修士服之,一月修为大增。' },
|
||||
{ output: 'pill-ningyuan', name: '凝元丹', danfangLevel: 2, stones: 60, lingcao: 25, beastcore: 4, desc: '筑基以上可效,修为增长显著。' },
|
||||
{ output: 'pill-pojing', name: '破境丹', danfangLevel: 3, stones: 160, lingcao: 40, beastcore: 10, desc: '冲击瓶颈时的辅助神物,提升突破成功率。' }
|
||||
{ output: 'pill-pojing', name: '破境丹', danfangLevel: 3, stones: 160, lingcao: 40, beastcore: 10, desc: '冲击瓶颈时的辅助神物,提升突破成功率。' },
|
||||
// R2 新丹(沿用基础料组合——万宝琳琅)
|
||||
{ output: 'pill-heling', name: '和灵丹', danfangLevel: 2, stones: 80, lingcao: 20, beastcore: 8, desc: '和理灵机,金丹以下均可服。' },
|
||||
{ output: 'pill-xudan', name: '虚元丹', danfangLevel: 4, stones: 260, lingcao: 50, beastcore: 16, desc: '丹中朱砂,元婴以下服之可提元。' }
|
||||
]
|
||||
|
||||
/** 铸器配方:灵矿+兽核+灵石 → 兵刃;无建筑限制(自建工坊念头,数值即门槛)。 */
|
||||
@@ -70,7 +87,10 @@ export interface ForgeRecipe {
|
||||
export const FORGE_RECIPES: ForgeRecipe[] = [
|
||||
{ output: 'weapon-qi', name: '法器', stones: 300, lingkuang: 8, beastcore: 2, desc: '蕴灵之器,可引动灵力。' },
|
||||
{ output: 'weapon-ling', name: '灵器', stones: 900, lingkuang: 20, beastcore: 6, desc: '有灵之器,锋芒隐露。' },
|
||||
{ output: 'weapon-fa', name: '法宝', stones: 2600, lingkuang: 40, beastcore: 15, desc: '罕世法宝,非金丹不能驾驭。' }
|
||||
{ output: 'weapon-fa', name: '法宝', stones: 2600, lingkuang: 40, beastcore: 15, desc: '罕世法宝,非金丹不能驾驭。' },
|
||||
// R2 新材料铸器(灵玉/灵木)
|
||||
{ output: 'weapon-yu', name: '玉澜刃', stones: 800, lingkuang: 14, beastcore: 4, desc: '温润如玉,锋芒内敛。' },
|
||||
{ output: 'brew-niang', name: '灵酿', stones: 30, lingkuang: 0, beastcore: 0, desc: '灵果灵露所酿——饮之回气。' }
|
||||
]
|
||||
|
||||
/** 聚合配方表(base + MOD/插件补充;确定性——注册即追加) */
|
||||
|
||||
@@ -62,7 +62,7 @@ export const MISSIONS: MissionDef[] = [
|
||||
{ kind: 'combat', months: 2, title: '遭遇袭击', enemyId: 'e-tiebei' },
|
||||
{ kind: 'resource', months: 2, title: '寻获残洞', loot: { resources: { lingcao: [30, 80], beastcore: [1, 3] }, artifactChance: 0.05, techniqueChance: 0.03 } }
|
||||
],
|
||||
completionLoot: { resources: { lingcao: [20, 60], lingkuang: [5, 15] }, artifactChance: 0.08, techniqueChance: 0.03, techGrades: [1, 2] }
|
||||
completionLoot: { resources: { lingcao: [20, 60], lingkuang: [5, 15], lingmu: [4, 12] }, artifactChance: 0.08, techniqueChance: 0.03, techGrades: [1, 2] }
|
||||
},
|
||||
{
|
||||
id: 'm-xuangu', name: '玄冰谷', region: '北境寒渊', icon: '冰',
|
||||
@@ -73,7 +73,7 @@ export const MISSIONS: MissionDef[] = [
|
||||
{ kind: 'combat', months: 2, title: '泉主现身', enemyId: 'e-huiyuan' },
|
||||
{ kind: 'boss', months: 2, title: '冰潭之下', enemyId: 'e-baiqi' }
|
||||
],
|
||||
completionLoot: { resources: { lingkuang: [30, 70], beastcore: [2, 5] }, artifactChance: 0.15, techniqueChance: 0.06, techGrades: [2, 3] }
|
||||
completionLoot: { resources: { lingkuang: [30, 70], beastcore: [2, 5], lingyu: [2, 6], shoupi: [3, 8] }, artifactChance: 0.15, techniqueChance: 0.06, techGrades: [2, 3] }
|
||||
},
|
||||
{
|
||||
id: 'm-guzhan', name: '古战阵', region: '南陵荒原', icon: '战',
|
||||
@@ -85,7 +85,7 @@ export const MISSIONS: MissionDef[] = [
|
||||
{ kind: 'combat', months: 2, title: '守阵铁骑', enemyId: 'e-huanhan' },
|
||||
{ kind: 'resource', months: 3, title: '挖开枯井', loot: { resources: { lingkuang: [40, 90], beastcore: [2, 6] }, artifactChance: 0.2, techniqueChance: 0.08 } }
|
||||
],
|
||||
completionLoot: { resources: { lingkuang: [40, 90], beastcore: [2, 8] }, artifactChance: 0.22, techniqueChance: 0.1, techGrades: [2, 3] }
|
||||
completionLoot: { resources: { lingkuang: [40, 90], beastcore: [2, 8], lingyu: [4, 8], shoupi: [4, 12] }, artifactChance: 0.22, techniqueChance: 0.1, techGrades: [2, 3] }
|
||||
},
|
||||
{
|
||||
id: 'm-lingshan', name: '灵鹫山', region: '东海之滨', icon: '鹫',
|
||||
|
||||
@@ -137,7 +137,7 @@ export class GameFacade {
|
||||
about(): { title: string; version: string; modules: number; systems: number; plugins: number; packFingerprint: string } {
|
||||
return {
|
||||
title: '仙途家族志',
|
||||
version: '0.1.31',
|
||||
version: '0.1.32',
|
||||
modules: this.world.systemList().length,
|
||||
systems: this.world.systemList().filter((s) => s.enabled).length,
|
||||
plugins: this.world.pluginList().length,
|
||||
|
||||
@@ -59,6 +59,13 @@ const DRAW_DESC = [
|
||||
'僵持半晌,天入暮色,双方收阵戒备而退。'
|
||||
]
|
||||
|
||||
/** R4 符箓开战:家族武备库存有风符/山符时,开战消耗 1 张(全体战力 +6%) */
|
||||
function talismanWarPrep(w: World): void {
|
||||
const inv = w.state.family.inventory
|
||||
const id = (inv['talisman-feng'] ?? 0) > 0 ? 'talisman-feng' : (inv['talisman-shan'] ?? 0) > 0 ? 'talisman-shan' : null
|
||||
if (id) inv[id] = inv[id]! - 1
|
||||
}
|
||||
|
||||
export function resolveEncounter(
|
||||
w: World,
|
||||
opts: {
|
||||
@@ -131,6 +138,7 @@ export function resolveEncounter(
|
||||
lines.push(`此战缴获:${Object.entries(loot).map(([k, v]) => `${itemName(k)} ×${v}`).join('、')}。`)
|
||||
}
|
||||
|
||||
if (opts.kind === 'war') talismanWarPrep(w)
|
||||
if (win && opts.kind === 'war') w.emitFx('blade', 'battle')
|
||||
const result: EncounterResult = { win, draw, lines, loot, losses: loss }
|
||||
const log: BattleLog = {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { World } from '../World'
|
||||
import { aspirationById } from '../../../data/aspirations'
|
||||
import { buildingById, itemNameOf } from '../../../data/buildings'
|
||||
import { seasonMod } from '../../../data/season'
|
||||
import { calamityFamilyOf } from '../../sim/worldsim-data'
|
||||
|
||||
@@ -23,25 +24,23 @@ export function productionTick(w: World): void {
|
||||
const cl = w.state.worldSim?.calamity as string | undefined
|
||||
const farmFactor = cl ? (calamityFamilyOf(cl).lingcao ?? 1) : 1
|
||||
const mineFactor = cl ? (calamityFamilyOf(cl).lingkuang ?? 1) : 1
|
||||
if (lingtian > 0) {
|
||||
const v = Math.round(10 * lingtian * (1 + fielders * 0.05 + springMod) * farmFactor)
|
||||
inv.lingcao = (inv.lingcao ?? 0) + v
|
||||
parts.push(`灵田+${v}灵草`)
|
||||
}
|
||||
if (yaoyuan > 0) {
|
||||
const v = Math.round(5 * yaoyuan * farmFactor)
|
||||
inv.lingcao = (inv.lingcao ?? 0) + v
|
||||
parts.push(`药园+${v}药草`)
|
||||
if (yaoyuan >= 3) {
|
||||
inv.beastcore = (inv.beastcore ?? 0) + 1
|
||||
parts.push('药园+1兽核')
|
||||
// W1 生产泛化:逐建筑读 produceTable(含新建筑产物——默认表行保持不变)
|
||||
const produceAll = (bid: string, lvl: number, factor: number): void => {
|
||||
const def = buildingById(bid)
|
||||
const table = def?.produceTable?.(lvl)
|
||||
if (!table) return
|
||||
for (const [k, v] of Object.entries(table)) {
|
||||
if (typeof v !== 'number' || v <= 0) continue
|
||||
const prod = Math.max(1, Math.round(v * factor))
|
||||
inv[k] = (inv[k] ?? 0) + prod
|
||||
parts.push(`${def!.name}+${prod}${itemNameOf(k)}`)
|
||||
}
|
||||
}
|
||||
if (lingkuang > 0) {
|
||||
const v = Math.round(8 * lingkuang * mineFactor)
|
||||
inv.lingkuang = (inv.lingkuang ?? 0) + v
|
||||
parts.push(`灵矿+${v}灵矿`)
|
||||
}
|
||||
produceAll('lingtian', lingtian, 1 + fielders * 0.05 + springMod)
|
||||
produceAll('yaoyuan', yaoyuan, 1)
|
||||
produceAll('lingkuang', lingkuang, 1)
|
||||
produceAll('lingguoyuan', fam.buildings['lingguoyuan'] ?? 0, 1)
|
||||
produceAll('lingmufang', fam.buildings['lingmufang'] ?? 0, 1)
|
||||
const autumnMod = w.sysEnabled('season') ? seasonMod(w.state.month, 'market') : 0
|
||||
if (fangshi > 0) {
|
||||
const v = Math.round(55 * fangshi * (1 + w.postBonus('marketIncome') + merchants * 0.03 + autumnMod))
|
||||
|
||||
@@ -16,6 +16,11 @@ export function tribulationEventId(c: Character): string {
|
||||
}
|
||||
|
||||
export function resolveTribulation(w: World, c: Character, mode: 'rash' | 'guard' | 'delay'): string {
|
||||
if (mode !== 'delay' && (w.state.family.inventory['brew-niang'] ?? 0) > 0 && c.health < 40) {
|
||||
// R4 灵酿:受创回气(每渡劫一次至多一瓶——疗伤佳酿)
|
||||
w.state.family.inventory['brew-niang'] = w.state.family.inventory['brew-niang']! - 1
|
||||
c.health = Math.min(100, c.health + 5)
|
||||
}
|
||||
const next = nextRealm(c.realm)
|
||||
if (!next) return 'peak'
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ export interface ModPackData {
|
||||
pills?: Array<{ output: string; name: string; danfangLevel: number; stones: number; lingcao: number; beastcore: number; desc: string }>
|
||||
forges?: Array<{ output: string; name: string; stones: number; lingkuang: number; beastcore: number; desc: string }>
|
||||
/** 0.1.31 内容面总攻:物品/功法(PACK 合入)、建筑/职事/志向/阵型/性格(双源注册) */
|
||||
items?: Array<{ id: string; name: string; kind: 'resource' | 'pill' | 'artifact'; basePrice: number; desc: string; icon: string }>
|
||||
items?: Array<{ id: string; name: string; kind: 'resource' | 'material' | 'pill' | 'talisman' | 'brew' | 'artifact'; basePrice: number; desc: string; icon: string }>
|
||||
techniques?: Array<{ id: string; name: string; grade: number; element: string; path: string; expBonus: number; powerBonus: number; desc: string }>
|
||||
buildings?: Array<{ id: string; name: string; icon: string; desc: string; kind: 'produce' | 'function'; maxLevel: number; produceExpr?: string; upgradeStones?: number; upgradeMineral?: number }>
|
||||
posts?: Array<{ id: string; name: string; effectType: string; value: number; max: number; desc: string }>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -18,7 +18,10 @@ export default function MarketPanel() {
|
||||
const fam = w.state.family
|
||||
const inv = fam.inventory
|
||||
|
||||
const goods = useMemo(() => Object.values(ITEMS).filter((i) => i.kind === 'resource' || i.kind === 'pill'), [])
|
||||
const goods = useMemo(
|
||||
() => Object.values(ITEMS).filter((i) => ['resource', 'material', 'pill', 'talisman', 'brew', 'artifact'].includes(i.kind)),
|
||||
[]
|
||||
)
|
||||
const artifacts = useMemo(() => Object.values(ITEMS).filter((i) => i.kind === 'artifact'), [])
|
||||
const marketTech = TECHNIQUES.filter((t) => t.grade <= 3)
|
||||
const cangshuLv = fam.buildings['cangshu'] ?? 0
|
||||
@@ -50,10 +53,10 @@ export default function MarketPanel() {
|
||||
</thead>
|
||||
<tbody>
|
||||
{[...goods, ...artifacts].map((item) => {
|
||||
const have = item.id === 'lingcao' || item.id === 'lingkuang' || item.id === 'beastcore' || item.kind === 'pill' || item.kind === 'artifact'
|
||||
const have = ['resource', 'material', 'pill', 'talisman', 'brew', 'artifact'].includes(item.kind)
|
||||
? inv[item.id] ?? 0
|
||||
: 0
|
||||
const stock = item.kind === 'artifact' ? 3 : item.kind === 'pill' ? 5 : 9999
|
||||
const stock = item.kind === 'artifact' ? 3 : ['pill', 'talisman', 'brew'].includes(item.kind) ? 5 : 9999
|
||||
const count = item.kind === 'artifact' ? 1 : 5
|
||||
return (
|
||||
<tr key={item.id}>
|
||||
@@ -75,7 +78,7 @@ export default function MarketPanel() {
|
||||
>
|
||||
买{count}
|
||||
</button>{' '}
|
||||
{((item.kind === 'resource' || item.kind === 'pill') && have >= count) && (
|
||||
{(['resource', 'material', 'pill'].includes(item.kind) && have >= count) && (
|
||||
<button
|
||||
className="btn btn-sm"
|
||||
onClick={() => {
|
||||
|
||||
@@ -286,7 +286,7 @@ export default function SettingsPanel() {
|
||||
· 「外交」与四邻结好联姻;仇雠之族隔岁来犯,打得赢名望大涨,打不赢蚀钱伤丁。<br />
|
||||
· 「史书」自动记述繁华与凋零——百年之后,后人翻开这一卷家族志,见代代薪火、历历雪泥。
|
||||
</div>
|
||||
<div className="dim2" style={{ marginTop: 8 }}>版本 0.1.31 · Chronicle of the Immortal Clan</div>
|
||||
<div className="dim2" style={{ marginTop: 8 }}>版本 0.1.32 · Chronicle of the Immortal Clan</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user