@wwawing/engine 3.9.0-beta.2 → 3.9.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/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 -7
- 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;
|
|
@@ -75,7 +73,6 @@ export declare class WWA {
|
|
|
75
73
|
private _userVarNameListRequestError;
|
|
76
74
|
private _canDisplayUserVars;
|
|
77
75
|
private _isActive;
|
|
78
|
-
private _itemboxBackgroundPos;
|
|
79
76
|
private _mapIDTable;
|
|
80
77
|
private _mapObjectIDTable;
|
|
81
78
|
wwaCustomEventEmitter: IEventEmitter;
|
|
@@ -91,7 +88,7 @@ export declare class WWA {
|
|
|
91
88
|
private soundLoadedCheckTimer;
|
|
92
89
|
private _startTime;
|
|
93
90
|
private _dumpElement;
|
|
94
|
-
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);
|
|
95
92
|
private convertUserVariableNameListToArray;
|
|
96
93
|
private _setProgressBar;
|
|
97
94
|
private _setLoadingMessage;
|
|
@@ -289,9 +286,6 @@ export declare class WWA {
|
|
|
289
286
|
x: number;
|
|
290
287
|
y: number;
|
|
291
288
|
}): void;
|
|
292
|
-
private _getVirtualPadButton;
|
|
293
|
-
private _setVirtualPadTouch;
|
|
294
|
-
private _setVirtualPadLeave;
|
|
295
289
|
private _actionGamePadButtonItemMacro;
|
|
296
290
|
setGamePadButtonItemTable(buttonID: number, itemBoxNo: number): void;
|
|
297
291
|
private _checkSaveDataCompatibility;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wwawing/engine",
|
|
3
|
-
"version": "3.9.0
|
|
3
|
+
"version": "3.9.0",
|
|
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.0
|
|
49
|
-
"@wwawing/common-interface": "^3.9.0
|
|
50
|
-
"@wwawing/debug-server": "^3.9.0
|
|
51
|
-
"@wwawing/event-emitter": "^3.9.0
|
|
52
|
-
"@wwawing/loader": "^3.9.0
|
|
53
|
-
"@wwawing/page-generator": "^3.9.0
|
|
54
|
-
"@wwawing/styles": "^3.9.0
|
|
55
|
-
"@wwawing/virtual-pad": "^3.9.0-beta.2",
|
|
48
|
+
"@wwawing/assets": "^3.9.0",
|
|
49
|
+
"@wwawing/common-interface": "^3.9.0",
|
|
50
|
+
"@wwawing/debug-server": "^3.9.0",
|
|
51
|
+
"@wwawing/event-emitter": "^3.9.0",
|
|
52
|
+
"@wwawing/loader": "^3.9.0",
|
|
53
|
+
"@wwawing/page-generator": "^3.9.0",
|
|
54
|
+
"@wwawing/styles": "^3.9.0",
|
|
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": "32c2e708c4d92bceb1847063e35a9ade661f4e93"
|
|
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;
|