@wwawing/engine 3.8.0-alpha.0 → 3.8.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_data.d.ts CHANGED
@@ -259,6 +259,7 @@ export declare enum MacroType {
259
259
  ELSE_IF = 57,
260
260
  ELSE = 58,
261
261
  END_IF = 59,
262
+ SET = 60,
262
263
  GAMEPAD_BUTTON = 100,
263
264
  OLDMOVE = 101
264
265
  }
@@ -321,6 +322,7 @@ export declare var macrotable: {
321
322
  $else_if: number;
322
323
  $else: number;
323
324
  $endif: number;
325
+ $set: number;
324
326
  $gamepad_button: number;
325
327
  $oldmove: number;
326
328
  };
@@ -571,3 +573,4 @@ export declare type JsonRequestError<ErrorKind = JsonRequestErrorKind> = {
571
573
  kind: ErrorKind;
572
574
  detail: string;
573
575
  };
576
+ 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, JsonRequestError } from "./wwa_data";
1
+ import { Coord, Position, LoaderProgress, LoadStage, YesNoState, Face, SidebarButton, SpeedChange, PartsType, AppearanceTriggerType, EquipmentStatus, ChangeStyleType, MacroStatusIndex, UserDevice, MacroImgFrameIndex, StatusKind, StatusSolutionKind, JsonRequestError, 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";
@@ -271,6 +271,9 @@ export declare class WWA {
271
271
  private _generateUserValString;
272
272
  speedChangeJudge(speedChangeFlag: boolean): void;
273
273
  execIfMacro(macroStr?: string): void;
274
+ execSetMacro(macroStr?: string): void;
275
+ parseType(str: string): SetMacroType | null;
276
+ parseValue(str: string): number;
274
277
  checkCondition(macroStr: any): boolean;
275
278
  ifElseResetStatus(): void;
276
279
  userVarUserIf(_triggerPartsPosition: Coord, args: string[]): void;
@@ -85,6 +85,7 @@ export declare class Macro {
85
85
  private _executeGamePadButtonMacro;
86
86
  private _executeOldMoveMacro;
87
87
  private _executeNoGameOverMacro;
88
+ private _executeSetMacro;
88
89
  }
89
90
  export declare function parseMacro(wwa: WWA, partsID: number, partsType: PartsType, position: Coord, macroStr: string): Macro;
90
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-alpha.0",
3
+ "version": "3.8.0-alpha.3",
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-alpha.0",
49
- "@wwawing/common-interface": "^3.8.0-alpha.0",
50
- "@wwawing/debug-server": "^3.8.0-alpha.0",
51
- "@wwawing/event-emitter": "^3.8.0-alpha.0",
52
- "@wwawing/loader": "^3.8.0-alpha.0",
53
- "@wwawing/page-generator": "^3.8.0-alpha.0",
54
- "@wwawing/styles": "^3.8.0-alpha.0",
48
+ "@wwawing/assets": "^3.8.0-alpha.3",
49
+ "@wwawing/common-interface": "^3.8.0-alpha.3",
50
+ "@wwawing/debug-server": "^3.8.0-alpha.3",
51
+ "@wwawing/event-emitter": "^3.8.0-alpha.3",
52
+ "@wwawing/loader": "^3.8.0-alpha.3",
53
+ "@wwawing/page-generator": "^3.8.0-alpha.3",
54
+ "@wwawing/styles": "^3.8.0-alpha.3",
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": "760a3156483b7f1ce7ab9bc5a8a008c5f658ff30"
74
+ "gitHead": "f944efa0aca8afeb2eccdd5d04e7a210514be9d7"
75
75
  }