@dnd-ed/jsshenanigans 0.0.0-stage → 1.1.0
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 +28 -0
- package/NOTICE.md +89 -0
- package/README.md +98 -3
- package/package.json +109 -4
- package/src/character.d.ts +82 -0
- package/src/character.js +335 -0
- package/src/codec.d.ts +20 -0
- package/src/codec.js +211 -0
- package/src/conditions.d.ts +40 -0
- package/src/conditions.js +79 -0
- package/src/defaults.d.ts +15 -0
- package/src/defaults.js +72 -0
- package/src/errors.d.ts +8 -0
- package/src/errors.js +20 -0
- package/src/index.d.ts +46 -0
- package/src/index.js +49 -0
- package/src/nodes.d.ts +356 -0
- package/src/nodes.js +739 -0
- package/src/tools.d.ts +28 -0
- package/src/tools.js +88 -0
- package/src/types.d.ts +875 -0
- package/src/types.js +3532 -0
- package/src/utils.d.ts +33 -0
- package/src/utils.js +52 -0
package/src/defaults.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default tables used to drop redundant fields when building a skill.
|
|
3
|
+
*
|
|
4
|
+
* `NODE_DEFAULTS` is derived from the builders themselves, so a builder and its
|
|
5
|
+
* default can never drift apart.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import * as nodes from "./nodes.js";
|
|
9
|
+
|
|
10
|
+
/** Node K_NAME -> builder name in `nodes`. */
|
|
11
|
+
export const _NODE_BUILDERS = {
|
|
12
|
+
WAIT: "WAIT",
|
|
13
|
+
SKILL: "SKILL",
|
|
14
|
+
SPECIAL: "SPECIAL",
|
|
15
|
+
// K_NAME is "ANIM"; the builder is nodes.ANIMATION. A wrong key here means
|
|
16
|
+
// ANIM defaults are never stripped.
|
|
17
|
+
ANIM: "ANIMATION",
|
|
18
|
+
SFX: "SOUND",
|
|
19
|
+
VELO: "VELOCITY",
|
|
20
|
+
CONNECT: "CONNECT",
|
|
21
|
+
HITBOX: "HITBOX",
|
|
22
|
+
BRANCH: "BRANCH",
|
|
23
|
+
VISUAL: "VISUAL",
|
|
24
|
+
GRAB: "GRAB",
|
|
25
|
+
PROJECTILE: "PROJECTILE",
|
|
26
|
+
COUNTER: "COUNTER",
|
|
27
|
+
TAG: "TAG",
|
|
28
|
+
STATE: "STATE",
|
|
29
|
+
TELEPORT: "TELEPORT",
|
|
30
|
+
ULTGIB: "ADD_AWAKENING",
|
|
31
|
+
HPGIB: "ADD_HEALTH",
|
|
32
|
+
EVGIB: "ADD_EVASION",
|
|
33
|
+
HITCNCL: "HIT_CANCEL",
|
|
34
|
+
SETCD: "SET_COOLDOWN",
|
|
35
|
+
LOOP: "LOOP",
|
|
36
|
+
// nodes present in the live game but missing from libjjs
|
|
37
|
+
PARTICLE: "PARTICLE",
|
|
38
|
+
LOOK: "LOOK",
|
|
39
|
+
SETMELEE: "SETMELEE",
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const NODE_DEFAULTS = Object.fromEntries(
|
|
43
|
+
Object.entries(_NODE_BUILDERS).map(([kName, builder]) => [kName, nodes[builder]()]),
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
export const PROPERTIES_DEFAULTS = {
|
|
47
|
+
DMG: 1,
|
|
48
|
+
KNOCK: 1,
|
|
49
|
+
INV: false,
|
|
50
|
+
REP: false,
|
|
51
|
+
REP2: false,
|
|
52
|
+
AWK: false,
|
|
53
|
+
KEEP: false,
|
|
54
|
+
AWK2: false,
|
|
55
|
+
USE: false,
|
|
56
|
+
USEONDEATH: false,
|
|
57
|
+
NOSTUN: false,
|
|
58
|
+
NOCANCEL: false,
|
|
59
|
+
VAR: "-",
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const CONDITIONS_DEFAULTS = {
|
|
63
|
+
AIR: { FLIP: false },
|
|
64
|
+
JUMP: { FLIP: false },
|
|
65
|
+
AIM: { FLIP: false },
|
|
66
|
+
ULT: { FLIP: false },
|
|
67
|
+
BAR: { AMOUNT: 5, FLIP: false },
|
|
68
|
+
DUR: { DURABILITY: 1 },
|
|
69
|
+
HP: { AMOUNT: 1, FLIP: false },
|
|
70
|
+
DOMAIN: { FLIP: false },
|
|
71
|
+
HOLD: { FLIP: false },
|
|
72
|
+
};
|
package/src/errors.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Base class for every error raised by this library. */
|
|
2
|
+
export declare class JsshenanigansError extends Error {}
|
|
3
|
+
|
|
4
|
+
/** Raised when a string is not a valid Jujutsu Shenanigans character code. */
|
|
5
|
+
export declare class InvalidCharacterCodeError extends JsshenanigansError {}
|
|
6
|
+
|
|
7
|
+
/** Raised when no usable zstd backend could be loaded. */
|
|
8
|
+
export declare class BackendNotFoundError extends JsshenanigansError {}
|
package/src/errors.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Exceptions raised by jsshenanigans.
|
|
3
|
+
*
|
|
4
|
+
* Everything the library throws derives from {@link JsshenanigansError}, so
|
|
5
|
+
* callers can wrap an entire character-code pipeline in a single `catch`.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** Base class for every error raised by this library. */
|
|
9
|
+
export class JsshenanigansError extends Error {
|
|
10
|
+
constructor(message, options) {
|
|
11
|
+
super(message, options);
|
|
12
|
+
this.name = new.target.name;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Raised when a string is not a valid Jujutsu Shenanigans character code. */
|
|
17
|
+
export class InvalidCharacterCodeError extends JsshenanigansError {}
|
|
18
|
+
|
|
19
|
+
/** Raised when no usable zstd backend could be loaded. */
|
|
20
|
+
export class BackendNotFoundError extends JsshenanigansError {}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export * from "./errors.js";
|
|
2
|
+
export {
|
|
3
|
+
ENV_BACKEND,
|
|
4
|
+
ZSTD_MAGIC,
|
|
5
|
+
backend_name,
|
|
6
|
+
compress,
|
|
7
|
+
decode,
|
|
8
|
+
decompress,
|
|
9
|
+
encode,
|
|
10
|
+
} from "./codec.js";
|
|
11
|
+
export { Character } from "./character.js";
|
|
12
|
+
export type {
|
|
13
|
+
CharacterOptions,
|
|
14
|
+
CreateHelper,
|
|
15
|
+
Skill,
|
|
16
|
+
SkillKind,
|
|
17
|
+
SkillOptions,
|
|
18
|
+
SkillSummary,
|
|
19
|
+
} from "./character.js";
|
|
20
|
+
export { dumps, describe } from "./tools.js";
|
|
21
|
+
export type { DescribeResult, SkillInfo } from "./tools.js";
|
|
22
|
+
export { Animations } from "./types.js";
|
|
23
|
+
export type {
|
|
24
|
+
AnimationRef,
|
|
25
|
+
AttackTypeName,
|
|
26
|
+
BodyPartName,
|
|
27
|
+
EasingDirectionName,
|
|
28
|
+
EasingStyleName,
|
|
29
|
+
EffectName,
|
|
30
|
+
SkillName,
|
|
31
|
+
SpecialName,
|
|
32
|
+
StateName,
|
|
33
|
+
} from "./types.js";
|
|
34
|
+
export { Branch, Properties } from "./utils.js";
|
|
35
|
+
export type { BranchDefinition, PropertiesOptions } from "./utils.js";
|
|
36
|
+
|
|
37
|
+
import * as codec from "./codec.js";
|
|
38
|
+
import * as conditions from "./conditions.js";
|
|
39
|
+
import * as nodes from "./nodes.js";
|
|
40
|
+
import * as tools from "./tools.js";
|
|
41
|
+
import * as types from "./types.js";
|
|
42
|
+
|
|
43
|
+
export { codec, conditions, nodes, tools, types };
|
|
44
|
+
|
|
45
|
+
/** The library version. */
|
|
46
|
+
export declare const VERSION: string;
|
package/src/index.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JSShenanigans --- build, load and modify Jujutsu Shenanigans movesets.
|
|
3
|
+
*
|
|
4
|
+
* A JavaScript port of pythonshenanigans. On top of everything libjjs could do
|
|
5
|
+
* it can also:
|
|
6
|
+
*
|
|
7
|
+
* - **load** an existing character code and edit it (everything is preserved);
|
|
8
|
+
* - model the `PARTICLE`, `LOOK` and `SETMELEE` nodes;
|
|
9
|
+
* - set the `TOOL TIP` (skills) and `COLOR` (awakenings) fields;
|
|
10
|
+
* - round-trip codes without dropping fields it does not understand.
|
|
11
|
+
*
|
|
12
|
+
* Quick start:
|
|
13
|
+
*
|
|
14
|
+
* import * as pts from "jsshenanigans";
|
|
15
|
+
* import * as nodes from "jsshenanigans/nodes";
|
|
16
|
+
*
|
|
17
|
+
* const character = new pts.Character();
|
|
18
|
+
* character.create.skill("Punch", [nodes.HITBOX({ damage: 5 })]);
|
|
19
|
+
* const code = character.export_character_code();
|
|
20
|
+
*
|
|
21
|
+
* const loaded = pts.Character.from_code(code);
|
|
22
|
+
* console.log(pts.describe(code));
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
export * from "./errors.js";
|
|
26
|
+
export {
|
|
27
|
+
ENV_BACKEND,
|
|
28
|
+
ZSTD_MAGIC,
|
|
29
|
+
backend_name,
|
|
30
|
+
compress,
|
|
31
|
+
decode,
|
|
32
|
+
decompress,
|
|
33
|
+
encode,
|
|
34
|
+
} from "./codec.js";
|
|
35
|
+
export { Character } from "./character.js";
|
|
36
|
+
export { dumps, describe } from "./tools.js";
|
|
37
|
+
export { Animations } from "./types.js";
|
|
38
|
+
export { Branch, Properties } from "./utils.js";
|
|
39
|
+
|
|
40
|
+
import * as codec from "./codec.js";
|
|
41
|
+
import * as conditions from "./conditions.js";
|
|
42
|
+
import * as nodes from "./nodes.js";
|
|
43
|
+
import * as tools from "./tools.js";
|
|
44
|
+
import * as types from "./types.js";
|
|
45
|
+
|
|
46
|
+
export { codec, conditions, nodes, tools, types };
|
|
47
|
+
|
|
48
|
+
/** The library version. */
|
|
49
|
+
export const VERSION = "1.1.0";
|
package/src/nodes.d.ts
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
AttackTypeName,
|
|
3
|
+
BodyPartName,
|
|
4
|
+
EasingDirectionName,
|
|
5
|
+
EasingStyleName,
|
|
6
|
+
EffectName,
|
|
7
|
+
SkillName,
|
|
8
|
+
SpecialName,
|
|
9
|
+
StateName,
|
|
10
|
+
} from "./types.js";
|
|
11
|
+
|
|
12
|
+
/** A node object. Keys are the names the game uses. */
|
|
13
|
+
export interface Node {
|
|
14
|
+
K_NAME: string;
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** A vector, as an array/iterable of numbers or an `"x, y, z"` string. */
|
|
19
|
+
export type Vec3 = Iterable<number> | string;
|
|
20
|
+
|
|
21
|
+
/** A number, or the literal string `"inf"` where the game accepts it. */
|
|
22
|
+
export type Time = number | "inf";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Format a vector as the game's `"x, y, z"` string. Strings pass through
|
|
26
|
+
* verbatim (a copy-pasted `"[x, y, z]"` is tolerated).
|
|
27
|
+
*/
|
|
28
|
+
export declare function _vec3(value: Vec3): string;
|
|
29
|
+
|
|
30
|
+
/** Wait a duration of time before continuing. */
|
|
31
|
+
export declare function WAIT(options?: { TIME?: number }): Node;
|
|
32
|
+
|
|
33
|
+
/** Run a base moveset skill. */
|
|
34
|
+
export declare function SKILL(options?: {
|
|
35
|
+
move?: SkillName;
|
|
36
|
+
speed?: number;
|
|
37
|
+
cancel_last?: boolean;
|
|
38
|
+
enable_variants?: boolean;
|
|
39
|
+
hold_for?: number;
|
|
40
|
+
start?: number;
|
|
41
|
+
}): Node;
|
|
42
|
+
|
|
43
|
+
/** Run a base moveset special skill. */
|
|
44
|
+
export declare function SPECIAL(options?: {
|
|
45
|
+
spec?: SpecialName;
|
|
46
|
+
speed?: number;
|
|
47
|
+
cancel_last?: boolean;
|
|
48
|
+
enable_variants?: boolean;
|
|
49
|
+
}): Node;
|
|
50
|
+
|
|
51
|
+
/** Play an animation. */
|
|
52
|
+
export declare function ANIMATION(options?: {
|
|
53
|
+
animation?: readonly number[] | null;
|
|
54
|
+
start?: number;
|
|
55
|
+
end?: number;
|
|
56
|
+
looped?: boolean;
|
|
57
|
+
speed?: number;
|
|
58
|
+
fade_in?: number;
|
|
59
|
+
fade_out?: number;
|
|
60
|
+
last_hit?: number;
|
|
61
|
+
}): Node;
|
|
62
|
+
|
|
63
|
+
/** Play a sound effect. */
|
|
64
|
+
export declare function SOUND(options?: {
|
|
65
|
+
id?: number;
|
|
66
|
+
speed?: number;
|
|
67
|
+
volume?: number;
|
|
68
|
+
start?: number;
|
|
69
|
+
end?: number;
|
|
70
|
+
fade_in?: number;
|
|
71
|
+
fade_out?: number;
|
|
72
|
+
cancel?: boolean;
|
|
73
|
+
global_?: boolean;
|
|
74
|
+
projectile_tag?: string;
|
|
75
|
+
}): Node;
|
|
76
|
+
|
|
77
|
+
/** Apply a force to a character. */
|
|
78
|
+
export declare function VELOCITY(options?: {
|
|
79
|
+
force?: Vec3 | null;
|
|
80
|
+
time?: Time;
|
|
81
|
+
fade?: boolean;
|
|
82
|
+
track?: boolean;
|
|
83
|
+
last_hit?: number;
|
|
84
|
+
ragdoll?: number;
|
|
85
|
+
true_ragdoll?: boolean;
|
|
86
|
+
relative_from_branch?: boolean;
|
|
87
|
+
}): Node;
|
|
88
|
+
|
|
89
|
+
/** Emit a signal to Connect Blocks. */
|
|
90
|
+
export declare function CONNECT(options?: {
|
|
91
|
+
signal?: string;
|
|
92
|
+
time?: Time;
|
|
93
|
+
range?: number | "inf";
|
|
94
|
+
}): Node;
|
|
95
|
+
|
|
96
|
+
/** Create a hitbox. */
|
|
97
|
+
export declare function HITBOX(options?: {
|
|
98
|
+
position?: Vec3 | null;
|
|
99
|
+
rotation?: Vec3 | null;
|
|
100
|
+
size?: Vec3 | null;
|
|
101
|
+
stun?: number;
|
|
102
|
+
stun_anim?: boolean;
|
|
103
|
+
ignore_wakeup?: boolean;
|
|
104
|
+
damage?: number;
|
|
105
|
+
debree?: number;
|
|
106
|
+
attack_type?: AttackTypeName;
|
|
107
|
+
blockable?: boolean;
|
|
108
|
+
blockable_360?: boolean;
|
|
109
|
+
cancel_enemy?: boolean;
|
|
110
|
+
clear_knockback?: boolean;
|
|
111
|
+
can_kill?: boolean;
|
|
112
|
+
hit_ragdoll?: boolean;
|
|
113
|
+
hit_user?: boolean;
|
|
114
|
+
single_target?: boolean;
|
|
115
|
+
branch?: string;
|
|
116
|
+
branch_target?: string;
|
|
117
|
+
branch_finisher?: string;
|
|
118
|
+
projectile_tag?: string;
|
|
119
|
+
link_user?: boolean | number;
|
|
120
|
+
preview?: readonly number[] | null;
|
|
121
|
+
}): Node;
|
|
122
|
+
|
|
123
|
+
/** Proceed to a branch on hit. */
|
|
124
|
+
export declare function BRANCH(options?: {
|
|
125
|
+
branch?: string;
|
|
126
|
+
random?: string;
|
|
127
|
+
last_hit?: number;
|
|
128
|
+
}): Node;
|
|
129
|
+
|
|
130
|
+
/** Play a visual effect. */
|
|
131
|
+
export declare function VISUAL(options?: {
|
|
132
|
+
effect?: EffectName;
|
|
133
|
+
amount?: number;
|
|
134
|
+
texture?: number;
|
|
135
|
+
color?: string;
|
|
136
|
+
alt_color?: string;
|
|
137
|
+
opacity?: number;
|
|
138
|
+
alt_opacity?: number;
|
|
139
|
+
position?: Vec3 | null;
|
|
140
|
+
alt_position?: Vec3 | null;
|
|
141
|
+
rotation?: Vec3 | null;
|
|
142
|
+
alt_rotation?: Vec3 | null;
|
|
143
|
+
size?: number;
|
|
144
|
+
alt_size?: number;
|
|
145
|
+
time?: Time;
|
|
146
|
+
last_hit?: number;
|
|
147
|
+
limb?: BodyPartName;
|
|
148
|
+
visual_tag?: string;
|
|
149
|
+
projectile_tag?: string;
|
|
150
|
+
run_on_server?: boolean;
|
|
151
|
+
cancel_on_interrupt?: boolean;
|
|
152
|
+
relative_from_branch?: boolean;
|
|
153
|
+
can_collide?: boolean;
|
|
154
|
+
easing_style?: EasingStyleName;
|
|
155
|
+
easing_direction?: EasingDirectionName;
|
|
156
|
+
}): Node;
|
|
157
|
+
|
|
158
|
+
/** Grab a target's limb. */
|
|
159
|
+
export declare function GRAB(options?: {
|
|
160
|
+
limb?: BodyPartName;
|
|
161
|
+
target_limb?: BodyPartName;
|
|
162
|
+
position?: Vec3 | null;
|
|
163
|
+
rotation?: Vec3 | null;
|
|
164
|
+
time?: Time;
|
|
165
|
+
last_hit?: number;
|
|
166
|
+
}): Node;
|
|
167
|
+
|
|
168
|
+
/** Create a projectile. */
|
|
169
|
+
export declare function PROJECTILE(options?: {
|
|
170
|
+
projectile_tag?: string;
|
|
171
|
+
position?: Vec3 | null;
|
|
172
|
+
rotation?: Vec3 | null;
|
|
173
|
+
size?: Vec3 | null;
|
|
174
|
+
speed?: number;
|
|
175
|
+
time?: Time;
|
|
176
|
+
stun?: number;
|
|
177
|
+
stun_anim?: boolean;
|
|
178
|
+
ignore_wakeup?: boolean;
|
|
179
|
+
damage?: number;
|
|
180
|
+
debree?: number;
|
|
181
|
+
attack_type?: AttackTypeName;
|
|
182
|
+
blockable?: boolean;
|
|
183
|
+
blockable_360?: boolean;
|
|
184
|
+
cancel_enemy?: boolean;
|
|
185
|
+
clear_knockback?: boolean;
|
|
186
|
+
can_kill?: boolean;
|
|
187
|
+
hit_ragdoll?: boolean;
|
|
188
|
+
hit_user?: boolean;
|
|
189
|
+
single_target?: boolean;
|
|
190
|
+
aim_last_hit?: number;
|
|
191
|
+
continue_?: boolean;
|
|
192
|
+
branch?: string;
|
|
193
|
+
branch_target?: string;
|
|
194
|
+
branch_collided?: string;
|
|
195
|
+
filter_interval?: number;
|
|
196
|
+
reflect_count?: number;
|
|
197
|
+
cache?: boolean;
|
|
198
|
+
}): Node;
|
|
199
|
+
|
|
200
|
+
/** Start a counter. */
|
|
201
|
+
export declare function COUNTER(options?: {
|
|
202
|
+
attack_type?: readonly AttackTypeName[] | null;
|
|
203
|
+
time?: Time;
|
|
204
|
+
stun?: number;
|
|
205
|
+
cancel_enemy?: boolean;
|
|
206
|
+
branch?: string;
|
|
207
|
+
branch_target?: string;
|
|
208
|
+
remove_on_hit?: boolean;
|
|
209
|
+
reflect?: boolean;
|
|
210
|
+
continue_?: boolean;
|
|
211
|
+
}): Node;
|
|
212
|
+
|
|
213
|
+
/** Create a tag. */
|
|
214
|
+
export declare function TAG(options?: {
|
|
215
|
+
tag?: string;
|
|
216
|
+
value?: string;
|
|
217
|
+
time?: Time;
|
|
218
|
+
check?: boolean;
|
|
219
|
+
add_remove?: boolean;
|
|
220
|
+
set_value?: boolean;
|
|
221
|
+
branch?: string;
|
|
222
|
+
last_hit?: number;
|
|
223
|
+
}): Node;
|
|
224
|
+
|
|
225
|
+
/** Check or set a character state. */
|
|
226
|
+
export declare function STATE(options?: {
|
|
227
|
+
state?: StateName;
|
|
228
|
+
value?: number;
|
|
229
|
+
time?: Time;
|
|
230
|
+
cancel_on_end?: boolean;
|
|
231
|
+
disable_burst?: boolean;
|
|
232
|
+
last_hit?: number;
|
|
233
|
+
check?: boolean;
|
|
234
|
+
branch?: string;
|
|
235
|
+
state_tag?: string;
|
|
236
|
+
}): Node;
|
|
237
|
+
|
|
238
|
+
/** Teleport to an offset. */
|
|
239
|
+
export declare function TELEPORT(options?: {
|
|
240
|
+
position?: Vec3 | null;
|
|
241
|
+
rotation?: Vec3 | null;
|
|
242
|
+
last_hit?: number;
|
|
243
|
+
projectile_tag?: string;
|
|
244
|
+
relative_from_branch?: boolean;
|
|
245
|
+
ignore_walls?: boolean;
|
|
246
|
+
}): Node;
|
|
247
|
+
|
|
248
|
+
/** Add to your awakening bar. */
|
|
249
|
+
export declare function ADD_AWAKENING(options?: { amount?: number }): Node;
|
|
250
|
+
|
|
251
|
+
/** Add to your health bar. */
|
|
252
|
+
export declare function ADD_HEALTH(options?: {
|
|
253
|
+
amount?: number;
|
|
254
|
+
can_kill?: boolean;
|
|
255
|
+
}): Node;
|
|
256
|
+
|
|
257
|
+
/** Add to your evasion bar. */
|
|
258
|
+
export declare function ADD_EVASION(options?: { amount?: number }): Node;
|
|
259
|
+
|
|
260
|
+
/** Cancel the skill. */
|
|
261
|
+
export declare function HIT_CANCEL(options?: {
|
|
262
|
+
time?: Time;
|
|
263
|
+
flip?: boolean;
|
|
264
|
+
endlag?: number;
|
|
265
|
+
branch?: string;
|
|
266
|
+
}): Node;
|
|
267
|
+
|
|
268
|
+
/** Set the cooldown of a skill. */
|
|
269
|
+
export declare function SET_COOLDOWN(options?: {
|
|
270
|
+
key?: number;
|
|
271
|
+
cooldown?: number;
|
|
272
|
+
}): Node;
|
|
273
|
+
|
|
274
|
+
/** Loop the current skill. */
|
|
275
|
+
export declare function LOOP(options?: {
|
|
276
|
+
loop_back?: number;
|
|
277
|
+
loop_amount?: number;
|
|
278
|
+
hold?: boolean;
|
|
279
|
+
}): Node;
|
|
280
|
+
|
|
281
|
+
export interface ParticleOptions {
|
|
282
|
+
part_size?: Vec3 | null;
|
|
283
|
+
texture?: number | null;
|
|
284
|
+
emit_count?: number | null;
|
|
285
|
+
rate?: number | null;
|
|
286
|
+
duration?: number | null;
|
|
287
|
+
color?: string | null;
|
|
288
|
+
size?: Vec3 | null;
|
|
289
|
+
brightness?: number | null;
|
|
290
|
+
transparency?: Vec3 | null;
|
|
291
|
+
squash?: Vec3 | null;
|
|
292
|
+
lifetime?: Vec3 | null;
|
|
293
|
+
speed?: Vec3 | null;
|
|
294
|
+
rotation?: Vec3 | null;
|
|
295
|
+
rot_speed?: Vec3 | null;
|
|
296
|
+
acceleration?: Vec3 | null;
|
|
297
|
+
drag?: number | null;
|
|
298
|
+
light_emission?: number | null;
|
|
299
|
+
light_influence?: number | null;
|
|
300
|
+
z_offset?: number | null;
|
|
301
|
+
spread_angle?: Vec3 | null;
|
|
302
|
+
position?: Vec3 | null;
|
|
303
|
+
lock_to_part?: boolean | null;
|
|
304
|
+
limb?: BodyPartName | null;
|
|
305
|
+
orientation_type?:
|
|
306
|
+
| "FacingCamera"
|
|
307
|
+
| "FacingCameraWorldUp"
|
|
308
|
+
| "VelocityParallel"
|
|
309
|
+
| "VelocityPerpendicular"
|
|
310
|
+
| null;
|
|
311
|
+
emission_direction?: string | null;
|
|
312
|
+
flipbook_size?: Vec3 | null;
|
|
313
|
+
flipbook_mode?: "Loop" | "OneShot" | "PingPong" | "Random" | null;
|
|
314
|
+
flipbook_framerate?: Vec3 | null;
|
|
315
|
+
shape?: "Box" | "Cylinder" | "Disc" | "Sphere" | null;
|
|
316
|
+
shape_inout?: string | null;
|
|
317
|
+
shape_partial?: number | null;
|
|
318
|
+
run_on_server?: boolean | null;
|
|
319
|
+
client_sided?: boolean | null;
|
|
320
|
+
cancel_tag?: string | null;
|
|
321
|
+
cancel?: boolean | null;
|
|
322
|
+
cancel_on_interrupt?: boolean | null;
|
|
323
|
+
projectile_tag?: string | null;
|
|
324
|
+
last_hit?: number | null;
|
|
325
|
+
/** Any setting not modelled above, passed through verbatim. */
|
|
326
|
+
[key: string]: unknown;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/** Emit particles. Values left as `null` are omitted rather than guessed. */
|
|
330
|
+
export declare function PARTICLE(options?: ParticleOptions): Node;
|
|
331
|
+
|
|
332
|
+
export interface LookOptions {
|
|
333
|
+
time?: number | null;
|
|
334
|
+
smoothness?: number;
|
|
335
|
+
horizontal_only?: boolean | null;
|
|
336
|
+
last_hit?: number;
|
|
337
|
+
relative_from_branch?: boolean | null;
|
|
338
|
+
projectile_tag?: string | null;
|
|
339
|
+
camera_direction?: boolean | null;
|
|
340
|
+
grounded?: boolean | null;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/** Point the camera in a direction. */
|
|
344
|
+
export declare function LOOK(options?: LookOptions): Node;
|
|
345
|
+
|
|
346
|
+
export interface SetMeleeOptions {
|
|
347
|
+
combo?: number | null;
|
|
348
|
+
offset?: number | null;
|
|
349
|
+
last_hit?: number;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/** Force the user's melee count to a specific M1 for a while. */
|
|
353
|
+
export declare function SETMELEE(options?: SetMeleeOptions): Node;
|
|
354
|
+
|
|
355
|
+
/** Build any node verbatim by its `K_NAME`. */
|
|
356
|
+
export declare function raw(k_name: string, fields?: Record<string, unknown>): Node;
|