@wwawing/engine 3.8.0 → 3.9.0-alpha.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/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 SetMacroType = 'VARIABLE' | 'NUMBER' | 'HP' | 'HPMAX' | 'AT' | 'DF' | 'GD' | 'TIME' | 'STEP' | 'RAND';
package/lib/wwa_main.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Coord, Position, LoaderProgress, LoadStage, YesNoState, Face, SidebarButton, SpeedChange, PartsType, AppearanceTriggerType, EquipmentStatus, ChangeStyleType, MacroStatusIndex, UserDevice, MacroImgFrameIndex, StatusKind, StatusSolutionKind } from "./wwa_data";
1
+ import { Coord, Position, LoaderProgress, LoadStage, YesNoState, Face, SidebarButton, SpeedChange, PartsType, AppearanceTriggerType, EquipmentStatus, ChangeStyleType, MacroStatusIndex, UserDevice, MacroImgFrameIndex, StatusKind, StatusSolutionKind, SetMacroType } from "./wwa_data";
2
2
  import { MessageWindow, ParsedMessage } from "./wwa_message";
3
3
  import { ItemMenu } from "./wwa_item_menu";
4
4
  import { WWACompress } from "./wwa_save";
@@ -270,6 +270,12 @@ 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
+ parseType(str: string): SetMacroType | null;
276
+ parseValue(str: string): number;
277
+ checkCondition(macroStr: any): boolean;
278
+ ifElseResetStatus(): void;
273
279
  userVarUserIf(_triggerPartsPosition: Coord, args: string[]): void;
274
280
  private compareUserVar;
275
281
  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.8.0",
3
+ "version": "3.9.0-alpha.0",
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.8.0",
49
- "@wwawing/common-interface": "^3.8.0",
50
- "@wwawing/debug-server": "^3.8.0",
51
- "@wwawing/event-emitter": "^3.8.0",
52
- "@wwawing/loader": "^3.8.0",
53
- "@wwawing/page-generator": "^3.8.0",
54
- "@wwawing/styles": "^3.8.0",
48
+ "@wwawing/assets": "^3.9.0-alpha.0",
49
+ "@wwawing/common-interface": "^3.9.0-alpha.0",
50
+ "@wwawing/debug-server": "^3.9.0-alpha.0",
51
+ "@wwawing/event-emitter": "^3.9.0-alpha.0",
52
+ "@wwawing/loader": "^3.9.0-alpha.0",
53
+ "@wwawing/page-generator": "^3.9.0-alpha.0",
54
+ "@wwawing/styles": "^3.9.0-alpha.0",
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": "c652b5022ed532432f87b6b9011fcac0170e0999"
74
+ "gitHead": "99b7175f1ec57c4a21809a3faf5d82aba0e81f3c"
75
75
  }