@icjhd/cj-script-compiler 2.0.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.
Files changed (37) hide show
  1. package/.cj-package.json +21 -0
  2. package/.cj-stubs/assets/EffectProgramWriter.js +17 -0
  3. package/.cj-stubs/assets/FormulaExpressionAdapter.js +15 -0
  4. package/.cj-stubs/assets/OperationSpecs.js +16 -0
  5. package/.cj-stubs/assets/RegistrySnapshot.js +18 -0
  6. package/.cj-stubs/index.js +16 -0
  7. package/.cj-stubs/recovery-manifest.json +47 -0
  8. package/README.md +62 -0
  9. package/assets/EffectProgramWriter.d.ts +53 -0
  10. package/assets/EffectProgramWriter.js +17 -0
  11. package/assets/FormulaExpressionAdapter.d.ts +43 -0
  12. package/assets/FormulaExpressionAdapter.js +15 -0
  13. package/assets/OperationSpecs.d.ts +7 -0
  14. package/assets/OperationSpecs.js +16 -0
  15. package/assets/RegistrySnapshot.d.ts +37 -0
  16. package/assets/RegistrySnapshot.js +18 -0
  17. package/assets/fixtures/minimal-bool-jump.golden.json +56 -0
  18. package/assets/fixtures/minimal-call-group.golden.json +27 -0
  19. package/assets/fixtures/minimal-call-op.golden.json +27 -0
  20. package/assets/fixtures/minimal-chance.golden.json +37 -0
  21. package/assets/fixtures/minimal-context-formula.golden.json +55 -0
  22. package/assets/fixtures/minimal-formula-chance.golden.json +47 -0
  23. package/assets/fixtures/minimal-function-formula.golden.json +58 -0
  24. package/assets/fixtures/minimal-rounding-formula.golden.json +55 -0
  25. package/assets/fixtures/minimal-selector.golden.json +61 -0
  26. package/assets/generated/operation-field-coverage.json +5 -0
  27. package/assets/generated/registry.snapshot.json +4466 -0
  28. package/cj-release-commit.json +10 -0
  29. package/encrypted-payload-v2/files/assets/EffectProgramWriter.js.bin +0 -0
  30. package/encrypted-payload-v2/files/assets/FormulaExpressionAdapter.js.bin +0 -0
  31. package/encrypted-payload-v2/files/assets/OperationSpecs.js.bin +0 -0
  32. package/encrypted-payload-v2/files/assets/RegistrySnapshot.js.bin +0 -0
  33. package/encrypted-payload-v2/files/index.js.bin +0 -0
  34. package/encrypted-payload-v2/manifest.json +98 -0
  35. package/index.d.ts +6 -0
  36. package/index.js +16 -0
  37. package/package.json +52 -0
