update: game core flow pages

This commit is contained in:
Vick Scarlet
2026-08-12 02:38:37 +08:00
parent 5d50a4ea37
commit cd339c2103
34 changed files with 890 additions and 768 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
import type { Achievement, Event, Talent } from '@remake/data'
import { ages, AchievementOpportunity as Ao } from '@remake/data'
import type { Allocation, GameState, ProfileState } from './state'
import type { Properties } from './state'
import { createState, nextProfile, propsEffect } from './state'
import { summary as stateSummary } from './state'
import type { PullOptions, ReplacementResult } from './talent'
@@ -109,6 +110,6 @@ export function end(
}
export { pull, exclude }
export type { GameState, ProfileState, Allocation, RNG }
export type { PullOptions, ReplacementResult }
export type { GameState, ProfileState, Properties, RNG }
export type { PullOptions, ReplacementResult, Allocation }
export type { AdditionalPoint, AdditionalPoints }
+5 -1
View File
@@ -1,4 +1,4 @@
import type { Achievement, Event, Talent } from '@remake/data'
import type { Achievement, Event, Talent, Character } from '@remake/data'
import { produce } from 'immer'
import { sum, keys } from '@remake/vitex'
@@ -37,6 +37,9 @@ export interface GameState {
talentTriggers: Map<Talent['id'], number> // 本局天赋触发次数
}
/** 唯一角色 */
export type UniqueCharacter = Omit<Character, 'id' | 'name'>
/** 持久化存储的数据 */
export interface ProfileState {
times: number // 游戏次数
@@ -46,6 +49,7 @@ export interface ProfileState {
achievements: Set<Achievement['id']> // 达成的成就
highest?: Properties // 历史最高属性
lowest?: Properties // 历史最低属性
unique?: UniqueCharacter // 唯一角色属性
}
export function createState(