@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.
- package/.cj-package.json +21 -0
- package/.cj-stubs/assets/EffectProgramWriter.js +17 -0
- package/.cj-stubs/assets/FormulaExpressionAdapter.js +15 -0
- package/.cj-stubs/assets/OperationSpecs.js +16 -0
- package/.cj-stubs/assets/RegistrySnapshot.js +18 -0
- package/.cj-stubs/index.js +16 -0
- package/.cj-stubs/recovery-manifest.json +47 -0
- package/README.md +62 -0
- package/assets/EffectProgramWriter.d.ts +53 -0
- package/assets/EffectProgramWriter.js +17 -0
- package/assets/FormulaExpressionAdapter.d.ts +43 -0
- package/assets/FormulaExpressionAdapter.js +15 -0
- package/assets/OperationSpecs.d.ts +7 -0
- package/assets/OperationSpecs.js +16 -0
- package/assets/RegistrySnapshot.d.ts +37 -0
- package/assets/RegistrySnapshot.js +18 -0
- package/assets/fixtures/minimal-bool-jump.golden.json +56 -0
- package/assets/fixtures/minimal-call-group.golden.json +27 -0
- package/assets/fixtures/minimal-call-op.golden.json +27 -0
- package/assets/fixtures/minimal-chance.golden.json +37 -0
- package/assets/fixtures/minimal-context-formula.golden.json +55 -0
- package/assets/fixtures/minimal-formula-chance.golden.json +47 -0
- package/assets/fixtures/minimal-function-formula.golden.json +58 -0
- package/assets/fixtures/minimal-rounding-formula.golden.json +55 -0
- package/assets/fixtures/minimal-selector.golden.json +61 -0
- package/assets/generated/operation-field-coverage.json +5 -0
- package/assets/generated/registry.snapshot.json +4466 -0
- package/cj-release-commit.json +10 -0
- package/encrypted-payload-v2/files/assets/EffectProgramWriter.js.bin +0 -0
- package/encrypted-payload-v2/files/assets/FormulaExpressionAdapter.js.bin +0 -0
- package/encrypted-payload-v2/files/assets/OperationSpecs.js.bin +0 -0
- package/encrypted-payload-v2/files/assets/RegistrySnapshot.js.bin +0 -0
- package/encrypted-payload-v2/files/index.js.bin +0 -0
- package/encrypted-payload-v2/manifest.json +98 -0
- package/index.d.ts +6 -0
- package/index.js +16 -0
- package/package.json +52 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": {
|
|
3
|
+
"programs": [
|
|
4
|
+
{
|
|
5
|
+
"programId": 1001,
|
|
6
|
+
"name": "minimal.formula_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
|
+
"probabilityFormula": "0.1 + 0.15",
|
|
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
|
+
"expectedInspect": {
|
|
36
|
+
"fxConstantCount": 2,
|
|
37
|
+
"expressionInstructionCount": 4
|
|
38
|
+
},
|
|
39
|
+
"expectedEvalFx": {
|
|
40
|
+
"expressionId": 1,
|
|
41
|
+
"scaled": 25000000,
|
|
42
|
+
"decimal": "0.25000000",
|
|
43
|
+
"ppm": 250000
|
|
44
|
+
},
|
|
45
|
+
"sha256": "8b2761d31b8616b5a313645e81ebc3f61c9c93913f3145c88d7c0ba9b03fae28",
|
|
46
|
+
"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"
|
|
47
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": {
|
|
3
|
+
"programs": [
|
|
4
|
+
{
|
|
5
|
+
"programId": 1001,
|
|
6
|
+
"name": "minimal.function_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": "clamp(max(caster.ap * 0.01 - target.def * 0.05, 0.1), 0, min(0.2, cap))",
|
|
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
|
+
"const": {
|
|
43
|
+
"cap": 0.3
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"expectedInspect": {
|
|
47
|
+
"fxConstantCount": 5,
|
|
48
|
+
"expressionInstructionCount": 15
|
|
49
|
+
},
|
|
50
|
+
"expectedEvalFx": {
|
|
51
|
+
"expressionId": 1,
|
|
52
|
+
"scaled": 20000000,
|
|
53
|
+
"decimal": "0.20000000",
|
|
54
|
+
"ppm": 200000
|
|
55
|
+
},
|
|
56
|
+
"sha256": "2edcad542b3eaec3136ef03a3bd01d9f19c055453cbdc0d38f0492ccb1d2a3f3",
|
|
57
|
+
"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"
|
|
58
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": {
|
|
3
|
+
"programs": [
|
|
4
|
+
{
|
|
5
|
+
"programId": 1001,
|
|
6
|
+
"name": "minimal.rounding_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": "round(abs(target.def - caster.ap) % 7.5) * 0.01 + floor(1.9) * 0.1 + ceil(0.1) * 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": 5,
|
|
45
|
+
"expressionInstructionCount": 20
|
|
46
|
+
},
|
|
47
|
+
"expectedEvalFx": {
|
|
48
|
+
"expressionId": 1,
|
|
49
|
+
"scaled": 17000000,
|
|
50
|
+
"decimal": "0.17000000",
|
|
51
|
+
"ppm": 170000
|
|
52
|
+
},
|
|
53
|
+
"sha256": "413bfe5c424e9eef5364e4317a54d0a825cd9cf880eac837c269ac22ad2e0a51",
|
|
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
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": {
|
|
3
|
+
"programs": [
|
|
4
|
+
{
|
|
5
|
+
"programId": 1001,
|
|
6
|
+
"name": "minimal.selector",
|
|
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
|
+
"selectors": [
|
|
25
|
+
{
|
|
26
|
+
"selectorId": 1,
|
|
27
|
+
"name": "target.hp_lte_50",
|
|
28
|
+
"condition": {
|
|
29
|
+
"leftFormula": "target.hp",
|
|
30
|
+
"comparator": "LTE",
|
|
31
|
+
"rightFormula": "50"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"evalContext": {
|
|
37
|
+
"target": {
|
|
38
|
+
"hp": 40
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"expectedInspect": {
|
|
42
|
+
"fxConstantCount": 1,
|
|
43
|
+
"expressionInstructionCount": 4,
|
|
44
|
+
"selectorCount": 1,
|
|
45
|
+
"selectors": [
|
|
46
|
+
{
|
|
47
|
+
"selectorId": 1,
|
|
48
|
+
"name": "target.hp_lte_50",
|
|
49
|
+
"boolExpressionId": 1,
|
|
50
|
+
"expressionKind": "bool",
|
|
51
|
+
"flags": 0
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"expectedEvalBool": {
|
|
56
|
+
"expressionId": 1,
|
|
57
|
+
"value": true
|
|
58
|
+
},
|
|
59
|
+
"sha256": "87d85f618c554c581efedde07f0164ea399cadd5c540b65321d305c68c752544",
|
|
60
|
+
"disassembly": "program 1001 entry 2 OnProjectileHitUnit\n0000 CALL_OP slot=1 ; hit.damage\n0001 RETURN"
|
|
61
|
+
}
|