afnm-types 0.6.27 → 0.6.29
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 +10 -1
- package/dist/keybindings.d.ts +23 -2
- package/dist/keybindings.js +532 -22
- package/dist/mod.d.ts +5 -0
- package/dist/stat.d.ts +5 -1
- package/dist/stat.js +20 -0
- package/package.json +4 -4
package/dist/buff.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ export interface Buff {
|
|
|
72
72
|
onRoundStartEffects?: BuffEffect[];
|
|
73
73
|
onCombatStartEffects?: BuffEffect[];
|
|
74
74
|
interceptBuffEffects?: {
|
|
75
|
-
buff: Buff;
|
|
75
|
+
buff: Buff | string;
|
|
76
76
|
effects: BuffEffect[];
|
|
77
77
|
cancelApplication: boolean;
|
|
78
78
|
}[];
|
|
@@ -82,6 +82,11 @@ export interface Buff {
|
|
|
82
82
|
/** If true, this trigger will also fire when the opponent triggers the same event */
|
|
83
83
|
listenToOpponent?: boolean;
|
|
84
84
|
}[];
|
|
85
|
+
/** Block specific triggers from executing. Used to prevent effects like celestial rotation. */
|
|
86
|
+
blockTriggerEffects?: {
|
|
87
|
+
trigger: string;
|
|
88
|
+
effects: BuffEffect[];
|
|
89
|
+
}[];
|
|
85
90
|
damageInterceptorEffects?: {
|
|
86
91
|
trigger?: TechniqueCondition;
|
|
87
92
|
damageModifier: DamageModifier;
|
|
@@ -124,6 +129,10 @@ export interface FloatingCombatImage extends BaseCombatImage {
|
|
|
124
129
|
position: 'floating';
|
|
125
130
|
entrance?: 'rotate' | 'grow';
|
|
126
131
|
stacksScale?: number;
|
|
132
|
+
offset?: {
|
|
133
|
+
x: number;
|
|
134
|
+
y: number;
|
|
135
|
+
};
|
|
127
136
|
mergedImage?: {
|
|
128
137
|
image: string;
|
|
129
138
|
otherBuff: string;
|
package/dist/keybindings.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type KeybindingCategory = 'general' | 'navigation' | 'ui' | 'world' | 'combat' | 'crafting' | 'dialogs' | 'gamepad';
|
|
2
|
-
export type KeybindingAction = 'confirm' | 'cancel' | 'pause' | 'alternateConfirm' | 'moveUp' | 'moveDown' | 'moveLeft' | 'moveRight' | 'openInventory' | 'openQuests' | 'openCharacterStats' | 'openTechniques' | 'openCalendar' | 'openWorldMap' | 'combatSelectStance0' | 'combatSelectStance1' | 'combatSelectStance2' | 'combatSelectStance3' | 'combatSelectStance4' | 'combatSelectStance5' | 'combatSelectStance6' | 'combatSelectStance7' | 'combatSelectStance8' | 'combatSelectStance9' | 'combatToggleSpeed' | 'combatToggleLog' | 'combatShowStats' | 'combatAutoBattle' | 'craftingAction1' | 'craftingAction2' | 'craftingAction3' | 'craftingAction4' | 'craftingAction5' | 'craftingAction6' | 'craftingAction7' | 'craftingAction8' | 'craftingAction9' | 'craftingAction10' | 'dialogChoice1' | 'dialogChoice2' | 'dialogChoice3' | 'dialogChoice4' | 'dialogChoice5' | 'dialogChoice6' | 'dialogChoice7' | 'dialogChoice8' | 'dialogChoice9' | 'gamepadConfirm' | 'gamepadCancel' | 'gamepadUp' | 'gamepadDown' | 'gamepadLeft' | 'gamepadRight';
|
|
2
|
+
export type KeybindingAction = 'confirm' | 'cancel' | 'pause' | 'alternateConfirm' | 'moveUp' | 'moveDown' | 'moveLeft' | 'moveRight' | 'openInventory' | 'openQuests' | 'openCharacterStats' | 'openTechniques' | 'openCalendar' | 'openWorldMap' | 'combatSelectStance0' | 'combatSelectStance1' | 'combatSelectStance2' | 'combatSelectStance3' | 'combatSelectStance4' | 'combatSelectStance5' | 'combatSelectStance6' | 'combatSelectStance7' | 'combatSelectStance8' | 'combatSelectStance9' | 'combatToggleSpeed' | 'combatToggleLog' | 'combatShowStats' | 'combatAutoBattle' | 'combatUseItem' | 'craftingAction1' | 'craftingAction2' | 'craftingAction3' | 'craftingAction4' | 'craftingAction5' | 'craftingAction6' | 'craftingAction7' | 'craftingAction8' | 'craftingAction9' | 'craftingAction10' | 'craftingAction11' | 'craftingAction12' | 'craftingAction13' | 'craftingAction14' | 'craftingAction15' | 'craftingAction16' | 'craftingAction17' | 'craftingAction18' | 'craftingAction19' | 'craftingAction20' | 'craftingAction21' | 'craftingAction22' | 'craftingAction23' | 'craftingAction24' | 'craftingAction25' | 'craftingAction26' | 'craftingAction27' | 'craftingAction28' | 'craftingAction29' | 'craftingAction30' | 'craftingAction31' | 'craftingAction32' | 'craftingAction33' | 'craftingAction34' | 'craftingAction35' | 'craftingAction36' | 'craftingAction37' | 'craftingAction38' | 'craftingAction39' | 'craftingAction40' | 'craftingAction41' | 'craftingAction42' | 'craftingAction43' | 'craftingAction44' | 'craftingAction45' | 'craftingAction46' | 'craftingAction47' | 'craftingAction48' | 'craftingAction49' | 'craftingAction50' | 'dialogChoice1' | 'dialogChoice2' | 'dialogChoice3' | 'dialogChoice4' | 'dialogChoice5' | 'dialogChoice6' | 'dialogChoice7' | 'dialogChoice8' | 'dialogChoice9' | 'gamepadConfirm' | 'gamepadCancel' | 'gamepadUp' | 'gamepadDown' | 'gamepadLeft' | 'gamepadRight';
|
|
3
3
|
export interface KeybindingDefinition {
|
|
4
4
|
action: KeybindingAction;
|
|
5
5
|
category: KeybindingCategory;
|
|
@@ -15,6 +15,27 @@ export declare const keybindingCategoryInfo: Record<KeybindingCategory, {
|
|
|
15
15
|
description: string;
|
|
16
16
|
}>;
|
|
17
17
|
export declare const defaultKeybindings: KeybindingsMap;
|
|
18
|
-
export declare
|
|
18
|
+
export declare const MODIFIER_PREFIXES: {
|
|
19
|
+
readonly ctrl: "Ctrl+";
|
|
20
|
+
readonly alt: "Alt+";
|
|
21
|
+
readonly shift: "Shift+";
|
|
22
|
+
};
|
|
23
|
+
export declare function getBaseKeyFromEvent(event: KeyboardEvent): string;
|
|
24
|
+
export declare function buildKeybindingString(key: string, modifiers: {
|
|
25
|
+
ctrl?: boolean;
|
|
26
|
+
alt?: boolean;
|
|
27
|
+
shift?: boolean;
|
|
28
|
+
}): string;
|
|
29
|
+
export declare function buildKeybindingFromEvent(event: KeyboardEvent): string;
|
|
30
|
+
export declare function parseKeybindingString(keybinding: string | undefined | null): {
|
|
31
|
+
key: string;
|
|
32
|
+
ctrl: boolean;
|
|
33
|
+
alt: boolean;
|
|
34
|
+
shift: boolean;
|
|
35
|
+
};
|
|
36
|
+
export declare function matchesKeybinding(event: KeyboardEvent, keybinding: string): boolean;
|
|
37
|
+
export declare function getKeyDisplayName(keybinding: string | undefined | null): string;
|
|
38
|
+
export declare function getKeyShortDisplayName(keybinding: string | undefined | null): string;
|
|
39
|
+
export declare function isModifierKey(key: string): boolean;
|
|
19
40
|
export declare function isKeyAllowed(key: string): boolean;
|
|
20
41
|
export declare function getKeybindingsByCategory(category: KeybindingCategory): KeybindingDefinition[];
|
package/dist/keybindings.js
CHANGED
|
@@ -133,6 +133,14 @@ export const keybindingDefinitions = [
|
|
|
133
133
|
defaultKey: 'b',
|
|
134
134
|
allowRebind: true,
|
|
135
135
|
},
|
|
136
|
+
{
|
|
137
|
+
action: 'combatUseItem',
|
|
138
|
+
category: 'combat',
|
|
139
|
+
displayName: 'Use Item',
|
|
140
|
+
description: 'Open the use item dialog during combat',
|
|
141
|
+
defaultKey: 'e',
|
|
142
|
+
allowRebind: true,
|
|
143
|
+
},
|
|
136
144
|
{
|
|
137
145
|
action: 'combatSelectStance1',
|
|
138
146
|
category: 'combat',
|
|
@@ -310,6 +318,330 @@ export const keybindingDefinitions = [
|
|
|
310
318
|
defaultKey: '0',
|
|
311
319
|
allowRebind: true,
|
|
312
320
|
},
|
|
321
|
+
// Crafting Actions 11-20 (Shift+1-0)
|
|
322
|
+
{
|
|
323
|
+
action: 'craftingAction11',
|
|
324
|
+
category: 'crafting',
|
|
325
|
+
displayName: 'Crafting Action 11',
|
|
326
|
+
description: 'Execute crafting technique 11',
|
|
327
|
+
defaultKey: 'Shift+1',
|
|
328
|
+
allowRebind: true,
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
action: 'craftingAction12',
|
|
332
|
+
category: 'crafting',
|
|
333
|
+
displayName: 'Crafting Action 12',
|
|
334
|
+
description: 'Execute crafting technique 12',
|
|
335
|
+
defaultKey: 'Shift+2',
|
|
336
|
+
allowRebind: true,
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
action: 'craftingAction13',
|
|
340
|
+
category: 'crafting',
|
|
341
|
+
displayName: 'Crafting Action 13',
|
|
342
|
+
description: 'Execute crafting technique 13',
|
|
343
|
+
defaultKey: 'Shift+3',
|
|
344
|
+
allowRebind: true,
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
action: 'craftingAction14',
|
|
348
|
+
category: 'crafting',
|
|
349
|
+
displayName: 'Crafting Action 14',
|
|
350
|
+
description: 'Execute crafting technique 14',
|
|
351
|
+
defaultKey: 'Shift+4',
|
|
352
|
+
allowRebind: true,
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
action: 'craftingAction15',
|
|
356
|
+
category: 'crafting',
|
|
357
|
+
displayName: 'Crafting Action 15',
|
|
358
|
+
description: 'Execute crafting technique 15',
|
|
359
|
+
defaultKey: 'Shift+5',
|
|
360
|
+
allowRebind: true,
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
action: 'craftingAction16',
|
|
364
|
+
category: 'crafting',
|
|
365
|
+
displayName: 'Crafting Action 16',
|
|
366
|
+
description: 'Execute crafting technique 16',
|
|
367
|
+
defaultKey: 'Shift+6',
|
|
368
|
+
allowRebind: true,
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
action: 'craftingAction17',
|
|
372
|
+
category: 'crafting',
|
|
373
|
+
displayName: 'Crafting Action 17',
|
|
374
|
+
description: 'Execute crafting technique 17',
|
|
375
|
+
defaultKey: 'Shift+7',
|
|
376
|
+
allowRebind: true,
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
action: 'craftingAction18',
|
|
380
|
+
category: 'crafting',
|
|
381
|
+
displayName: 'Crafting Action 18',
|
|
382
|
+
description: 'Execute crafting technique 18',
|
|
383
|
+
defaultKey: 'Shift+8',
|
|
384
|
+
allowRebind: true,
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
action: 'craftingAction19',
|
|
388
|
+
category: 'crafting',
|
|
389
|
+
displayName: 'Crafting Action 19',
|
|
390
|
+
description: 'Execute crafting technique 19',
|
|
391
|
+
defaultKey: 'Shift+9',
|
|
392
|
+
allowRebind: true,
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
action: 'craftingAction20',
|
|
396
|
+
category: 'crafting',
|
|
397
|
+
displayName: 'Crafting Action 20',
|
|
398
|
+
description: 'Execute crafting technique 20',
|
|
399
|
+
defaultKey: 'Shift+0',
|
|
400
|
+
allowRebind: true,
|
|
401
|
+
},
|
|
402
|
+
// Crafting Actions 21-30 (Ctrl+1-0)
|
|
403
|
+
{
|
|
404
|
+
action: 'craftingAction21',
|
|
405
|
+
category: 'crafting',
|
|
406
|
+
displayName: 'Crafting Action 21',
|
|
407
|
+
description: 'Execute crafting technique 21',
|
|
408
|
+
defaultKey: 'Ctrl+1',
|
|
409
|
+
allowRebind: true,
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
action: 'craftingAction22',
|
|
413
|
+
category: 'crafting',
|
|
414
|
+
displayName: 'Crafting Action 22',
|
|
415
|
+
description: 'Execute crafting technique 22',
|
|
416
|
+
defaultKey: 'Ctrl+2',
|
|
417
|
+
allowRebind: true,
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
action: 'craftingAction23',
|
|
421
|
+
category: 'crafting',
|
|
422
|
+
displayName: 'Crafting Action 23',
|
|
423
|
+
description: 'Execute crafting technique 23',
|
|
424
|
+
defaultKey: 'Ctrl+3',
|
|
425
|
+
allowRebind: true,
|
|
426
|
+
},
|
|
427
|
+
{
|
|
428
|
+
action: 'craftingAction24',
|
|
429
|
+
category: 'crafting',
|
|
430
|
+
displayName: 'Crafting Action 24',
|
|
431
|
+
description: 'Execute crafting technique 24',
|
|
432
|
+
defaultKey: 'Ctrl+4',
|
|
433
|
+
allowRebind: true,
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
action: 'craftingAction25',
|
|
437
|
+
category: 'crafting',
|
|
438
|
+
displayName: 'Crafting Action 25',
|
|
439
|
+
description: 'Execute crafting technique 25',
|
|
440
|
+
defaultKey: 'Ctrl+5',
|
|
441
|
+
allowRebind: true,
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
action: 'craftingAction26',
|
|
445
|
+
category: 'crafting',
|
|
446
|
+
displayName: 'Crafting Action 26',
|
|
447
|
+
description: 'Execute crafting technique 26',
|
|
448
|
+
defaultKey: 'Ctrl+6',
|
|
449
|
+
allowRebind: true,
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
action: 'craftingAction27',
|
|
453
|
+
category: 'crafting',
|
|
454
|
+
displayName: 'Crafting Action 27',
|
|
455
|
+
description: 'Execute crafting technique 27',
|
|
456
|
+
defaultKey: 'Ctrl+7',
|
|
457
|
+
allowRebind: true,
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
action: 'craftingAction28',
|
|
461
|
+
category: 'crafting',
|
|
462
|
+
displayName: 'Crafting Action 28',
|
|
463
|
+
description: 'Execute crafting technique 28',
|
|
464
|
+
defaultKey: 'Ctrl+8',
|
|
465
|
+
allowRebind: true,
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
action: 'craftingAction29',
|
|
469
|
+
category: 'crafting',
|
|
470
|
+
displayName: 'Crafting Action 29',
|
|
471
|
+
description: 'Execute crafting technique 29',
|
|
472
|
+
defaultKey: 'Ctrl+9',
|
|
473
|
+
allowRebind: true,
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
action: 'craftingAction30',
|
|
477
|
+
category: 'crafting',
|
|
478
|
+
displayName: 'Crafting Action 30',
|
|
479
|
+
description: 'Execute crafting technique 30',
|
|
480
|
+
defaultKey: 'Ctrl+0',
|
|
481
|
+
allowRebind: true,
|
|
482
|
+
},
|
|
483
|
+
// Crafting Actions 31-40 (Alt+1-0)
|
|
484
|
+
{
|
|
485
|
+
action: 'craftingAction31',
|
|
486
|
+
category: 'crafting',
|
|
487
|
+
displayName: 'Crafting Action 31',
|
|
488
|
+
description: 'Execute crafting technique 31',
|
|
489
|
+
defaultKey: 'Alt+1',
|
|
490
|
+
allowRebind: true,
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
action: 'craftingAction32',
|
|
494
|
+
category: 'crafting',
|
|
495
|
+
displayName: 'Crafting Action 32',
|
|
496
|
+
description: 'Execute crafting technique 32',
|
|
497
|
+
defaultKey: 'Alt+2',
|
|
498
|
+
allowRebind: true,
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
action: 'craftingAction33',
|
|
502
|
+
category: 'crafting',
|
|
503
|
+
displayName: 'Crafting Action 33',
|
|
504
|
+
description: 'Execute crafting technique 33',
|
|
505
|
+
defaultKey: 'Alt+3',
|
|
506
|
+
allowRebind: true,
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
action: 'craftingAction34',
|
|
510
|
+
category: 'crafting',
|
|
511
|
+
displayName: 'Crafting Action 34',
|
|
512
|
+
description: 'Execute crafting technique 34',
|
|
513
|
+
defaultKey: 'Alt+4',
|
|
514
|
+
allowRebind: true,
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
action: 'craftingAction35',
|
|
518
|
+
category: 'crafting',
|
|
519
|
+
displayName: 'Crafting Action 35',
|
|
520
|
+
description: 'Execute crafting technique 35',
|
|
521
|
+
defaultKey: 'Alt+5',
|
|
522
|
+
allowRebind: true,
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
action: 'craftingAction36',
|
|
526
|
+
category: 'crafting',
|
|
527
|
+
displayName: 'Crafting Action 36',
|
|
528
|
+
description: 'Execute crafting technique 36',
|
|
529
|
+
defaultKey: 'Alt+6',
|
|
530
|
+
allowRebind: true,
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
action: 'craftingAction37',
|
|
534
|
+
category: 'crafting',
|
|
535
|
+
displayName: 'Crafting Action 37',
|
|
536
|
+
description: 'Execute crafting technique 37',
|
|
537
|
+
defaultKey: 'Alt+7',
|
|
538
|
+
allowRebind: true,
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
action: 'craftingAction38',
|
|
542
|
+
category: 'crafting',
|
|
543
|
+
displayName: 'Crafting Action 38',
|
|
544
|
+
description: 'Execute crafting technique 38',
|
|
545
|
+
defaultKey: 'Alt+8',
|
|
546
|
+
allowRebind: true,
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
action: 'craftingAction39',
|
|
550
|
+
category: 'crafting',
|
|
551
|
+
displayName: 'Crafting Action 39',
|
|
552
|
+
description: 'Execute crafting technique 39',
|
|
553
|
+
defaultKey: 'Alt+9',
|
|
554
|
+
allowRebind: true,
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
action: 'craftingAction40',
|
|
558
|
+
category: 'crafting',
|
|
559
|
+
displayName: 'Crafting Action 40',
|
|
560
|
+
description: 'Execute crafting technique 40',
|
|
561
|
+
defaultKey: 'Alt+0',
|
|
562
|
+
allowRebind: true,
|
|
563
|
+
},
|
|
564
|
+
// Crafting Actions 41-50 (Ctrl+Shift+1-0)
|
|
565
|
+
{
|
|
566
|
+
action: 'craftingAction41',
|
|
567
|
+
category: 'crafting',
|
|
568
|
+
displayName: 'Crafting Action 41',
|
|
569
|
+
description: 'Execute crafting technique 41',
|
|
570
|
+
defaultKey: 'Ctrl+Shift+1',
|
|
571
|
+
allowRebind: true,
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
action: 'craftingAction42',
|
|
575
|
+
category: 'crafting',
|
|
576
|
+
displayName: 'Crafting Action 42',
|
|
577
|
+
description: 'Execute crafting technique 42',
|
|
578
|
+
defaultKey: 'Ctrl+Shift+2',
|
|
579
|
+
allowRebind: true,
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
action: 'craftingAction43',
|
|
583
|
+
category: 'crafting',
|
|
584
|
+
displayName: 'Crafting Action 43',
|
|
585
|
+
description: 'Execute crafting technique 43',
|
|
586
|
+
defaultKey: 'Ctrl+Shift+3',
|
|
587
|
+
allowRebind: true,
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
action: 'craftingAction44',
|
|
591
|
+
category: 'crafting',
|
|
592
|
+
displayName: 'Crafting Action 44',
|
|
593
|
+
description: 'Execute crafting technique 44',
|
|
594
|
+
defaultKey: 'Ctrl+Shift+4',
|
|
595
|
+
allowRebind: true,
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
action: 'craftingAction45',
|
|
599
|
+
category: 'crafting',
|
|
600
|
+
displayName: 'Crafting Action 45',
|
|
601
|
+
description: 'Execute crafting technique 45',
|
|
602
|
+
defaultKey: 'Ctrl+Shift+5',
|
|
603
|
+
allowRebind: true,
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
action: 'craftingAction46',
|
|
607
|
+
category: 'crafting',
|
|
608
|
+
displayName: 'Crafting Action 46',
|
|
609
|
+
description: 'Execute crafting technique 46',
|
|
610
|
+
defaultKey: 'Ctrl+Shift+6',
|
|
611
|
+
allowRebind: true,
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
action: 'craftingAction47',
|
|
615
|
+
category: 'crafting',
|
|
616
|
+
displayName: 'Crafting Action 47',
|
|
617
|
+
description: 'Execute crafting technique 47',
|
|
618
|
+
defaultKey: 'Ctrl+Shift+7',
|
|
619
|
+
allowRebind: true,
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
action: 'craftingAction48',
|
|
623
|
+
category: 'crafting',
|
|
624
|
+
displayName: 'Crafting Action 48',
|
|
625
|
+
description: 'Execute crafting technique 48',
|
|
626
|
+
defaultKey: 'Ctrl+Shift+8',
|
|
627
|
+
allowRebind: true,
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
action: 'craftingAction49',
|
|
631
|
+
category: 'crafting',
|
|
632
|
+
displayName: 'Crafting Action 49',
|
|
633
|
+
description: 'Execute crafting technique 49',
|
|
634
|
+
defaultKey: 'Ctrl+Shift+9',
|
|
635
|
+
allowRebind: true,
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
action: 'craftingAction50',
|
|
639
|
+
category: 'crafting',
|
|
640
|
+
displayName: 'Crafting Action 50',
|
|
641
|
+
description: 'Execute crafting technique 50',
|
|
642
|
+
defaultKey: 'Ctrl+Shift+0',
|
|
643
|
+
allowRebind: true,
|
|
644
|
+
},
|
|
313
645
|
// Dialog Choices (Number keys 1-9)
|
|
314
646
|
{
|
|
315
647
|
action: 'dialogChoice1',
|
|
@@ -470,28 +802,203 @@ export const keybindingCategoryInfo = {
|
|
|
470
802
|
};
|
|
471
803
|
// Default keybindings
|
|
472
804
|
export const defaultKeybindings = Object.fromEntries(keybindingDefinitions.map((def) => [def.action, def.defaultKey]));
|
|
473
|
-
//
|
|
474
|
-
export
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
805
|
+
// Modifier key prefixes used in keybinding strings
|
|
806
|
+
export const MODIFIER_PREFIXES = {
|
|
807
|
+
ctrl: 'Ctrl+',
|
|
808
|
+
alt: 'Alt+',
|
|
809
|
+
shift: 'Shift+',
|
|
810
|
+
};
|
|
811
|
+
// Map from KeyboardEvent.code to base key name (for physical key identification)
|
|
812
|
+
const codeToBaseKey = {
|
|
813
|
+
// Number row
|
|
814
|
+
Digit0: '0',
|
|
815
|
+
Digit1: '1',
|
|
816
|
+
Digit2: '2',
|
|
817
|
+
Digit3: '3',
|
|
818
|
+
Digit4: '4',
|
|
819
|
+
Digit5: '5',
|
|
820
|
+
Digit6: '6',
|
|
821
|
+
Digit7: '7',
|
|
822
|
+
Digit8: '8',
|
|
823
|
+
Digit9: '9',
|
|
824
|
+
// Letters
|
|
825
|
+
KeyA: 'a',
|
|
826
|
+
KeyB: 'b',
|
|
827
|
+
KeyC: 'c',
|
|
828
|
+
KeyD: 'd',
|
|
829
|
+
KeyE: 'e',
|
|
830
|
+
KeyF: 'f',
|
|
831
|
+
KeyG: 'g',
|
|
832
|
+
KeyH: 'h',
|
|
833
|
+
KeyI: 'i',
|
|
834
|
+
KeyJ: 'j',
|
|
835
|
+
KeyK: 'k',
|
|
836
|
+
KeyL: 'l',
|
|
837
|
+
KeyM: 'm',
|
|
838
|
+
KeyN: 'n',
|
|
839
|
+
KeyO: 'o',
|
|
840
|
+
KeyP: 'p',
|
|
841
|
+
KeyQ: 'q',
|
|
842
|
+
KeyR: 'r',
|
|
843
|
+
KeyS: 's',
|
|
844
|
+
KeyT: 't',
|
|
845
|
+
KeyU: 'u',
|
|
846
|
+
KeyV: 'v',
|
|
847
|
+
KeyW: 'w',
|
|
848
|
+
KeyX: 'x',
|
|
849
|
+
KeyY: 'y',
|
|
850
|
+
KeyZ: 'z',
|
|
851
|
+
// Punctuation
|
|
852
|
+
Minus: '-',
|
|
853
|
+
Equal: '=',
|
|
854
|
+
BracketLeft: '[',
|
|
855
|
+
BracketRight: ']',
|
|
856
|
+
Backslash: '\\',
|
|
857
|
+
Semicolon: ';',
|
|
858
|
+
Quote: "'",
|
|
859
|
+
Backquote: '`',
|
|
860
|
+
Comma: ',',
|
|
861
|
+
Period: '.',
|
|
862
|
+
Slash: '/',
|
|
863
|
+
// Special keys
|
|
864
|
+
Space: ' ',
|
|
865
|
+
Enter: 'Enter',
|
|
866
|
+
Escape: 'Escape',
|
|
867
|
+
Backspace: 'Backspace',
|
|
868
|
+
Tab: 'Tab',
|
|
869
|
+
Delete: 'Delete',
|
|
870
|
+
Home: 'Home',
|
|
871
|
+
End: 'End',
|
|
872
|
+
PageUp: 'PageUp',
|
|
873
|
+
PageDown: 'PageDown',
|
|
874
|
+
ArrowUp: 'ArrowUp',
|
|
875
|
+
ArrowDown: 'ArrowDown',
|
|
876
|
+
ArrowLeft: 'ArrowLeft',
|
|
877
|
+
ArrowRight: 'ArrowRight',
|
|
878
|
+
// Function keys
|
|
879
|
+
F1: 'F1',
|
|
880
|
+
F2: 'F2',
|
|
881
|
+
F3: 'F3',
|
|
882
|
+
F4: 'F4',
|
|
883
|
+
F5: 'F5',
|
|
884
|
+
F6: 'F6',
|
|
885
|
+
F7: 'F7',
|
|
886
|
+
F8: 'F8',
|
|
887
|
+
F9: 'F9',
|
|
888
|
+
F10: 'F10',
|
|
889
|
+
F11: 'F11',
|
|
890
|
+
F12: 'F12',
|
|
891
|
+
};
|
|
892
|
+
// Get the base key from a keyboard event (uses code for consistent physical key)
|
|
893
|
+
export function getBaseKeyFromEvent(event) {
|
|
894
|
+
// Try to get base key from code first (handles Shift+2 -> '2' instead of '!')
|
|
895
|
+
const baseKey = codeToBaseKey[event.code];
|
|
896
|
+
if (baseKey) {
|
|
897
|
+
return baseKey;
|
|
898
|
+
}
|
|
899
|
+
// Fall back to event.key for unmapped keys
|
|
900
|
+
return event.key;
|
|
901
|
+
}
|
|
902
|
+
// Build a keybinding string from a key and modifier state
|
|
903
|
+
export function buildKeybindingString(key, modifiers) {
|
|
904
|
+
let result = '';
|
|
905
|
+
if (modifiers.ctrl)
|
|
906
|
+
result += MODIFIER_PREFIXES.ctrl;
|
|
907
|
+
if (modifiers.alt)
|
|
908
|
+
result += MODIFIER_PREFIXES.alt;
|
|
909
|
+
if (modifiers.shift)
|
|
910
|
+
result += MODIFIER_PREFIXES.shift;
|
|
911
|
+
result += key;
|
|
912
|
+
return result;
|
|
913
|
+
}
|
|
914
|
+
// Build a keybinding string directly from a keyboard event
|
|
915
|
+
export function buildKeybindingFromEvent(event) {
|
|
916
|
+
const baseKey = getBaseKeyFromEvent(event);
|
|
917
|
+
return buildKeybindingString(baseKey, {
|
|
918
|
+
ctrl: event.ctrlKey,
|
|
919
|
+
alt: event.altKey,
|
|
920
|
+
shift: event.shiftKey,
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
// Parse a keybinding string into its components
|
|
924
|
+
export function parseKeybindingString(keybinding) {
|
|
925
|
+
if (!keybinding) {
|
|
926
|
+
return { key: '', ctrl: false, alt: false, shift: false };
|
|
927
|
+
}
|
|
928
|
+
let remaining = keybinding;
|
|
929
|
+
const ctrl = remaining.startsWith(MODIFIER_PREFIXES.ctrl);
|
|
930
|
+
if (ctrl)
|
|
931
|
+
remaining = remaining.slice(MODIFIER_PREFIXES.ctrl.length);
|
|
932
|
+
const alt = remaining.startsWith(MODIFIER_PREFIXES.alt);
|
|
933
|
+
if (alt)
|
|
934
|
+
remaining = remaining.slice(MODIFIER_PREFIXES.alt.length);
|
|
935
|
+
const shift = remaining.startsWith(MODIFIER_PREFIXES.shift);
|
|
936
|
+
if (shift)
|
|
937
|
+
remaining = remaining.slice(MODIFIER_PREFIXES.shift.length);
|
|
938
|
+
return { key: remaining, ctrl, alt, shift };
|
|
939
|
+
}
|
|
940
|
+
// Check if a keyboard event matches a keybinding string
|
|
941
|
+
export function matchesKeybinding(event, keybinding) {
|
|
942
|
+
const parsed = parseKeybindingString(keybinding);
|
|
943
|
+
return (event.key === parsed.key &&
|
|
944
|
+
event.ctrlKey === parsed.ctrl &&
|
|
945
|
+
event.altKey === parsed.alt &&
|
|
946
|
+
event.shiftKey === parsed.shift);
|
|
947
|
+
}
|
|
948
|
+
const singleKeyDisplayNames = {
|
|
949
|
+
Enter: 'Enter',
|
|
950
|
+
Escape: 'Esc',
|
|
951
|
+
' ': 'Space',
|
|
952
|
+
ArrowUp: '↑',
|
|
953
|
+
ArrowDown: '↓',
|
|
954
|
+
ArrowLeft: '←',
|
|
955
|
+
ArrowRight: '→',
|
|
956
|
+
Tab: 'Tab',
|
|
957
|
+
Shift: 'Shift',
|
|
958
|
+
Control: 'Ctrl',
|
|
959
|
+
Alt: 'Alt',
|
|
960
|
+
Backspace: 'Backspace',
|
|
961
|
+
Delete: 'Delete',
|
|
962
|
+
Home: 'Home',
|
|
963
|
+
End: 'End',
|
|
964
|
+
PageUp: 'PgUp',
|
|
965
|
+
PageDown: 'PgDn',
|
|
966
|
+
};
|
|
967
|
+
// Helper to get display name for a key (full version)
|
|
968
|
+
export function getKeyDisplayName(keybinding) {
|
|
969
|
+
var _a;
|
|
970
|
+
if (!keybinding)
|
|
971
|
+
return '';
|
|
972
|
+
const parsed = parseKeybindingString(keybinding);
|
|
973
|
+
let result = '';
|
|
974
|
+
if (parsed.ctrl)
|
|
975
|
+
result += 'Ctrl+';
|
|
976
|
+
if (parsed.alt)
|
|
977
|
+
result += 'Alt+';
|
|
978
|
+
if (parsed.shift)
|
|
979
|
+
result += 'Shift+';
|
|
980
|
+
result += singleKeyDisplayNames[parsed.key] || ((_a = parsed.key) === null || _a === void 0 ? void 0 : _a.toUpperCase());
|
|
981
|
+
return result;
|
|
982
|
+
}
|
|
983
|
+
// Helper to get short display name for a key (compact version for UI previews)
|
|
984
|
+
export function getKeyShortDisplayName(keybinding) {
|
|
985
|
+
var _a;
|
|
986
|
+
if (!keybinding)
|
|
987
|
+
return '';
|
|
988
|
+
const parsed = parseKeybindingString(keybinding);
|
|
989
|
+
let result = '';
|
|
990
|
+
if (parsed.ctrl)
|
|
991
|
+
result += 'C+';
|
|
992
|
+
if (parsed.alt)
|
|
993
|
+
result += 'A+';
|
|
994
|
+
if (parsed.shift)
|
|
995
|
+
result += 'S+';
|
|
996
|
+
result += singleKeyDisplayNames[parsed.key] || ((_a = parsed.key) === null || _a === void 0 ? void 0 : _a.toUpperCase());
|
|
997
|
+
return result;
|
|
998
|
+
}
|
|
999
|
+
// Check if a key is a modifier key (not allowed as standalone binding)
|
|
1000
|
+
export function isModifierKey(key) {
|
|
1001
|
+
return ['Shift', 'Control', 'Alt', 'Meta'].includes(key);
|
|
495
1002
|
}
|
|
496
1003
|
// Validate if a key is allowed for binding
|
|
497
1004
|
export function isKeyAllowed(key) {
|
|
@@ -500,6 +1007,9 @@ export function isKeyAllowed(key) {
|
|
|
500
1007
|
'F11', // Fullscreen
|
|
501
1008
|
'F12', // Dev tools
|
|
502
1009
|
'Meta', // Windows/Cmd key
|
|
1010
|
+
'Shift', // Modifier keys alone not allowed
|
|
1011
|
+
'Control',
|
|
1012
|
+
'Alt',
|
|
503
1013
|
];
|
|
504
1014
|
return !disallowedKeys.includes(key);
|
|
505
1015
|
}
|
package/dist/mod.d.ts
CHANGED
package/dist/stat.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { TechniqueElement } from './element';
|
|
|
3
3
|
export declare const physicalStatistics: readonly ["eyes", "meridians", "dantian", "muscles", "digestion", "flesh"];
|
|
4
4
|
export declare const socialStatistics: readonly ["age", "lifespan", "charisma", "battlesense", "craftskill", "artefactslots", "talismanslots", "condenseEfficiency", "pillsPerRound"];
|
|
5
5
|
export declare const craftingStatistics: readonly ["maxpool", "pool", "maxtoxicity", "toxicity", "resistance", "itemEffectiveness", "control", "intensity", "critchance", "critmultiplier", "pillsPerRound", "poolCostPercentage", "stabilityCostPercentage", "successChanceBonus"];
|
|
6
|
-
export declare const combatStatistics: readonly ["maxhp", "hp", "maxbarrier", "barrier", "maxtoxicity", "toxicity", "resistance", "pillsPerRound", "itemEffectiveness", "power", "artefactpower", "critchance", "defense", "dr", "barrierMitigation", "lifesteal", "critmultiplier", "vulnerability", "weakness", "fistBoost", "blossomBoost", "weaponBoost", "cloudBoost", "bloodBoost", "celestialBoost", "fistAffinity", "blossomAffinity", "weaponAffinity", "cloudAffinity", "bloodAffinity", "celestialAffinity", "noneAffinity", "qiDroplets", "fistDisabled", "bloodDisabled", "blossomDisabled", "cloudDisabled", "celestialDisabled", "weaponDisabled", "fistResistance", "blossomResistance", "weaponResistance", "cloudResistance", "bloodResistance", "celestialResistance"];
|
|
6
|
+
export declare const combatStatistics: readonly ["maxhp", "hp", "maxbarrier", "barrier", "maxtoxicity", "toxicity", "resistance", "pillsPerRound", "itemEffectiveness", "power", "artefactpower", "critchance", "defense", "dr", "barrierMitigation", "lifesteal", "critmultiplier", "vulnerability", "weakness", "fistBoost", "blossomBoost", "weaponBoost", "cloudBoost", "bloodBoost", "celestialBoost", "fistAffinity", "blossomAffinity", "weaponAffinity", "cloudAffinity", "bloodAffinity", "celestialAffinity", "noneAffinity", "qiDroplets", "fistDisabled", "bloodDisabled", "blossomDisabled", "cloudDisabled", "celestialDisabled", "weaponDisabled", "fistResistance", "blossomResistance", "weaponResistance", "cloudResistance", "bloodResistance", "celestialResistance", "damageBoost", "healingBoost", "barrierBoost", "overheal"];
|
|
7
7
|
export type PhysicalStatistic = (typeof physicalStatistics)[number];
|
|
8
8
|
export type SocialStatistic = (typeof socialStatistics)[number];
|
|
9
9
|
export type CraftingStatistic = (typeof craftingStatistics)[number];
|
|
@@ -32,6 +32,9 @@ export declare const combatStatToName: {
|
|
|
32
32
|
export declare const combatStatToDescription: {
|
|
33
33
|
[key in CombatStatistic]: string;
|
|
34
34
|
};
|
|
35
|
+
export declare const uncommonStatTooltips: Partial<{
|
|
36
|
+
[key in CombatStatistic]: string;
|
|
37
|
+
}>;
|
|
35
38
|
export declare const craftingStatToName: {
|
|
36
39
|
[key in CraftingStatistic]: string;
|
|
37
40
|
};
|
|
@@ -72,4 +75,5 @@ export interface Scaling {
|
|
|
72
75
|
divideByStanceLength?: boolean;
|
|
73
76
|
upgradeKey?: string;
|
|
74
77
|
buff?: Buff;
|
|
78
|
+
increment?: number;
|
|
75
79
|
}
|
package/dist/stat.js
CHANGED
|
@@ -79,6 +79,10 @@ export const combatStatistics = [
|
|
|
79
79
|
'cloudResistance',
|
|
80
80
|
'bloodResistance',
|
|
81
81
|
'celestialResistance',
|
|
82
|
+
'damageBoost',
|
|
83
|
+
'healingBoost',
|
|
84
|
+
'barrierBoost',
|
|
85
|
+
'overheal',
|
|
82
86
|
];
|
|
83
87
|
export const baseStatNumber = 10;
|
|
84
88
|
export const expectedHpPerFlesh = 1000;
|
|
@@ -138,6 +142,10 @@ export const combatStatToName = {
|
|
|
138
142
|
cloudResistance: 'Cloud Resistance',
|
|
139
143
|
bloodResistance: 'Blood Resistance',
|
|
140
144
|
celestialResistance: 'Celestial Resistance',
|
|
145
|
+
damageBoost: 'Damage Boost',
|
|
146
|
+
healingBoost: 'Healing Boost',
|
|
147
|
+
barrierBoost: 'Barrier Boost',
|
|
148
|
+
overheal: 'Overheal',
|
|
141
149
|
};
|
|
142
150
|
export const combatStatToDescription = {
|
|
143
151
|
maxhp: 'The amount of damage you can take before you are unable to continue.',
|
|
@@ -185,6 +193,18 @@ export const combatStatToDescription = {
|
|
|
185
193
|
celestialResistance: '',
|
|
186
194
|
pillsPerRound: '',
|
|
187
195
|
itemEffectiveness: 'The effectiveness of your pills, concoctions, and formation parts.',
|
|
196
|
+
damageBoost: '',
|
|
197
|
+
healingBoost: '',
|
|
198
|
+
barrierBoost: '',
|
|
199
|
+
overheal: '',
|
|
200
|
+
};
|
|
201
|
+
// Uncommon stats that need auxiliary tooltips when they appear on buffs
|
|
202
|
+
// These descriptions only show as aux tooltips in buff tooltips, not in the stats dialog
|
|
203
|
+
export const uncommonStatTooltips = {
|
|
204
|
+
damageBoost: '<n>Damage Boost</n> increases all non-true damage dealt by a percentage.',
|
|
205
|
+
healingBoost: '<n>Healing Boost</n> increases all healing received by a percentage.',
|
|
206
|
+
barrierBoost: '<n>Barrier Boost</n> increases all barrier gained by a percentage.',
|
|
207
|
+
overheal: '<n>Overheal</n> converts a percentage of healing beyond your maximum health into barrier.',
|
|
188
208
|
};
|
|
189
209
|
export const craftingStatToName = {
|
|
190
210
|
maxpool: 'Max Qi Pool',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "afnm-types",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.29",
|
|
4
4
|
"description": "Type definitions for Ascend From Nine Mountains",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@mui/icons-material": "^7.3.
|
|
20
|
-
"@mui/material": "^7.3.
|
|
19
|
+
"@mui/icons-material": "^7.3.6",
|
|
20
|
+
"@mui/material": "^7.3.6"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"typescript": "^5.
|
|
23
|
+
"typescript": "^5.9.3"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsc --project tsconfig.types.json",
|