@wwawing/engine 3.9.0-beta.3 → 3.9.2
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/debug/make-debug-pages.ts +0 -5
- package/lib/wwa.js +3 -3
- 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_inject_html.d.ts +1 -2
- package/lib/wwa_main.d.ts +1 -6
- package/package.json +9 -10
- 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;
|
package/lib/wwa_inject_html.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export declare function
|
|
2
|
-
export declare function inject(parent: HTMLDivElement, titleImgName: string, enableVirtualPad: boolean): void;
|
|
1
|
+
export declare function inject(parent: HTMLDivElement, titleImgName: string): void;
|
package/lib/wwa_main.d.ts
CHANGED
|
@@ -16,8 +16,6 @@ export declare class WWA {
|
|
|
16
16
|
private _monster;
|
|
17
17
|
private _keyStore;
|
|
18
18
|
private _mouseStore;
|
|
19
|
-
private _virtualPadStore;
|
|
20
|
-
private _virtualPadButtonElements;
|
|
21
19
|
private _gamePadStore;
|
|
22
20
|
private _camera;
|
|
23
21
|
_itemMenu: ItemMenu;
|
|
@@ -90,7 +88,7 @@ export declare class WWA {
|
|
|
90
88
|
private soundLoadedCheckTimer;
|
|
91
89
|
private _startTime;
|
|
92
90
|
private _dumpElement;
|
|
93
|
-
constructor(mapFileName: string, urlgateEnabled: boolean, titleImgName: string, classicModeEnabled: boolean, itemEffectEnabled: boolean, useGoToWWA: boolean, audioDirectory: string, disallowLoadOldSave: boolean, dumpElm: HTMLElement, userVarNamesFile: string | null, canDisplayUserVars: boolean
|
|
91
|
+
constructor(mapFileName: string, urlgateEnabled: boolean, titleImgName: string, classicModeEnabled: boolean, itemEffectEnabled: boolean, useGoToWWA: boolean, audioDirectory: string, disallowLoadOldSave: boolean, dumpElm: HTMLElement, userVarNamesFile: string | null, canDisplayUserVars: boolean);
|
|
94
92
|
private convertUserVariableNameListToArray;
|
|
95
93
|
private _setProgressBar;
|
|
96
94
|
private _setLoadingMessage;
|
|
@@ -288,9 +286,6 @@ export declare class WWA {
|
|
|
288
286
|
x: number;
|
|
289
287
|
y: number;
|
|
290
288
|
}): void;
|
|
291
|
-
private _getVirtualPadButton;
|
|
292
|
-
private _setVirtualPadTouch;
|
|
293
|
-
private _setVirtualPadLeave;
|
|
294
289
|
private _actionGamePadButtonItemMacro;
|
|
295
290
|
setGamePadButtonItemTable(buttonID: number, itemBoxNo: number): void;
|
|
296
291
|
private _checkSaveDataCompatibility;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wwawing/engine",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.2",
|
|
4
4
|
"description": "World Wide Adventure: an RPG Engine.",
|
|
5
5
|
"main": "./lib/wwa.js",
|
|
6
6
|
"files": [
|
|
@@ -45,14 +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.
|
|
49
|
-
"@wwawing/common-interface": "^3.9.
|
|
50
|
-
"@wwawing/debug-server": "^3.9.
|
|
51
|
-
"@wwawing/event-emitter": "^3.9.
|
|
52
|
-
"@wwawing/loader": "^3.9.
|
|
53
|
-
"@wwawing/page-generator": "^3.9.
|
|
54
|
-
"@wwawing/styles": "^3.9.
|
|
55
|
-
"@wwawing/virtual-pad": "^3.9.0-beta.3",
|
|
48
|
+
"@wwawing/assets": "^3.9.2",
|
|
49
|
+
"@wwawing/common-interface": "^3.9.2",
|
|
50
|
+
"@wwawing/debug-server": "^3.9.2",
|
|
51
|
+
"@wwawing/event-emitter": "^3.9.2",
|
|
52
|
+
"@wwawing/loader": "^3.9.2",
|
|
53
|
+
"@wwawing/page-generator": "^3.9.2",
|
|
54
|
+
"@wwawing/styles": "^3.9.2",
|
|
56
55
|
"crypto-js": "^4.1.1",
|
|
57
56
|
"npm-run-all": "^4.1.5",
|
|
58
57
|
"pug": "^3.0.2",
|
|
@@ -72,5 +71,5 @@
|
|
|
72
71
|
"node": ">=16",
|
|
73
72
|
"npm": ">=8"
|
|
74
73
|
},
|
|
75
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "b775192355e609257f9ebdef8d39f8a81d0d6300"
|
|
76
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;
|