@vibemancer/core 1.0.7 → 1.0.9
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/LICENSE +21 -0
- package/dist/{chunk-NR326XEY.js → chunk-OLGKLCCB.js} +43 -13
- package/dist/chunk-OLGKLCCB.js.map +1 -0
- package/dist/{index-browser-iiIpqpDl.d.ts → index-browser-BTHlrB_s.d.ts} +87 -12
- package/dist/index-browser.d.ts +1 -1
- package/dist/index-browser.js +3 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/bots/sniper/01_Spellshot.ts +11 -5
- package/src/engine/manual-match.ts +3 -1
- package/src/engine/physics.ts +12 -2
- package/src/engine/simulation.ts +79 -2
- package/src/engine-version.ts +1 -1
- package/src/hooks/action-builders.ts +299 -266
- package/src/hooks/index.ts +84 -83
- package/src/hooks/threat-analysis.ts +396 -389
- package/src/hooks/types.ts +216 -200
- package/src/rules.ts +6 -1
- package/src/trace.ts +497 -490
- package/src/types.ts +9 -3
- package/dist/chunk-NR326XEY.js.map +0 -1
package/src/hooks/index.ts
CHANGED
|
@@ -1,83 +1,84 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* VIBEMANCER - HOOKS API
|
|
3
|
-
*
|
|
4
|
-
* Main export file for the hooks-based bot API.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
// Types
|
|
8
|
-
export type {
|
|
9
|
-
EnemyState,
|
|
10
|
-
AnalyzedThreat,
|
|
11
|
-
FinalAction,
|
|
12
|
-
ActionBuilder,
|
|
13
|
-
WizardFunction,
|
|
14
|
-
WizardContext,
|
|
15
|
-
MissileConfig,
|
|
16
|
-
MissileContext,
|
|
17
|
-
MissileAction,
|
|
18
|
-
MissileFunction,
|
|
19
|
-
} from './types.js';
|
|
20
|
-
|
|
21
|
-
// State hooks
|
|
22
|
-
export {
|
|
23
|
-
useRandom,
|
|
24
|
-
useHealth,
|
|
25
|
-
usePosition,
|
|
26
|
-
useVelocity,
|
|
27
|
-
useStatus,
|
|
28
|
-
useTicksUntilReady,
|
|
29
|
-
useShieldStrength,
|
|
30
|
-
useBlinkCooldown,
|
|
31
|
-
useCastingSpell,
|
|
32
|
-
useCastProgress,
|
|
33
|
-
useEnemy,
|
|
34
|
-
useProjectiles,
|
|
35
|
-
useMyProjectiles,
|
|
36
|
-
useLastMissileConfig,
|
|
37
|
-
useDamageDealt,
|
|
38
|
-
useDamageTaken,
|
|
39
|
-
useLastHitTick,
|
|
40
|
-
useArenaSize,
|
|
41
|
-
useTick,
|
|
42
|
-
useThreats,
|
|
43
|
-
useClosestThreat,
|
|
44
|
-
useMyThreatsToEnemy,
|
|
45
|
-
} from './state-hooks.js';
|
|
46
|
-
|
|
47
|
-
// Threat analysis (for advanced users who want direct access)
|
|
48
|
-
export {analyzeThreats} from './threat-analysis.js';
|
|
49
|
-
|
|
50
|
-
// Action builders
|
|
51
|
-
export {
|
|
52
|
-
shield,
|
|
53
|
-
missile,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
export
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
export
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
export
|
|
1
|
+
/**
|
|
2
|
+
* VIBEMANCER - HOOKS API
|
|
3
|
+
*
|
|
4
|
+
* Main export file for the hooks-based bot API.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Types
|
|
8
|
+
export type {
|
|
9
|
+
EnemyState,
|
|
10
|
+
AnalyzedThreat,
|
|
11
|
+
FinalAction,
|
|
12
|
+
ActionBuilder,
|
|
13
|
+
WizardFunction,
|
|
14
|
+
WizardContext,
|
|
15
|
+
MissileConfig,
|
|
16
|
+
MissileContext,
|
|
17
|
+
MissileAction,
|
|
18
|
+
MissileFunction,
|
|
19
|
+
} from './types.js';
|
|
20
|
+
|
|
21
|
+
// State hooks
|
|
22
|
+
export {
|
|
23
|
+
useRandom,
|
|
24
|
+
useHealth,
|
|
25
|
+
usePosition,
|
|
26
|
+
useVelocity,
|
|
27
|
+
useStatus,
|
|
28
|
+
useTicksUntilReady,
|
|
29
|
+
useShieldStrength,
|
|
30
|
+
useBlinkCooldown,
|
|
31
|
+
useCastingSpell,
|
|
32
|
+
useCastProgress,
|
|
33
|
+
useEnemy,
|
|
34
|
+
useProjectiles,
|
|
35
|
+
useMyProjectiles,
|
|
36
|
+
useLastMissileConfig,
|
|
37
|
+
useDamageDealt,
|
|
38
|
+
useDamageTaken,
|
|
39
|
+
useLastHitTick,
|
|
40
|
+
useArenaSize,
|
|
41
|
+
useTick,
|
|
42
|
+
useThreats,
|
|
43
|
+
useClosestThreat,
|
|
44
|
+
useMyThreatsToEnemy,
|
|
45
|
+
} from './state-hooks.js';
|
|
46
|
+
|
|
47
|
+
// Threat analysis (for advanced users who want direct access)
|
|
48
|
+
export {analyzeThreats} from './threat-analysis.js';
|
|
49
|
+
|
|
50
|
+
// Action builders
|
|
51
|
+
export {
|
|
52
|
+
shield,
|
|
53
|
+
missile,
|
|
54
|
+
aim,
|
|
55
|
+
blink,
|
|
56
|
+
cancel,
|
|
57
|
+
move,
|
|
58
|
+
idle,
|
|
59
|
+
extractAction,
|
|
60
|
+
turnToward,
|
|
61
|
+
turnToAngle,
|
|
62
|
+
flyStraight,
|
|
63
|
+
extractMissileAction,
|
|
64
|
+
} from './action-builders.js';
|
|
65
|
+
|
|
66
|
+
// Re-export persistence hooks from runtime
|
|
67
|
+
export {
|
|
68
|
+
useState,
|
|
69
|
+
useEffect,
|
|
70
|
+
useMemo,
|
|
71
|
+
useRef,
|
|
72
|
+
runWizardWithContext,
|
|
73
|
+
withWizardContext,
|
|
74
|
+
withMissileContext,
|
|
75
|
+
getWizardContext,
|
|
76
|
+
getMissileContext,
|
|
77
|
+
} from '../engine/hooks-runtime.js';
|
|
78
|
+
|
|
79
|
+
// Re-export RefObject type
|
|
80
|
+
export type {RefObject} from '../engine/hooks-runtime.js';
|
|
81
|
+
|
|
82
|
+
// Parameter tuning hook
|
|
83
|
+
export {useParam} from '../engine/params-runtime.js';
|
|
84
|
+
export type {ParamDeclaration} from '../engine/params-runtime.js';
|