@wwawing/engine 3.7.4 → 3.8.0-alpha.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/lib/wwa_data.d.ts CHANGED
@@ -256,6 +256,10 @@ export declare enum MacroType {
256
256
  VAR_MAP = 54,
257
257
  VAR_MOD = 55,
258
258
  NO_GAMEOVER = 56,
259
+ ELSE_IF = 57,
260
+ ELSE = 58,
261
+ END_IF = 59,
262
+ SET = 60,
259
263
  GAMEPAD_BUTTON = 100,
260
264
  OLDMOVE = 101
261
265
  }
@@ -315,6 +319,10 @@ export declare var macrotable: {
315
319
  $var_map: number;
316
320
  $var_mod: number;
317
321
  $no_gameover: number;
322
+ $else_if: number;
323
+ $else: number;
324
+ $endif: number;
325
+ $set: number;
318
326
  $gamepad_button: number;
319
327
  $oldmove: number;
320
328
  };
package/lib/wwa_main.d.ts CHANGED
@@ -270,6 +270,11 @@ export declare class WWA {
270
270
  setUserValRandNum(x: number, num: number, bias: number): void;
271
271
  private _generateUserValString;
272
272
  speedChangeJudge(speedChangeFlag: boolean): void;
273
+ execIfMacro(macroStr?: string): void;
274
+ execSetMacro(macroStr?: string): void;
275
+ parseValue(str: string): number;
276
+ checkCondition(macroStr: any): boolean;
277
+ ifElseResetStatus(): void;
273
278
  userVarUserIf(_triggerPartsPosition: Coord, args: string[]): void;
274
279
  private compareUserVar;
275
280
  setPlayerSpeedIndex(speedIndex: number): void;
@@ -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
+ isIFMacro(): 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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wwawing/engine",
3
- "version": "3.7.4",
3
+ "version": "3.8.0-alpha.2",
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.4",
46
46
  "@types/terser-webpack-plugin": "^5.0.3",
47
47
  "@types/webpack": "^5.28.0",
48
- "@wwawing/assets": "^3.7.4",
49
- "@wwawing/common-interface": "^3.7.4",
50
- "@wwawing/debug-server": "^3.7.4",
51
- "@wwawing/event-emitter": "^3.7.4",
52
- "@wwawing/loader": "^3.7.4",
53
- "@wwawing/page-generator": "^3.7.4",
54
- "@wwawing/styles": "^3.7.4",
48
+ "@wwawing/assets": "^3.8.0-alpha.2",
49
+ "@wwawing/common-interface": "^3.8.0-alpha.2",
50
+ "@wwawing/debug-server": "^3.8.0-alpha.2",
51
+ "@wwawing/event-emitter": "^3.8.0-alpha.2",
52
+ "@wwawing/loader": "^3.8.0-alpha.2",
53
+ "@wwawing/page-generator": "^3.8.0-alpha.2",
54
+ "@wwawing/styles": "^3.8.0-alpha.2",
55
55
  "crypto-js": "4.0.0",
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": "b16c9e5ebbb32703009da30cec82978596e027f9"
74
+ "gitHead": "992d9f5b020d04115551cb601abd5e3d93195efc"
75
75
  }