afnm-types 0.6.40 → 0.6.42

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.
package/dist/buff.d.ts CHANGED
@@ -3,7 +3,7 @@ import { TechniqueElement } from './element';
3
3
  import { CombatStatistic, Scaling } from './stat';
4
4
  import { DamageType } from './DamageType';
5
5
  import type { CombatEntity } from './entity';
6
- export type TechniqueCondition = ChanceTechniqueCondition | BuffTechniqueCondition | HpTechniqueCondition | ConditionTechniqueCondition;
6
+ export type TechniqueCondition = ChanceTechniqueCondition | BuffTechniqueCondition | HpTechniqueCondition | ConditionTechniqueCondition | InventoryItemTechniqueCondition;
7
7
  export type DamageModifier = MultiplyDamageModifier | ReduceDamageModifier | ExpressionDamageModifier;
8
8
  interface MultiplyDamageModifier {
9
9
  kind: 'multiply';
@@ -38,6 +38,12 @@ interface ConditionTechniqueCondition {
38
38
  condition: string;
39
39
  tooltip?: string;
40
40
  }
41
+ interface InventoryItemTechniqueCondition {
42
+ kind: 'inventoryItem';
43
+ itemName: string;
44
+ count: number;
45
+ mode: 'more' | 'less' | 'equal';
46
+ }
41
47
  export interface Buff {
42
48
  name: string;
43
49
  displayName?: Translatable;
@@ -119,6 +125,7 @@ export interface Buff {
119
125
  afterTechnique?: boolean;
120
126
  combatImage?: BuffCombatImage;
121
127
  maxStacks?: number;
128
+ upgradeKey?: string;
122
129
  stacks: number;
123
130
  stacksAreDays?: boolean;
124
131
  stacksAreMonths?: boolean;
@@ -285,7 +292,7 @@ export interface TransformationCombatImage {
285
292
  animateOnEntity?: boolean;
286
293
  }
287
294
  export type RepairRule = 'all' | 'lowestHealth' | 'highestHealth';
288
- export type BuffEffect = DamageEffect | DamageSelfEffect | HealEffect | BarrierEffect | CreateBuffSelfEffect | ConsumeBuffSelfEffect | CreateBuffTargetEffect | ConsumeBuffTargetEffect | NegateEffect | AddEffect | MultiplyEffect | MergeEffect | TriggerEffect | ModifyBuffGroupEffect | CleanseToxicityEffect | SetStateEffect | ConvertSelfEffect | RepairEffect;
295
+ export type BuffEffect = DamageEffect | DamageSelfEffect | HealEffect | BarrierEffect | CreateBuffSelfEffect | ConsumeBuffSelfEffect | CreateBuffTargetEffect | ConsumeBuffTargetEffect | NegateEffect | AddEffect | MultiplyEffect | MergeEffect | TriggerEffect | ModifyBuffGroupEffect | CleanseToxicityEffect | SetStateEffect | ConvertSelfEffect | RepairEffect | ConsumeInventoryItemEffect;
289
296
  interface BaseBuff {
290
297
  condition?: TechniqueCondition;
291
298
  triggerKey?: string;
@@ -395,4 +402,9 @@ interface RepairEffect extends BaseBuff {
395
402
  /** Which matching buff(s) to repair: 'all', 'lowestHealth', or 'highestHealth' */
396
403
  rule: RepairRule;
397
404
  }
405
+ interface ConsumeInventoryItemEffect extends BaseBuff {
406
+ kind: 'consumeInventoryItem';
407
+ itemName: string;
408
+ amount: Scaling;
409
+ }
398
410
  export {};
@@ -152,6 +152,13 @@ export interface ShopCharacterInteraction extends BaseCharacterInteraction {
152
152
  costMultiplier: number;
153
153
  introSteps: EventStep[];
154
154
  exitSteps: EventStep[];
155
+ tokenCurrency?: {
156
+ currencyItem: Item;
157
+ tokenStock: Array<{
158
+ item: Item;
159
+ tokenCost: number;
160
+ }>;
161
+ };
155
162
  }
156
163
  export interface SparCharacterInteraction extends BaseCharacterInteraction {
157
164
  introSteps: EventStep[];
package/dist/entity.d.ts CHANGED
@@ -16,7 +16,7 @@ export interface CombatEffectTracking {
16
16
  barrier: number;
17
17
  damageTaken: number;
18
18
  }
19
- export declare const entityTypes: readonly ["Player", "Lifeform", "Enemy"];
19
+ export declare const entityTypes: readonly ["Player", "Lifeform", "Enemy", "PlayerParty", "EnemyParty", "System"];
20
20
  export type EntityType = (typeof entityTypes)[number];
21
21
  export declare const sexes: readonly ["male", "female"];
22
22
  export type Sex = (typeof sexes)[number];
@@ -308,6 +308,8 @@ export interface CombatEntity {
308
308
  party?: CombatEntity[];
309
309
  isPartyMember?: boolean;
310
310
  partyMemberIndex?: number;
311
+ /** UUID assigned at creation — only present on PlayerParty and EnemyParty entities */
312
+ partyId?: string;
311
313
  }
312
314
  export type StanceRule = SingleStance | RandomStance;
313
315
  export interface SingleStance {
@@ -341,6 +343,7 @@ export interface StoredStyle {
341
343
  autoName?: boolean;
342
344
  stances: StoredStance[];
343
345
  conditionalCycles?: ConditionalCycle[];
346
+ autoUseItems?: (string | undefined)[];
344
347
  }
345
348
  export type StoredRule = OpenerStoredRule | RotationStoredRule | ConditionalStoredRule | ConditionalRotationStoredRule;
346
349
  export interface OpenerStoredRule {
package/dist/entity.js CHANGED
@@ -1,4 +1,4 @@
1
- export const entityTypes = ['Player', 'Lifeform', 'Enemy'];
1
+ export const entityTypes = ['Player', 'Lifeform', 'Enemy', 'PlayerParty', 'EnemyParty', 'System'];
2
2
  export const sexes = ['male', 'female'];
3
3
  export const sexToName = {
4
4
  male: 'Male',
package/dist/event.d.ts CHANGED
@@ -22,6 +22,7 @@ export interface TriggeredEvent {
22
22
  max: number;
23
23
  };
24
24
  usesCooldown?: boolean;
25
+ minLocationCharacters?: number;
25
26
  }
26
27
  export interface GameEvent {
27
28
  location: string;
package/dist/item.d.ts CHANGED
@@ -131,6 +131,7 @@ export interface ClothingEnchantment extends Enchantment {
131
131
  }
132
132
  export interface TalismanItem extends ItemBase {
133
133
  kind: 'talisman';
134
+ combatStats?: Partial<CombatStatsMap>;
134
135
  buffs: {
135
136
  buff: Buff;
136
137
  buffStacks: Scaling;
@@ -150,6 +151,10 @@ export interface ArtefactItem extends ItemBase {
150
151
  combatStats?: Partial<CombatStatsMap>;
151
152
  charisma?: number;
152
153
  techniques: ArtefactTechnique[];
154
+ buffs?: {
155
+ buff: Buff;
156
+ buffStacks: Scaling;
157
+ }[];
153
158
  }
154
159
  export interface ArtefactEnchantment extends Enchantment {
155
160
  itemKind: 'artefact';
@@ -8,7 +8,7 @@ export const itemTypeToHarmonyType = {
8
8
  artefact: 'forge',
9
9
  mount: 'forge',
10
10
  cauldron: 'forge',
11
- flame: 'forge',
11
+ flame: 'resonance',
12
12
  // alchemical
13
13
  pill: 'alchemical',
14
14
  concoction: 'alchemical',
@@ -951,7 +951,7 @@ export function parseKeybindingString(keybinding) {
951
951
  // Check if a keyboard event matches a keybinding string
952
952
  export function matchesKeybinding(event, keybinding) {
953
953
  const parsed = parseKeybindingString(keybinding);
954
- return (event.key === parsed.key &&
954
+ return (getBaseKeyFromEvent(event) === parsed.key &&
955
955
  event.ctrlKey === parsed.ctrl &&
956
956
  event.altKey === parsed.alt &&
957
957
  event.shiftKey === parsed.shift);
@@ -9,6 +9,15 @@ import { ItemDesc } from './item';
9
9
  import { House, HouseData } from './house';
10
10
  import { Buff } from './buff';
11
11
  import { AmbienceName, MusicName } from './audio';
12
+ export interface LocationGatheringEvent {
13
+ steps: EventStep[];
14
+ triggerChance?: number;
15
+ resetMonths?: {
16
+ min: number;
17
+ max: number;
18
+ };
19
+ minCharacters?: number;
20
+ }
12
21
  export interface GameLocation {
13
22
  name: string;
14
23
  displayName?: Translatable;
@@ -35,6 +44,7 @@ export interface GameLocation {
35
44
  realm?: Realm;
36
45
  realmProgress?: RealmProgress;
37
46
  reputationName?: string;
47
+ gatheringEvent?: LocationGatheringEvent;
38
48
  }
39
49
  /**
40
50
  * A root location that serves as an entry point for location discovery.
@@ -81,6 +91,11 @@ export interface LocationEvent {
81
91
  rarity: Rarity;
82
92
  triggerChance?: number;
83
93
  condition: string;
94
+ cooldown?: {
95
+ key: string;
96
+ min: number;
97
+ max: number;
98
+ };
84
99
  }
85
100
  export interface LocationMapEvent {
86
101
  event: EventStep[];
package/dist/mine.d.ts CHANGED
@@ -48,6 +48,8 @@ interface BaseChamber {
48
48
  isUnique?: boolean;
49
49
  /** If set, the chamber is only considered completed for pathing purposes when this game flag is truthy */
50
50
  completeFlag?: string;
51
+ /** If set, quantity-based drops are scaled: Middle = ×1.5, Late = ×2 */
52
+ realmProgress?: RealmProgress;
51
53
  }
52
54
  export interface OreChamber extends BaseChamber {
53
55
  kind: 'ore';
package/dist/quest.d.ts CHANGED
@@ -63,6 +63,7 @@ interface CollectQuestStep extends QuestStepBase {
63
63
  item: string;
64
64
  alternates?: string[];
65
65
  amount: number;
66
+ completionCondition?: string;
66
67
  }
67
68
  export interface KillQuestStep extends QuestStepBase {
68
69
  kind: 'kill';
package/dist/stat.js CHANGED
@@ -285,7 +285,7 @@ export const physicalStatToName = {
285
285
  };
286
286
  export const physicalStatToDescription = {
287
287
  flesh: 'Your ability to withstand damage. Affects <b>Max Health</b> and <b>Barrier Effectiveness</b>.',
288
- digestion: 'Your ability to handle the effects of alchemical creations. Affects your <b>Toxicity Handling</b> (<b>Toxicity Resistance</b> and <b>Item Effectiveness</b>).',
288
+ digestion: 'Your ability to handle the effects of alchemical creations. Affects your <b>Toxicity Handling</b> (<b>Toxicity Resistance</b>) and <b>Item Effectiveness</b>.',
289
289
  muscles: 'Your ability to use your body to project force. Affects your crafting <b>Qi Intensity</b> and combat <b>Power</b>.',
290
290
  dantian: 'Your ability to store and channel Qi. Affects your combat <b>Max Barrier</b>, crafting <b>Max Qi Pool</b>, <b>Qi Absorption</b>, and <b>Technique Mastery Points</b>.',
291
291
  meridians: 'Your ability to control Qi. Affects crafting <b>Qi Control</b> and combat <b>Artefact Power</b>.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "afnm-types",
3
- "version": "0.6.40",
3
+ "version": "0.6.42",
4
4
  "description": "Type definitions for Ascend From Nine Mountains",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",