@wwawing/engine 3.9.0-alpha.1 → 3.9.0-alpha.3
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/lib/wwa.js +1 -1
- package/lib/wwa_expression/eval.d.ts +2 -0
- package/lib/wwa_expression/index.d.ts +5 -0
- package/lib/{wwa_symbol_parser → wwa_expression}/parsers.d.ts +6 -4
- package/lib/wwa_expression/regexp.d.ts +8 -0
- package/lib/{wwa_symbol_parser → wwa_expression}/value-assign-operation.d.ts +1 -1
- package/lib/wwa_password_window.d.ts +2 -0
- package/package.json +9 -9
- package/lib/wwa_symbol_parser/index.d.ts +0 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type TokenValues } from "./parsers";
|
|
2
|
+
import { type ValueAssignOperation } from "./value-assign-operation";
|
|
3
|
+
export { TokenValues, ValueAssignOperation };
|
|
4
|
+
export declare function evaluateSetMacroExpression(expression: string, tokenValues: TokenValues): ValueAssignOperation;
|
|
5
|
+
export declare function evaluateIfMacroExpression(expression: string, tokenValues: TokenValues): boolean;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { Status } from "../wwa_data";
|
|
1
|
+
import { EquipmentStatus, Status, Coord } from "../wwa_data";
|
|
2
2
|
export interface TokenValues {
|
|
3
|
-
|
|
3
|
+
totalStatus: Status;
|
|
4
|
+
bareStatus: EquipmentStatus;
|
|
5
|
+
itemStatus: EquipmentStatus;
|
|
4
6
|
energyMax: number;
|
|
5
7
|
moveCount: number;
|
|
6
8
|
playTime: number;
|
|
7
9
|
userVars: number[];
|
|
10
|
+
playerCoord: Coord;
|
|
8
11
|
}
|
|
9
|
-
export declare type SetMacroType = 'VARIABLE' | 'NUMBER' | 'HP' | 'HPMAX' | 'AT' | 'DF' | 'GD' | 'TIME' | 'STEP' | 'RAND';
|
|
10
|
-
export declare function calc(operator: string, leftValue: number, rightValue: number): number;
|
|
12
|
+
export declare type SetMacroType = 'VARIABLE' | 'NUMBER' | 'HP' | 'HPMAX' | 'AT' | 'AT_TOTAL' | 'AT_ITEMS' | 'DF' | 'DF_TOTAL' | 'DF_ITEMS' | 'GD' | 'TIME' | 'STEP' | 'PX' | 'PY' | 'RAND';
|
|
11
13
|
export declare function parseType(str: string): SetMacroType | null;
|
|
12
14
|
export declare function parseValue(value: string, tokenValues: TokenValues): number;
|
|
13
15
|
export declare function parseVariable(value: string, tokenValues: TokenValues): number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const regNumber: RegExp;
|
|
2
|
+
export declare const regUserVar: RegExp;
|
|
3
|
+
export declare const regUserVarCapture: RegExp;
|
|
4
|
+
export declare const regRand: RegExp;
|
|
5
|
+
export declare const regRandCapture: RegExp;
|
|
6
|
+
export declare const regAdvance: RegExp;
|
|
7
|
+
export declare const regNormal: RegExp;
|
|
8
|
+
export declare const regIf: RegExp;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface ValueAssignOperation {
|
|
2
|
-
|
|
2
|
+
assignee: "energy" | "energyMax" | "strength" | "defence" | "gold" | number;
|
|
3
3
|
rawValue: number;
|
|
4
4
|
}
|
|
5
5
|
export declare function generateValueAssignOperation(calcResult: number, assigneeExpression: string): ValueAssignOperation;
|
|
@@ -7,9 +7,11 @@ export declare class PasswordWindow {
|
|
|
7
7
|
private _wwa;
|
|
8
8
|
private _parent;
|
|
9
9
|
private _isDisallowLoadOldSave;
|
|
10
|
+
private readonly COPIED_MESSAGE_DISPLAY_MS;
|
|
10
11
|
private _element;
|
|
11
12
|
private _okButtonElement;
|
|
12
13
|
private _cancelButtonElement;
|
|
14
|
+
private _copyButtonElement;
|
|
13
15
|
private _descriptionElement;
|
|
14
16
|
private _passwordBoxElement;
|
|
15
17
|
private _buttonWrapperElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wwawing/engine",
|
|
3
|
-
"version": "3.9.0-alpha.
|
|
3
|
+
"version": "3.9.0-alpha.3",
|
|
4
4
|
"description": "World Wide Adventure: an RPG Engine.",
|
|
5
5
|
"main": "./lib/wwa.js",
|
|
6
6
|
"files": [
|
|
@@ -45,13 +45,13 @@
|
|
|
45
45
|
"@types/pug": "^2.0.6",
|
|
46
46
|
"@types/terser-webpack-plugin": "^5.2.0",
|
|
47
47
|
"@types/webpack": "^5.28.0",
|
|
48
|
-
"@wwawing/assets": "^3.9.0-alpha.
|
|
49
|
-
"@wwawing/common-interface": "^3.9.0-alpha.
|
|
50
|
-
"@wwawing/debug-server": "^3.9.0-alpha.
|
|
51
|
-
"@wwawing/event-emitter": "^3.9.0-alpha.
|
|
52
|
-
"@wwawing/loader": "^3.9.0-alpha.
|
|
53
|
-
"@wwawing/page-generator": "^3.9.0-alpha.
|
|
54
|
-
"@wwawing/styles": "^3.9.0-alpha.
|
|
48
|
+
"@wwawing/assets": "^3.9.0-alpha.3",
|
|
49
|
+
"@wwawing/common-interface": "^3.9.0-alpha.3",
|
|
50
|
+
"@wwawing/debug-server": "^3.9.0-alpha.3",
|
|
51
|
+
"@wwawing/event-emitter": "^3.9.0-alpha.3",
|
|
52
|
+
"@wwawing/loader": "^3.9.0-alpha.3",
|
|
53
|
+
"@wwawing/page-generator": "^3.9.0-alpha.3",
|
|
54
|
+
"@wwawing/styles": "^3.9.0-alpha.3",
|
|
55
55
|
"crypto-js": "^4.1.1",
|
|
56
56
|
"npm-run-all": "^4.1.5",
|
|
57
57
|
"pug": "^3.0.2",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"node": ">=16",
|
|
72
72
|
"npm": ">=8"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "2250b4678186fb10cb8ab20637a34b1c0ced2e5e"
|
|
75
75
|
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { type TokenValues } from "./parsers";
|
|
2
|
-
import { type ValueAssignOperation } from "./value-assign-operation";
|
|
3
|
-
export { TokenValues, ValueAssignOperation };
|
|
4
|
-
export declare function parseSetMacroExpression(macroStr: string, tokenValues: TokenValues): ValueAssignOperation;
|
|
5
|
-
export declare function checkCondition(descriminant: string, tokenValues: TokenValues): boolean;
|