@@ -0,0 +1,21 @@
1
+ {
2
+ "schema": "cj-package-v2",
3
+ "name": "@icjhd/cj-script-compiler",
4
+ "version": "2.0.0",
5
+ "payloadManifest": "encrypted-payload-v2/manifest.json",
6
+ "recoveryManifest": ".cj-stubs/recovery-manifest.json",
7
+ "releaseCommit": "cj-release-commit.json",
8
+ "entry": "index.js",
9
+ "assetsDir": "assets",
10
+ "generatedFiles": [
11
+ "assets/EffectProgramWriter.js",
12
+ "assets/FormulaExpressionAdapter.js",
13
+ "assets/OperationSpecs.js",
14
+ "assets/RegistrySnapshot.js",
15
+ "index.js"
16
+ ],
17
+ "dependencies": [
18
+ "@icjhd/cj-formula-fx",
19
+ "@icjhd/cj-script-runtime"
20
+ ]
21
+ }
@@ -0,0 +1,17 @@
1
+ // CJHD editor-safe runtime stub. Generated by the publisher release tool.
2
+
3
+ const __cjSafeValue = new Proxy(function __cjSafeValue() {}, {
4
+ get(target, key) {
5
+ if (key === Symbol.toPrimitive) return function () { return 0; };
6
+ if (key === 'valueOf') return function () { return 0; };
7
+ if (key === 'toString') return function () { return '[CJHD editor-safe stub]'; };
8
+ return __cjSafeValue;
9
+ },
10
+ apply() { return __cjSafeValue; },
11
+ construct() { return __cjSafeValue; },
12
+ });
13
+
14
+ export function createMinimalCallOpBundle(...args) { return __cjSafeValue; }
15
+ export function createMinimalCallGroupBundle(...args) { return __cjSafeValue; }
16
+ export function createMinimalChanceBundle(...args) { return __cjSafeValue; }
17
+ export function writeEffectProgramBinary(...args) { return __cjSafeValue; }
@@ -0,0 +1,15 @@
1
+ // CJHD editor-safe runtime stub. Generated by the publisher release tool.
2
+
3
+ const __cjSafeValue = new Proxy(function __cjSafeValue() {}, {
4
+ get(target, key) {
5
+ if (key === Symbol.toPrimitive) return function () { return 0; };
6
+ if (key === 'valueOf') return function () { return 0; };
7
+ if (key === 'toString') return function () { return '[CJHD editor-safe stub]'; };
8
+ return __cjSafeValue;
9
+ },
10
+ apply() { return __cjSafeValue; },
11
+ construct() { return __cjSafeValue; },
12
+ });
13
+
14
+ export function compileStaticFormulaFxToExpression(...args) { return __cjSafeValue; }
15
+ export function formulaExpressionOpcode(...args) { return __cjSafeValue; }
@@ -0,0 +1,16 @@
1
+ // CJHD editor-safe runtime stub. Generated by the publisher release tool.
2
+
3
+ const __cjSafeValue = new Proxy(function __cjSafeValue() {}, {
4
+ get(target, key) {
5
+ if (key === Symbol.toPrimitive) return function () { return 0; };
6
+ if (key === 'valueOf') return function () { return 0; };
7
+ if (key === 'toString') return function () { return '[CJHD editor-safe stub]'; };
8
+ return __cjSafeValue;
9
+ },
10
+ apply() { return __cjSafeValue; },
11
+ construct() { return __cjSafeValue; },
12
+ });
13
+
14
+ export function getOperationSpecs(...args) { return __cjSafeValue; }
15
+ export const abilityEventNames = __cjSafeValue;
16
+ export const modifierEventNames = __cjSafeValue;
@@ -0,0 +1,18 @@
1
+ // CJHD editor-safe runtime stub. Generated by the publisher release tool.
2
+
3
+ const __cjSafeValue = new Proxy(function __cjSafeValue() {}, {
4
+ get(target, key) {
5
+ if (key === Symbol.toPrimitive) return function () { return 0; };
6
+ if (key === 'valueOf') return function () { return 0; };
7
+ if (key === 'toString') return function () { return '[CJHD editor-safe stub]'; };
8
+ return __cjSafeValue;
9
+ },
10
+ apply() { return __cjSafeValue; },
11
+ construct() { return __cjSafeValue; },
12
+ });
13
+
14
+ export function createRegistrySnapshot(...args) { return __cjSafeValue; }
15
+ export function createOperationFieldCoverage(...args) { return __cjSafeValue; }
16
+ export function stableJson(...args) { return __cjSafeValue; }
17
+ export const CONTRACT_ABI_VERSION = __cjSafeValue;
18
+ export const COMPILER_ABI_VERSION = __cjSafeValue;
@@ -0,0 +1,16 @@
1
+ // CJHD editor-safe runtime stub. Generated by the publisher release tool.
2
+
3
+ const __cjSafeValue = new Proxy(function __cjSafeValue() {}, {
4
+ get(target, key) {
5
+ if (key === Symbol.toPrimitive) return function () { return 0; };
6
+ if (key === 'valueOf') return function () { return 0; };
7
+ if (key === 'toString') return function () { return '[CJHD editor-safe stub]'; };
8
+ return __cjSafeValue;
9
+ },
10
+ apply() { return __cjSafeValue; },
11
+ construct() { return __cjSafeValue; },
12
+ });
13
+
14
+ export { createMinimalChanceBundle, createMinimalCallGroupBundle, createMinimalCallOpBundle, writeEffectProgramBinary } from './assets/EffectProgramWriter.js';
15
+ export { compileStaticFormulaFxToExpression } from './assets/FormulaExpressionAdapter.js';
16
+ export { COMPILER_ABI_VERSION, CONTRACT_ABI_VERSION, createOperationFieldCoverage, createRegistrySnapshot, stableJson } from './assets/RegistrySnapshot.js';
@@ -0,0 +1,47 @@
1
+ {
2
+ "schema": "cj-recovery-manifest-envelope-v1",
3
+ "signed": {
4
+ "schema": "cj-runtime-recovery-v1",
5
+ "purpose": "cj-runtime-stub-recovery",
6
+ "packageName": "@icjhd/cj-script-compiler",
7
+ "packageVersion": "2.0.0",
8
+ "securityEpoch": 1,
9
+ "entries": [
10
+ {
11
+ "out": "assets/EffectProgramWriter.js",
12
+ "stub": ".cj-stubs/assets/EffectProgramWriter.js",
13
+ "stubSha256": "sha256:b2d963c84c0ee5a7c479a9246415d6ce65069212fba3908347167ed8557cd2fd"
14
+ },
15
+ {
16
+ "out": "assets/FormulaExpressionAdapter.js",
17
+ "stub": ".cj-stubs/assets/FormulaExpressionAdapter.js",
18
+ "stubSha256": "sha256:c20cf7583c25b6a8a7b62c43cb8f22de2d569a81e7a5979bdf067bf7b0b78b23"
19
+ },
20
+ {
21
+ "out": "assets/OperationSpecs.js",
22
+ "stub": ".cj-stubs/assets/OperationSpecs.js",
23
+ "stubSha256": "sha256:0f42329199008c955ebd304f7e873b7d1f736c249627eeac07bce9241f14e50c"
24
+ },
25
+ {
26
+ "out": "assets/RegistrySnapshot.js",
27
+ "stub": ".cj-stubs/assets/RegistrySnapshot.js",
28
+ "stubSha256": "sha256:3f008f48db67cb628aff47b629a59f7d1985cfd6ff69517e8554ad375568c6bf"
29
+ },
30
+ {
31
+ "out": "index.js",
32
+ "stub": ".cj-stubs/index.js",
33
+ "stubSha256": "sha256:2bb724315925cbbdfcffdb52374327a5ad540cde83d439c5b311e0c1d2273da8"
34
+ }
35
+ ],
36
+ "issuer": {
37
+ "algorithm": "Ed25519",
38
+ "keyId": "recovery-prod-2026-01",
39
+ "keysetVersion": 1
40
+ }
41
+ },
42
+ "signature": {
43
+ "algorithm": "Ed25519",
44
+ "keyId": "recovery-prod-2026-01",
45
+ "value": "dms0/xbKWJz4jLnHyCliAPU0w+H5+05CY8z/LHVGJGlqT+lw+fC6tCKs4SlrzNJ8B0LjNRKb9rSqZK4IVxOmAg=="
46
+ }
47
+ }
package/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # @icjhd/cj-script-compiler
2
+
3
+ 技能脚本编译器核心。
4
+
5
+ 当前第一轮包含:
6
+
7
+ - L1/L2/L3/L4 合同快照初版
8
+ - v2 `OperationSpec` 基线字段表的静态快照
9
+ - Operation 字段覆盖统计
10
+ - 最小 `ACT0 action slot + CALL_OP/CALL_GROUP + RETURN` 二进制写出
11
+ - tracked `assets/generated/registry.snapshot.json`
12
+ - tracked `assets/generated/operation-field-coverage.json`
13
+ - tracked `assets/fixtures/minimal-call-op.golden.json`
14
+
15
+ 该包是纯 TypeScript 库,不包含 Node CLI。CLI 应放在编辑器工具层或构建脚本中调用该库。
16
+ # 2026-06-25 P3 formula adapter update
17
+
18
+ - Added a conservative `compileFormulaFx` to expression-bytecode adapter for static numeric formulas.
19
+ - `ROLL_JUMP_IF_FALSE` can now use `probabilityFormula`, currently limited to number literals plus `+ - * /` and unary `-`.
20
+ - Added `minimal-formula-chance.golden.json` to verify formula source `0.1 + 0.15` compiles to `FXC0/XPR0/XCD0` and evaluates to `0.25000000`.
21
+
22
+ # 2026-06-25 P3 context formula adapter update
23
+
24
+ - Formula variables `caster.<key>`, `target.<key>`, and `const.<key>` now compile to `LOAD_CONTEXT_FX`.
25
+ - Added `minimal-context-formula.golden.json` for `caster.ap * 0.01 - target.def * 0.05`, evaluated with fixture context to `0.25000000`.
26
+ - `eval-fx` accepts an optional context JSON file for dynamic expression smoke checks.
27
+
28
+ # 2026-06-25 P3 formula function adapter update
29
+
30
+ - `compileFormulaFx` adapter now lowers `min(a,b)`, `max(a,b)`, and `clamp(x,lo,hi)` to expression VM opcodes.
31
+ - Added `minimal-function-formula.golden.json` covering `MIN_FX`, `MAX_FX`, `CLAMP_FX`, and `const` context reads.
32
+ - Still unsupported in this slice: `%`, `abs`, `floor`, `ceil`, `round`, `sqrt`, `pow`, and `rand`.
33
+
34
+ # 2026-06-25 P3 rounding function adapter update
35
+
36
+ - `compileFormulaFx` adapter now lowers `%`, `abs(x)`, `floor(x)`, `ceil(x)`, and `round(x)`.
37
+ - Added `minimal-rounding-formula.golden.json` to verify fixed-point modulo and rounding semantics.
38
+ - Still unsupported in this slice: `sqrt`, `pow`, and `rand`.
39
+
40
+ # 2026-06-25 P3 bool comparison adapter update
41
+
42
+ - Added structured `JUMP_IF_FALSE` source support with `leftFormula`, `comparator`, and `rightFormula`.
43
+ - Comparators lower to BOOL expression bytecode: `EQ`, `NE`, `LT`, `LTE`, `GT`, and `GTE`.
44
+ - Added `minimal-bool-jump.golden.json` and `eval-bool` CLI coverage.
45
+
46
+ # 2026-06-25 P3 minimal Expression VM update
47
+
48
+ - Chance expressions now compile into `FXC0` constants and `XCD0` instruction programs instead of direct ppm-only records.
49
+ - `ROLL_JUMP_IF_FALSE probabilityPpm` emits `PUSH_FX_CONST` + `RETURN_FX` expression bytecode.
50
+ - Golden tests validate `eval-fx` output for the chance fixture.
51
+
52
+ # 2026-06-25 P2 ABI skeleton update
53
+
54
+ - `COD0` writer now emits 16-byte `opcode/a/b/c` instruction records.
55
+ - The writer emits required empty section skeletons for `FXC0`, `XCD0`, `SEL0`, `L1C0`, `L2D0`, `L3E0`, `L4G0`, `DSP0`, and `LIM0`.
56
+ - `ROLL_JUMP_IF_FALSE` source instructions now require an explicit `rollScopeId`.
57
+
58
+ # 2026-06-25 binary update
59
+
60
+ - Added `XPR0` const-ppm expression records to the writer output.
61
+ - Added `ROLL_JUMP_IF_FALSE` source instruction support.
62
+ - Added tracked `assets/fixtures/minimal-chance.golden.json`.
@@ -0,0 +1,53 @@
1
+ export type FxComparisonOperator = "EQ" | "NE" | "LT" | "LTE" | "GT" | "GTE";
2
+ export interface FxComparisonSource {
3
+ leftFormula: string;
4
+ comparator: FxComparisonOperator;
5
+ rightFormula: string;
6
+ }
7
+ export interface MinimalEffectSelectorSource {
8
+ selectorId: number;
9
+ name: string;
10
+ condition: FxComparisonSource;
11
+ flags?: number;
12
+ }
13
+ export type MinimalEffectInstructionSource = {
14
+ op: "CALL_OP";
15
+ operationKey: string;
16
+ } | {
17
+ op: "CALL_GROUP";
18
+ groupKey: string;
19
+ } | {
20
+ op: "JUMP_IF_FALSE";
21
+ condition: FxComparisonSource;
22
+ target: number;
23
+ } | {
24
+ op: "ROLL_JUMP_IF_FALSE";
25
+ probabilityPpm: number;
26
+ rollScopeId: number;
27
+ target: number;
28
+ } | {
29
+ op: "ROLL_JUMP_IF_FALSE";
30
+ probabilityFormula: string;
31
+ rollScopeId: number;
32
+ target: number;
33
+ } | {
34
+ op: "RETURN";
35
+ };
36
+ export interface MinimalEffectEntrySource {
37
+ entryId: number;
38
+ eventName: string;
39
+ instructions: MinimalEffectInstructionSource[];
40
+ }
41
+ export interface MinimalEffectProgramSource {
42
+ programId: number;
43
+ name: string;
44
+ entries: MinimalEffectEntrySource[];
45
+ }
46
+ export interface MinimalEffectBundleSource {
47
+ programs: MinimalEffectProgramSource[];
48
+ selectors?: MinimalEffectSelectorSource[];
49
+ }
50
+ export declare function createMinimalCallOpBundle(operationKey?: string): MinimalEffectBundleSource;
51
+ export declare function createMinimalCallGroupBundle(groupKey?: string): MinimalEffectBundleSource;
52
+ export declare function createMinimalChanceBundle(): MinimalEffectBundleSource;
53
+ export declare function writeEffectProgramBinary(source: MinimalEffectBundleSource): Uint8Array;
@@ -0,0 +1,17 @@
1
+ // CJHD editor-safe runtime stub. Generated by the publisher release tool.
2
+
3
+ const __cjSafeValue = new Proxy(function __cjSafeValue() {}, {
4
+ get(target, key) {
5
+ if (key === Symbol.toPrimitive) return function () { return 0; };
6
+ if (key === 'valueOf') return function () { return 0; };
7
+ if (key === 'toString') return function () { return '[CJHD editor-safe stub]'; };
8
+ return __cjSafeValue;
9
+ },
10
+ apply() { return __cjSafeValue; },
11
+ construct() { return __cjSafeValue; },
12
+ });
13
+
14
+ export function createMinimalCallOpBundle(...args) { return __cjSafeValue; }
15
+ export function createMinimalCallGroupBundle(...args) { return __cjSafeValue; }
16
+ export function createMinimalChanceBundle(...args) { return __cjSafeValue; }
17
+ export function writeEffectProgramBinary(...args) { return __cjSafeValue; }
@@ -0,0 +1,43 @@
1
+ import type { CompiledFormulaFx } from "@icjhd/cj-formula-fx";
2
+ export type FormulaExpressionInstructionSource = {
3
+ op: "PUSH_FX_CONST";
4
+ scaled: number;
5
+ } | {
6
+ op: "LOAD_CONTEXT_FX";
7
+ scope: "caster" | "target" | "const";
8
+ key: string;
9
+ } | {
10
+ op: "ADD_FX";
11
+ } | {
12
+ op: "SUB_FX";
13
+ } | {
14
+ op: "MUL_FX";
15
+ } | {
16
+ op: "DIV_FX";
17
+ } | {
18
+ op: "NEG_FX";
19
+ } | {
20
+ op: "MOD_FX";
21
+ } | {
22
+ op: "MIN_FX";
23
+ } | {
24
+ op: "MAX_FX";
25
+ } | {
26
+ op: "ABS_FX";
27
+ } | {
28
+ op: "CLAMP_FX";
29
+ } | {
30
+ op: "FLOOR_FX";
31
+ } | {
32
+ op: "CEIL_FX";
33
+ } | {
34
+ op: "ROUND_FX";
35
+ };
36
+ export interface CompiledFormulaExpressionSource {
37
+ source: string;
38
+ tier: CompiledFormulaFx["tier"];
39
+ instructions: FormulaExpressionInstructionSource[];
40
+ maxStack: number;
41
+ }
42
+ export declare function compileStaticFormulaFxToExpression(source: string): CompiledFormulaExpressionSource;
43
+ export declare function formulaExpressionOpcode(op: FormulaExpressionInstructionSource["op"]): number;
@@ -0,0 +1,15 @@
1
+ // CJHD editor-safe runtime stub. Generated by the publisher release tool.
2
+
3
+ const __cjSafeValue = new Proxy(function __cjSafeValue() {}, {
4
+ get(target, key) {
5
+ if (key === Symbol.toPrimitive) return function () { return 0; };
6
+ if (key === 'valueOf') return function () { return 0; };
7
+ if (key === 'toString') return function () { return '[CJHD editor-safe stub]'; };
8
+ return __cjSafeValue;
9
+ },
10
+ apply() { return __cjSafeValue; },
11
+ construct() { return __cjSafeValue; },
12
+ });
13
+
14
+ export function compileStaticFormulaFxToExpression(...args) { return __cjSafeValue; }
15
+ export function formulaExpressionOpcode(...args) { return __cjSafeValue; }
@@ -0,0 +1,7 @@
1
+ export interface OperationSpec {
2
+ name: string;
3
+ attrs: string[];
4
+ }
5
+ export declare const abilityEventNames: string[];
6
+ export declare const modifierEventNames: string[];
7
+ export declare function getOperationSpecs(kind: "ability" | "item"): OperationSpec[];
@@ -0,0 +1,16 @@
1
+ // CJHD editor-safe runtime stub. Generated by the publisher release tool.
2
+
3
+ const __cjSafeValue = new Proxy(function __cjSafeValue() {}, {
4
+ get(target, key) {
5
+ if (key === Symbol.toPrimitive) return function () { return 0; };
6
+ if (key === 'valueOf') return function () { return 0; };
7
+ if (key === 'toString') return function () { return '[CJHD editor-safe stub]'; };
8
+ return __cjSafeValue;
9
+ },
10
+ apply() { return __cjSafeValue; },
11
+ construct() { return __cjSafeValue; },
12
+ });
13
+
14
+ export function getOperationSpecs(...args) { return __cjSafeValue; }
15
+ export const abilityEventNames = __cjSafeValue;
16
+ export const modifierEventNames = __cjSafeValue;
@@ -0,0 +1,37 @@
1
+ export declare const CONTRACT_ABI_VERSION = 1;
2
+ export declare const COMPILER_ABI_VERSION = 1;
3
+ export interface RegistryFieldSnapshot {
4
+ id: number;
5
+ name: string;
6
+ valueKinds: readonly ["literal", "formulaRef", "expression", "editorBinding"];
7
+ }
8
+ export interface RegistryOperationSnapshot {
9
+ id: number;
10
+ kind: "ability" | "item";
11
+ name: string;
12
+ fields: RegistryFieldSnapshot[];
13
+ }
14
+ export interface RegistryEventSnapshot {
15
+ id: number;
16
+ source: "ability" | "modifier";
17
+ name: string;
18
+ }
19
+ export interface RegistrySnapshot {
20
+ format: "cj-script-registry";
21
+ contractAbiVersion: number;
22
+ compilerAbiVersion: number;
23
+ operations: RegistryOperationSnapshot[];
24
+ events: RegistryEventSnapshot[];
25
+ l1QueryPhases: readonly string[];
26
+ l2DefinitionFields: readonly string[];
27
+ l4PatchOperations: readonly string[];
28
+ contractHash: string;
29
+ }
30
+ export interface OperationFieldCoverage {
31
+ operationCount: number;
32
+ attrCount: number;
33
+ missingAttrs: string[];
34
+ }
35
+ export declare function createRegistrySnapshot(): RegistrySnapshot;
36
+ export declare function createOperationFieldCoverage(snapshot?: RegistrySnapshot): OperationFieldCoverage;
37
+ export declare function stableJson(value: unknown): string;
@@ -0,0 +1,18 @@
1
+ // CJHD editor-safe runtime stub. Generated by the publisher release tool.
2
+
3
+ const __cjSafeValue = new Proxy(function __cjSafeValue() {}, {
4
+ get(target, key) {
5
+ if (key === Symbol.toPrimitive) return function () { return 0; };
6
+ if (key === 'valueOf') return function () { return 0; };
7
+ if (key === 'toString') return function () { return '[CJHD editor-safe stub]'; };
8
+ return __cjSafeValue;
9
+ },
10
+ apply() { return __cjSafeValue; },
11
+ construct() { return __cjSafeValue; },
12
+ });
13
+
14
+ export function createRegistrySnapshot(...args) { return __cjSafeValue; }
15
+ export function createOperationFieldCoverage(...args) { return __cjSafeValue; }
16
+ export function stableJson(...args) { return __cjSafeValue; }
17
+ export const CONTRACT_ABI_VERSION = __cjSafeValue;
18
+ export const COMPILER_ABI_VERSION = __cjSafeValue;
@@ -0,0 +1,56 @@
1
+ {
2
+ "source": {
3
+ "programs": [
4
+ {
5
+ "programId": 1001,
6
+ "name": "minimal.bool_jump",
7
+ "entries": [
8
+ {
9
+ "entryId": 2,
10
+ "eventName": "OnProjectileHitUnit",
11
+ "instructions": [
12
+ {
13
+ "op": "CALL_OP",
14
+ "operationKey": "hit.damage"
15
+ },
16
+ {
17
+ "op": "JUMP_IF_FALSE",
18
+ "condition": {
19
+ "leftFormula": "caster.ap - target.def",
20
+ "comparator": "GT",
21
+ "rightFormula": "50"
22
+ },
23
+ "target": 3
24
+ },
25
+ {
26
+ "op": "CALL_OP",
27
+ "operationKey": "hit.apply_bleed"
28
+ },
29
+ {
30
+ "op": "RETURN"
31
+ }
32
+ ]
33
+ }
34
+ ]
35
+ }
36
+ ]
37
+ },
38
+ "evalContext": {
39
+ "caster": {
40
+ "ap": 100
41
+ },
42
+ "target": {
43
+ "def": 15
44
+ }
45
+ },
46
+ "expectedInspect": {
47
+ "fxConstantCount": 1,
48
+ "expressionInstructionCount": 6
49
+ },
50
+ "expectedEvalBool": {
51
+ "expressionId": 1,
52
+ "value": true
53
+ },
54
+ "sha256": "2e03f1bd86723a8f1fc5b06ebc22cf3ac619b8d5887d4ef5b729cc8340551713",
55
+ "disassembly": "program 1001 entry 2 OnProjectileHitUnit\n0000 CALL_OP slot=1 ; hit.damage\n0001 JUMP_IF_FALSE expr=1 target=3\n0002 CALL_OP slot=2 ; hit.apply_bleed\n0003 RETURN"
56
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "source": {
3
+ "programs": [
4
+ {
5
+ "programId": 1001,
6
+ "name": "minimal.call_group",
7
+ "entries": [
8
+ {
9
+ "entryId": 1,
10
+ "eventName": "OnChannelThink",
11
+ "instructions": [
12
+ {
13
+ "op": "CALL_GROUP",
14
+ "groupKey": "wave.projectiles"
15
+ },
16
+ {
17
+ "op": "RETURN"
18
+ }
19
+ ]
20
+ }
21
+ ]
22
+ }
23
+ ]
24
+ },
25
+ "sha256": "4f3ac1ec1eafc39ac9046c0c54fb7f27191cf573f7bdd5bd9db7b91d6d893289",
26
+ "disassembly": "program 1001 entry 1 OnChannelThink\n0000 CALL_GROUP slot=1 ; wave.projectiles\n0001 RETURN"
27
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "source": {
3
+ "programs": [
4
+ {
5
+ "programId": 1001,
6
+ "name": "minimal.call_op",
7
+ "entries": [
8
+ {
9
+ "entryId": 2,
10
+ "eventName": "OnProjectileHitUnit",
11
+ "instructions": [
12
+ {
13
+ "op": "CALL_OP",
14
+ "operationKey": "hit.damage"
15
+ },
16
+ {
17
+ "op": "RETURN"
18
+ }
19
+ ]
20
+ }
21
+ ]
22
+ }
23
+ ]
24
+ },
25
+ "sha256": "5c51a98fa1bf746f0ffc0be8121f321c996eba2db69d840a850ad8677f763d66",
26
+ "disassembly": "program 1001 entry 2 OnProjectileHitUnit\n0000 CALL_OP slot=1 ; hit.damage\n0001 RETURN"
27
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "source": {
3
+ "programs": [
4
+ {
5
+ "programId": 1001,
6
+ "name": "minimal.chance",
7
+ "entries": [
8
+ {
9
+ "entryId": 2,
10
+ "eventName": "OnProjectileHitUnit",
11
+ "instructions": [
12
+ {
13
+ "op": "CALL_OP",
14
+ "operationKey": "hit.damage"
15
+ },
16
+ {
17
+ "op": "ROLL_JUMP_IF_FALSE",
18
+ "probabilityPpm": 250000,
19
+ "rollScopeId": 1,
20
+ "target": 3
21
+ },
22
+ {
23
+ "op": "CALL_OP",
24
+ "operationKey": "hit.apply_bleed"
25
+ },
26
+ {
27
+ "op": "RETURN"
28
+ }
29
+ ]
30
+ }
31
+ ]
32
+ }
33
+ ]
34
+ },
35
+ "sha256": "ec8794e8656bd2c90cd20034bde509c74728cf274a4598c597c52b6664347372",
36
+ "disassembly": "program 1001 entry 2 OnProjectileHitUnit\n0000 CALL_OP slot=1 ; hit.damage\n0001 ROLL_JUMP_IF_FALSE expr=1 ppm=250000 rollScope=1 target=3\n0002 CALL_OP slot=2 ; hit.apply_bleed\n0003 RETURN"
37
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "source": {
3
+ "programs": [
4
+ {
5
+ "programId": 1001,
6
+ "name": "minimal.context_formula",
7
+ "entries": [
8
+ {
9
+ "entryId": 2,
10
+ "eventName": "OnProjectileHitUnit",
11
+ "instructions": [
12
+ {
13
+ "op": "CALL_OP",
14
+ "operationKey": "hit.damage"
15
+ },
16
+ {
17
+ "op": "ROLL_JUMP_IF_FALSE",
18
+ "probabilityFormula": "caster.ap * 0.01 - target.def * 0.05",
19
+ "rollScopeId": 1,
20
+ "target": 3
21
+ },
22
+ {
23
+ "op": "CALL_OP",
24
+ "operationKey": "hit.apply_bleed"
25
+ },
26
+ {
27
+ "op": "RETURN"
28
+ }
29
+ ]
30
+ }
31
+ ]
32
+ }
33
+ ]
34
+ },
35
+ "evalContext": {
36
+ "caster": {
37
+ "ap": 100
38
+ },
39
+ "target": {
40
+ "def": 15
41
+ }
42
+ },
43
+ "expectedInspect": {
44
+ "fxConstantCount": 2,
45
+ "expressionInstructionCount": 8
46
+ },
47
+ "expectedEvalFx": {
48
+ "expressionId": 1,
49
+ "scaled": 25000000,
50
+ "decimal": "0.25000000",
51
+ "ppm": 250000
52
+ },
53
+ "sha256": "c0b58b15c0ccbb961c0bdde14b91135e07e83e8c6f9f0c205356edc834bd1fb8",
54
+ "disassembly": "program 1001 entry 2 OnProjectileHitUnit\n0000 CALL_OP slot=1 ; hit.damage\n0001 ROLL_JUMP_IF_FALSE expr=1 ppm=0 rollScope=1 target=3\n0002 CALL_OP slot=2 ; hit.apply_bleed\n0003 RETURN"
55
+ }