@wwawing/engine 3.8.0 → 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 +3 -3
- package/lib/wwa_data.d.ts +9 -0
- package/lib/wwa_expression/eval.d.ts +2 -0
- package/lib/wwa_expression/index.d.ts +5 -0
- package/lib/wwa_expression/parsers.d.ts +16 -0
- package/lib/wwa_expression/regexp.d.ts +8 -0
- package/lib/wwa_expression/value-assign-operation.d.ts +5 -0
- package/lib/wwa_main.d.ts +5 -0
- package/lib/wwa_message.d.ts +5 -0
- package/lib/wwa_password_window.d.ts +2 -0
- package/package.json +19 -19
package/lib/wwa_data.d.ts
CHANGED
|
@@ -255,6 +255,10 @@ export declare enum MacroType {
|
|
|
255
255
|
VAR_MAP = 54,
|
|
256
256
|
VAR_MOD = 55,
|
|
257
257
|
NO_GAMEOVER = 56,
|
|
258
|
+
ELSE_IF = 57,
|
|
259
|
+
ELSE = 58,
|
|
260
|
+
END_IF = 59,
|
|
261
|
+
SET = 60,
|
|
258
262
|
GAMEPAD_BUTTON = 100,
|
|
259
263
|
OLDMOVE = 101
|
|
260
264
|
}
|
|
@@ -314,6 +318,10 @@ export declare var macrotable: {
|
|
|
314
318
|
$var_map: number;
|
|
315
319
|
$var_mod: number;
|
|
316
320
|
$no_gameover: number;
|
|
321
|
+
$else_if: number;
|
|
322
|
+
$else: number;
|
|
323
|
+
$endif: number;
|
|
324
|
+
$set: number;
|
|
317
325
|
$gamepad_button: number;
|
|
318
326
|
$oldmove: number;
|
|
319
327
|
};
|
|
@@ -559,3 +567,4 @@ export declare enum IDTable {
|
|
|
559
567
|
}
|
|
560
568
|
export declare type StatusSolutionKind = "all" | "bare" | "equipment";
|
|
561
569
|
export declare type UserVarNameListRequestErrorKind = JsonResponseErrorKind | "notObject" | "noFileSpecified";
|
|
570
|
+
export declare type ConditionalMacroExecStatus = "outside-ifelse" | "can-execute" | "cannot-execute" | "executed";
|
|
@@ -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;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EquipmentStatus, Status, Coord } from "../wwa_data";
|
|
2
|
+
export interface TokenValues {
|
|
3
|
+
totalStatus: Status;
|
|
4
|
+
bareStatus: EquipmentStatus;
|
|
5
|
+
itemStatus: EquipmentStatus;
|
|
6
|
+
energyMax: number;
|
|
7
|
+
moveCount: number;
|
|
8
|
+
playTime: number;
|
|
9
|
+
userVars: number[];
|
|
10
|
+
playerCoord: Coord;
|
|
11
|
+
}
|
|
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';
|
|
13
|
+
export declare function parseType(str: string): SetMacroType | null;
|
|
14
|
+
export declare function parseValue(value: string, tokenValues: TokenValues): number;
|
|
15
|
+
export declare function parseVariable(value: string, tokenValues: TokenValues): number;
|
|
16
|
+
export declare function parseNumber(value: string): 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;
|
package/lib/wwa_main.d.ts
CHANGED
|
@@ -77,6 +77,7 @@ export declare class WWA {
|
|
|
77
77
|
private _mapObjectIDTable;
|
|
78
78
|
wwaCustomEventEmitter: IEventEmitter;
|
|
79
79
|
private _scoreRates?;
|
|
80
|
+
private _conditionalMacroExecStatus;
|
|
80
81
|
debug: boolean;
|
|
81
82
|
private hoge;
|
|
82
83
|
private _loadHandler;
|
|
@@ -270,6 +271,10 @@ export declare class WWA {
|
|
|
270
271
|
setUserValRandNum(x: number, num: number, bias: number): void;
|
|
271
272
|
private _generateUserValString;
|
|
272
273
|
speedChangeJudge(speedChangeFlag: boolean): void;
|
|
274
|
+
switchConditionalExecutionStatus(descriminant?: string): void;
|
|
275
|
+
execSetMacro(macroStr?: string): void;
|
|
276
|
+
private _generateTokenValues;
|
|
277
|
+
resetConditionalMacroExecStaus(): void;
|
|
273
278
|
userVarUserIf(_triggerPartsPosition: Coord, args: string[]): void;
|
|
274
279
|
private compareUserVar;
|
|
275
280
|
setPlayerSpeedIndex(speedIndex: number): void;
|
package/lib/wwa_message.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export declare class Macro {
|
|
|
22
22
|
macroType: MacroType;
|
|
23
23
|
macroArgs: string[];
|
|
24
24
|
constructor(_wwa: WWA, _triggerPartsID: number, _triggerPartsType: number, _triggerPartsPosition: Coord, macroType: MacroType, macroArgs: string[]);
|
|
25
|
+
isJunction(): boolean;
|
|
25
26
|
execute(): void;
|
|
26
27
|
private _concatEmptyArgs;
|
|
27
28
|
private _parseInt;
|
|
@@ -51,6 +52,9 @@ export declare class Macro {
|
|
|
51
52
|
private _executeVarSetRandMacro;
|
|
52
53
|
private _executeGameSpeedMacro;
|
|
53
54
|
private _executeIfMacro;
|
|
55
|
+
private _executeIfElseMacro;
|
|
56
|
+
private _executeElseMacro;
|
|
57
|
+
private _executeEndIfMacro;
|
|
54
58
|
private _executeSetSpeedMacro;
|
|
55
59
|
private _executeCopyTimeToMacro;
|
|
56
60
|
private _executeHideStatusMacro;
|
|
@@ -81,6 +85,7 @@ export declare class Macro {
|
|
|
81
85
|
private _executeGamePadButtonMacro;
|
|
82
86
|
private _executeOldMoveMacro;
|
|
83
87
|
private _executeNoGameOverMacro;
|
|
88
|
+
private _executeSetMacro;
|
|
84
89
|
}
|
|
85
90
|
export declare function parseMacro(wwa: WWA, partsID: number, partsType: PartsType, position: Coord, macroStr: string): Macro;
|
|
86
91
|
export declare class TextWindow {
|
|
@@ -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.
|
|
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": [
|
|
@@ -41,28 +41,28 @@
|
|
|
41
41
|
},
|
|
42
42
|
"homepage": "https://github.com/WWAWing/WWAWing#readme",
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@types/crypto-js": "^4.
|
|
45
|
-
"@types/pug": "^2.0.
|
|
46
|
-
"@types/terser-webpack-plugin": "^5.0
|
|
44
|
+
"@types/crypto-js": "^4.1.1",
|
|
45
|
+
"@types/pug": "^2.0.6",
|
|
46
|
+
"@types/terser-webpack-plugin": "^5.2.0",
|
|
47
47
|
"@types/webpack": "^5.28.0",
|
|
48
|
-
"@wwawing/assets": "^3.
|
|
49
|
-
"@wwawing/common-interface": "^3.
|
|
50
|
-
"@wwawing/debug-server": "^3.
|
|
51
|
-
"@wwawing/event-emitter": "^3.
|
|
52
|
-
"@wwawing/loader": "^3.
|
|
53
|
-
"@wwawing/page-generator": "^3.
|
|
54
|
-
"@wwawing/styles": "^3.
|
|
55
|
-
"crypto-js": "4.
|
|
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
|
+
"crypto-js": "^4.1.1",
|
|
56
56
|
"npm-run-all": "^4.1.5",
|
|
57
57
|
"pug": "^3.0.2",
|
|
58
|
-
"shelljs": "^0.8.
|
|
59
|
-
"shx": "^0.3.
|
|
60
|
-
"terser-webpack-plugin": "^5.3.
|
|
61
|
-
"ts-loader": "^
|
|
58
|
+
"shelljs": "^0.8.5",
|
|
59
|
+
"shx": "^0.3.4",
|
|
60
|
+
"terser-webpack-plugin": "^5.3.3",
|
|
61
|
+
"ts-loader": "^9.3.0",
|
|
62
62
|
"ts-node": "^10.8.1",
|
|
63
63
|
"typescript": "^4.7.3",
|
|
64
|
-
"webpack": "^5.
|
|
65
|
-
"webpack-cli": "^4.
|
|
64
|
+
"webpack": "^5.73.0",
|
|
65
|
+
"webpack-cli": "^4.10.0"
|
|
66
66
|
},
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"node": ">=16",
|
|
72
72
|
"npm": ">=8"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "2250b4678186fb10cb8ab20637a34b1c0ced2e5e"
|
|
75
75
|
}
|