afnm-types 0.6.32 → 0.6.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,33 +13,22 @@ export interface Position {
13
13
  export interface PositionAndRotation extends Position {
14
14
  rotation: number;
15
15
  }
16
- /** Tracks which of the 6 core essences have been placed in the gate */
17
- export interface EssenceGate {
18
- breath: boolean;
19
- pulse: boolean;
20
- echo: boolean;
21
- growth: boolean;
22
- marrow: boolean;
23
- scar: boolean;
24
- }
25
- /** A lifeform stored in the player's soul realm */
26
- export interface StoredLifeform {
16
+ /** A figment stored in the player's soul realm */
17
+ export interface StoredFigment {
27
18
  id: string;
28
- baseForm: string;
29
- currentForm: string;
30
- slottedEssences: string[];
19
+ primarySpecies?: string;
20
+ secondarySpecies?: string;
21
+ customName?: string;
22
+ autoName?: string;
31
23
  stances: StoredStance[];
32
24
  currentStyle?: StoredStyle;
33
25
  storedStyles?: StoredStyle[];
34
- evolutionPath: string[];
35
26
  }
36
27
  /** State for the Life Flourishing breakthrough system */
37
28
  export interface LifeFlourishingState {
38
- essenceGate: EssenceGate;
39
- storedLifeforms: StoredLifeform[];
40
- manifestedLifeformId?: string;
41
- fightsInstead?: boolean;
42
- creatingNewLifeform?: boolean;
29
+ unlockedSpecies: string[];
30
+ storedFigments: StoredFigment[];
31
+ manifestedFigmentId?: string;
43
32
  }
44
33
  export interface BreakthroughState {
45
34
  mundane?: {
package/dist/buff.d.ts CHANGED
@@ -40,6 +40,7 @@ interface ConditionTechniqueCondition {
40
40
  }
41
41
  export interface Buff {
42
42
  name: string;
43
+ displayName?: Translatable;
43
44
  icon: string;
44
45
  colour?: string;
45
46
  canStack: boolean;
@@ -1,5 +1,6 @@
1
1
  import { Realm } from './realm';
2
2
  import { CraftingStatistic, Scaling } from './stat';
3
+ import { Translatable } from './translatable';
3
4
  export type CraftingTechniqueCondition = BuffTechniqueCondition | StateTechniqueCondition | ConditionTechniqueCondition | ChanceTechniqueCondition;
4
5
  interface BuffTechniqueCondition {
5
6
  kind: 'buff';
@@ -23,6 +24,7 @@ interface ChanceTechniqueCondition {
23
24
  export type CraftingBuffDisplayLocation = 'none' | 'avatar' | 'stabilityLeft' | 'stabilityRight' | 'perfectionLeft' | 'perfectionRight' | 'completionLeft' | 'completionRight';
24
25
  export interface CraftingBuff {
25
26
  name: string;
27
+ displayName?: Translatable;
26
28
  icon: string;
27
29
  canStack: boolean;
28
30
  effectHint?: string;
@@ -2,6 +2,7 @@ import { CraftingTechniqueType, CraftingRecipeStats } from './craftingTechnique'
2
2
  import { CraftingCondition } from './crafting';
3
3
  import { CraftingEntity } from './entity';
4
4
  import { RecipeItem, ItemDesc } from './item';
5
+ import type { GameEventState } from './reduxState';
5
6
  export interface ForgeWorksData {
6
7
  heat: number;
7
8
  }
@@ -84,4 +85,6 @@ export interface CraftingState {
84
85
  craftingLog: string[];
85
86
  craftResult?: CraftingResult;
86
87
  trainingMode?: CraftingTrainingMode;
88
+ /** Snapshot of entire event state when crafting started, restored on completion */
89
+ eventStateSnapshot?: GameEventState;
87
90
  }
@@ -3,8 +3,10 @@ declare const intimateStats: readonly ["satisfaction", "energy", "painThreshold"
3
3
  export type IntimateStat = (typeof intimateStats)[number];
4
4
  declare const intimateResources: readonly ["pain", "harmony", "excitement", "rhythm"];
5
5
  export type IntimateResource = (typeof intimateResources)[number];
6
- declare const intimateTechniqueTypes: string[];
6
+ declare const intimateTechniqueTypes: readonly ["rough", "tender", "passionate"];
7
7
  export type IntimateTechniqueType = (typeof intimateTechniqueTypes)[number];
8
+ export declare const intimateTechniqueTypeToName: Record<IntimateTechniqueType, string>;
9
+ export declare const intimateResourceToName: Record<IntimateResource, string>;
8
10
  export type IntimateTrait = {
9
11
  name: string;
10
12
  description: Translatable;
@@ -1,4 +1,14 @@
1
1
  const intimateStats = ['satisfaction', 'energy', 'painThreshold'];
2
2
  const intimateResources = ['pain', 'harmony', 'excitement', 'rhythm'];
3
3
  const intimateTechniqueTypes = ['rough', 'tender', 'passionate'];
4
- export {};
4
+ export const intimateTechniqueTypeToName = {
5
+ rough: 'Rough',
6
+ tender: 'Tender',
7
+ passionate: 'Passionate',
8
+ };
9
+ export const intimateResourceToName = {
10
+ pain: 'Pain',
11
+ harmony: 'Harmony',
12
+ excitement: 'Excitement',
13
+ rhythm: 'Rhythm',
14
+ };
package/dist/entity.d.ts CHANGED
@@ -79,6 +79,7 @@ export type EnemyDifficulty = 'veryeasy' | 'easy' | 'mediumEasy' | 'medium' | 'm
79
79
  export type BattleLength = 'halfround' | '1round' | 'veryshort' | 'short' | 'medium' | 'long' | 'verylong' | 'verylong+' | 'verylong++' | 'verylong+++' | 'verylong++++';
80
80
  export interface EnemyEntity {
81
81
  name: string;
82
+ displayName?: Translatable;
82
83
  image: string;
83
84
  supportImage?: {
84
85
  image: string;
@@ -227,6 +228,7 @@ export interface CombatArtefact extends ArtefactItem {
227
228
  export interface CombatEntity {
228
229
  entityType: EntityType;
229
230
  name?: string;
231
+ displayName?: Translatable;
230
232
  image: string;
231
233
  supportImage?: {
232
234
  image: string;
package/dist/item.d.ts CHANGED
@@ -14,6 +14,9 @@ import { CombatStatsMap, CraftingStatsMap, PhysicalStatistic, Scaling, SocialSta
14
14
  import { Technique, TechniqueEffect } from './technique';
15
15
  export declare const itemKinds: readonly ["clothing", "talisman", "artefact", "mount", "cauldron", "flame", "upgrade", "fruit", "elixir", "recipe", "technique", "action", "transport_seal", "enchantment", "pill", "reagent", "concoction", "consumable", "recuperation", "formation", "breakthrough", "pillar_shard", "material", "flare", "mystical_key", "condensation_art", "blueprint", "trophy", "treasure", "token", "life_essence", "device", "manual"];
16
16
  export type ItemKind = (typeof itemKinds)[number];
17
+ export declare const itemKindToName: {
18
+ [key in ItemKind]: string;
19
+ };
17
20
  export type ItemCostMap = {
18
21
  [key in ItemKind]: number;
19
22
  };
@@ -23,6 +26,7 @@ export type Item = TechniqueItem | TechniqueCrystalItem | TechniqueShardItem | T
23
26
  interface ItemBase {
24
27
  kind: ItemKind;
25
28
  name: string;
29
+ displayName?: Translatable;
26
30
  description: Translatable;
27
31
  icon: string;
28
32
  stacks: number;
@@ -158,6 +162,9 @@ export interface ArtefactTechnique {
158
162
  i?: number;
159
163
  }
160
164
  export type PillKind = 'combat' | 'crafting' | 'advancement' | 'consumable' | 'appearance_change';
165
+ export declare const pillKindToName: {
166
+ [key in PillKind]: string;
167
+ };
161
168
  interface BasePillItem extends ItemBase {
162
169
  kind: 'pill';
163
170
  pillKind: PillKind;
package/dist/item.js CHANGED
@@ -33,6 +33,41 @@ export const itemKinds = [
33
33
  'device',
34
34
  'manual',
35
35
  ];
36
+ export const itemKindToName = {
37
+ clothing: 'Clothing',
38
+ talisman: 'Talisman',
39
+ artefact: 'Artefact',
40
+ mount: 'Mount',
41
+ cauldron: 'Cauldron',
42
+ flame: 'Flame',
43
+ upgrade: 'Upgrade',
44
+ fruit: 'Fruit',
45
+ elixir: 'Elixir',
46
+ recipe: 'Recipe',
47
+ technique: 'Technique',
48
+ action: 'Action',
49
+ transport_seal: 'Transport Seal',
50
+ enchantment: 'Enchantment',
51
+ pill: 'Pill',
52
+ reagent: 'Reagent',
53
+ concoction: 'Concoction',
54
+ consumable: 'Consumable',
55
+ recuperation: 'Recuperation',
56
+ formation: 'Formation',
57
+ breakthrough: 'Breakthrough',
58
+ pillar_shard: 'Pillar Shard',
59
+ material: 'Material',
60
+ flare: 'Flare',
61
+ mystical_key: 'Mystical Key',
62
+ condensation_art: 'Condensation Art',
63
+ blueprint: 'Blueprint',
64
+ trophy: 'Trophy',
65
+ treasure: 'Treasure',
66
+ token: 'Token',
67
+ life_essence: 'Life Essence',
68
+ device: 'Device',
69
+ manual: 'Manual',
70
+ };
36
71
  export const buyItemCostMap = {
37
72
  technique: 3000,
38
73
  artefact: 3500,
@@ -103,3 +138,10 @@ export const sellItemCostMap = {
103
138
  device: 600,
104
139
  manual: 0,
105
140
  };
141
+ export const pillKindToName = {
142
+ combat: 'Combat Pill',
143
+ crafting: 'Crafting Pill',
144
+ advancement: 'Advancement Pill',
145
+ consumable: 'Consumable Pill',
146
+ appearance_change: 'Appearance Change Pill',
147
+ };
package/dist/life.d.ts CHANGED
@@ -2,9 +2,24 @@ import { Buff } from './buff';
2
2
  import { StoredStance, StoredStyle } from './entity';
3
3
  import { Realm } from './realm';
4
4
  import { Technique } from './technique';
5
+ export interface LifeFormAnimationImage {
6
+ image: string;
7
+ scale?: number;
8
+ imageOffset?: {
9
+ x: number;
10
+ y: number;
11
+ };
12
+ }
5
13
  export interface LifeForm {
6
- name: string;
14
+ role: string;
15
+ species: string;
7
16
  image: string;
17
+ supportImage?: LifeFormAnimationImage;
18
+ defensiveImage?: LifeFormAnimationImage;
19
+ utilityImage?: LifeFormAnimationImage;
20
+ aggressiveImage?: LifeFormAnimationImage;
21
+ offensiveImage?: LifeFormAnimationImage;
22
+ hitImage?: LifeFormAnimationImage;
8
23
  realm: Realm;
9
24
  buffs: Buff[];
10
25
  techniques: Technique[];
@@ -237,6 +237,7 @@ export type CustomBuildingPosition = 'top' | 'topleft' | 'topright' | 'belowtop'
237
237
  export interface CustomBuilding extends BuildingBase {
238
238
  kind: 'custom';
239
239
  name: string;
240
+ displayName?: Translatable;
240
241
  icon: string;
241
242
  position: CustomBuildingPosition;
242
243
  condition: string;
@@ -277,6 +278,7 @@ export interface ModBuilding extends BuildingBase {
277
278
  kind: 'modBuilding';
278
279
  condition?: string;
279
280
  name: string;
281
+ displayName?: Translatable;
280
282
  icon: string;
281
283
  screen: string;
282
284
  position: CustomBuildingPosition;
package/dist/mine.d.ts CHANGED
@@ -41,10 +41,13 @@ export type MineChamber = OreChamber | EventChamber | RandomDropChamber | Releas
41
41
  interface BaseChamber {
42
42
  icon: string;
43
43
  name: string;
44
+ displayName?: Translatable;
44
45
  description: Translatable;
45
46
  rarity: Rarity;
46
47
  condition: string;
47
48
  isUnique?: boolean;
49
+ /** If set, the chamber is only considered completed for pathing purposes when this game flag is truthy */
50
+ completeFlag?: string;
48
51
  }
49
52
  export interface OreChamber extends BaseChamber {
50
53
  kind: 'ore';
package/dist/mod.d.ts CHANGED
@@ -729,6 +729,36 @@ export interface ModAPI {
729
729
  * });
730
730
  */
731
731
  addPlayerSprite: (sprite: PlayerSprite) => void;
732
+ /**
733
+ * Register translations for a language.
734
+ * If the language already exists (e.g., 'ru'), mod translations will be merged
735
+ * with the base game translations, with mod translations taking precedence.
736
+ * If the language is new, it will be added to the available languages list.
737
+ *
738
+ * @param language - Language code (e.g., 'ru', 'zh', 'es', 'de')
739
+ * @param translations - Translation data in the same format as template.json
740
+ * @example
741
+ * // Add translations for a new language
742
+ * addTranslation('es', {
743
+ * "ui": {
744
+ * "buttons": {
745
+ * "[name] Continue": "Continuar",
746
+ * "[name] Cancel": "Cancelar"
747
+ * }
748
+ * }
749
+ * });
750
+ *
751
+ * // Override/add translations for an existing language
752
+ * addTranslation('ru', {
753
+ * "items": {
754
+ * "myModItem": {
755
+ * "[name] Magic Sword": "Волшебный меч",
756
+ * "[description] A sword imbued with magic.": "Меч, наполненный магией."
757
+ * }
758
+ * }
759
+ * });
760
+ */
761
+ addTranslation: (language: string, translations: Record<string, unknown>) => void;
732
762
  };
733
763
  utils: {
734
764
  /**
package/dist/quest.d.ts CHANGED
@@ -3,6 +3,7 @@ import { EventStep, GameEvent } from './event';
3
3
  import { ItemDesc } from './item';
4
4
  export interface Quest {
5
5
  name: string;
6
+ displayName?: Translatable;
6
7
  description: Translatable;
7
8
  category: 'main' | 'side' | 'missionHall' | 'craftingHall' | 'requestBoard' | 'guild';
8
9
  guild?: string;
@@ -86,6 +86,8 @@ export interface CombatState {
86
86
  flag: string;
87
87
  value: number;
88
88
  };
89
+ /** Snapshot of entire event state when combat started, restored on completion */
90
+ eventStateSnapshot?: GameEventState;
89
91
  }
90
92
  export type CraftingSliceState = ExistingCraftingState;
91
93
  export interface ResetFlag {
@@ -168,6 +170,8 @@ export interface AuctionState {
168
170
  playerItemsSold: AuctionItem[];
169
171
  totalPlayerSales: number;
170
172
  needsPlayerSellSelection: boolean;
173
+ /** Snapshot of entire event state when auction started, restored on completion */
174
+ eventStateSnapshot?: GameEventState;
171
175
  }
172
176
  export interface BreakthroughSliceState extends BreakthroughState {
173
177
  }
@@ -245,6 +249,8 @@ export interface TournamentSliceState {
245
249
  participants?: EnemyEntity[];
246
250
  previousRounds?: TournamentRound[];
247
251
  currentRound?: TournamentRound;
252
+ /** Snapshot of entire event state when tournament started, restored on completion */
253
+ eventStateSnapshot?: GameEventState;
248
254
  }
249
255
  export interface HouseState {
250
256
  inHouse: boolean;
@@ -270,6 +276,8 @@ export interface DualCultivationState {
270
276
  };
271
277
  animations: string[];
272
278
  messages: DualCultivationMessage[];
279
+ /** Snapshot of entire event state when dual cultivation started, restored on completion */
280
+ eventStateSnapshot?: GameEventState;
273
281
  }
274
282
  export interface GuildState {
275
283
  selectedGuild?: string;
@@ -288,6 +296,8 @@ export interface StoneCuttingState {
288
296
  isCutting: boolean;
289
297
  realm: Realm;
290
298
  gainedItems: ItemDesc[];
299
+ /** Snapshot of entire event state when stone cutting started, restored on completion */
300
+ eventStateSnapshot?: GameEventState;
291
301
  }
292
302
  export interface FallenStarState {
293
303
  activeSites: Record<string, FallenStarData>;
package/dist/stat.js CHANGED
@@ -214,11 +214,12 @@ export const uncommonStatTooltips = {
214
214
  healingBoost: '<n>Healing Boost</n> increases all healing received by a percentage.',
215
215
  barrierBoost: '<n>Barrier Boost</n> increases all barrier gained by a percentage.',
216
216
  overheal: '<n>Overheal</n> converts a percentage of healing beyond your maximum health into barrier.',
217
- protection: '<n>Protection</n> reduces damage taken to your health. Does not affect damage taken to your barrier.',
217
+ protection: '<n>Protection</n> reduces damage taken to your health with diminishing returns. Does not affect damage taken to your barrier.',
218
218
  weakness: '<n>Weakness</n> reduces your power.',
219
219
  vulnerability: '<n>Vulnerability</n> increases damage taken to your <n>health</n>. Does not affect damage taken to your barrier.',
220
- barrierBleed: '<n>Barrier Bleed</n> causes a percentage of your damage to bypass the enemy barrier and strike their health directly.',
220
+ barrierBleed: '<n>Barrier Bleed</n> causes a percentage of any damage to bypass your barrier and strike your health directly.',
221
221
  formationPartRecovery: 'Each point of <n>Formation Part Recovery</n> returns a <n>Formation Part</n> used in combat back to your Spatial Ring after battle.',
222
+ dr: '<n>Damage Resistance</n> reduces damage taken to your health after defense is applied. Each point equals <num>1%</num> reduction. Does not affect damage taken to your barrier.',
222
223
  };
223
224
  export const craftingStatToName = {
224
225
  maxpool: 'Max Qi Pool',
@@ -6,7 +6,7 @@
6
6
  export interface TranslatableString {
7
7
  readonly _translatable: true;
8
8
  readonly key: string;
9
- readonly variables?: Record<string, string | number>;
9
+ readonly variables?: Record<string, Translatable | number>;
10
10
  }
11
11
  /**
12
12
  * A deferred plural translation object. Stores both singular and plural keys
@@ -18,7 +18,7 @@ export interface TranslatablePlural {
18
18
  readonly countVar: string;
19
19
  readonly one: string;
20
20
  readonly other: string;
21
- readonly variables?: Record<string, string | number>;
21
+ readonly variables?: Record<string, Translatable | number>;
22
22
  }
23
23
  /**
24
24
  * A value that can be either a plain string or a deferred translation object.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "afnm-types",
3
- "version": "0.6.32",
3
+ "version": "0.6.34",
4
4
  "description": "Type definitions for Ascend From Nine Mountains",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",