@wwawing/engine 3.9.0-alpha.0 → 3.9.0-beta.1

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
@@ -567,4 +567,4 @@ export declare enum IDTable {
567
567
  }
568
568
  export declare type StatusSolutionKind = "all" | "bare" | "equipment";
569
569
  export declare type UserVarNameListRequestErrorKind = JsonResponseErrorKind | "notObject" | "noFileSpecified";
570
- export declare type SetMacroType = 'VARIABLE' | 'NUMBER' | 'HP' | 'HPMAX' | 'AT' | 'DF' | 'GD' | 'TIME' | 'STEP' | 'RAND';
570
+ export declare type ConditionalMacroExecStatus = "outside-ifelse" | "can-execute" | "cannot-execute" | "executed";
@@ -1 +1,2 @@
1
+ export declare function checkTouchDevice(): boolean;
1
2
  export declare function inject(parent: HTMLDivElement, titleImgName: string): void;
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, SetMacroType } from "./wwa_data";
1
+ import { Coord, Position, LoaderProgress, LoadStage, YesNoState, Face, SidebarButton, SpeedChange, PartsType, AppearanceTriggerType, EquipmentStatus, ChangeStyleType, MacroStatusIndex, UserDevice, MacroImgFrameIndex, StatusKind, StatusSolutionKind } 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";
@@ -16,6 +16,8 @@ export declare class WWA {
16
16
  private _monster;
17
17
  private _keyStore;
18
18
  private _mouseStore;
19
+ private _virtualPadStore;
20
+ private _virtualPadButtonElements;
19
21
  private _gamePadStore;
20
22
  private _camera;
21
23
  _itemMenu: ItemMenu;
@@ -73,10 +75,12 @@ export declare class WWA {
73
75
  private _userVarNameListRequestError;
74
76
  private _canDisplayUserVars;
75
77
  private _isActive;
78
+ private _itemboxBackgroundPos;
76
79
  private _mapIDTable;
77
80
  private _mapObjectIDTable;
78
81
  wwaCustomEventEmitter: IEventEmitter;
79
82
  private _scoreRates?;
83
+ private _conditionalMacroExecStatus;
80
84
  debug: boolean;
81
85
  private hoge;
82
86
  private _loadHandler;
@@ -87,7 +91,7 @@ export declare class WWA {
87
91
  private soundLoadedCheckTimer;
88
92
  private _startTime;
89
93
  private _dumpElement;
90
- constructor(mapFileName: string, urlgateEnabled: boolean, titleImgName: string, classicModeEnabled: boolean, itemEffectEnabled: boolean, useGoToWWA: boolean, audioDirectory: string, disallowLoadOldSave: boolean, dumpElm: HTMLElement, userVarNamesFile: string | null, canDisplayUserVars: boolean);
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, enableVirtualPad?: boolean, virtualpadControllerElm?: HTMLElement);
91
95
  private convertUserVariableNameListToArray;
92
96
  private _setProgressBar;
93
97
  private _setLoadingMessage;
@@ -270,12 +274,10 @@ export declare class WWA {
270
274
  setUserValRandNum(x: number, num: number, bias: number): void;
271
275
  private _generateUserValString;
272
276
  speedChangeJudge(speedChangeFlag: boolean): void;
273
- execIfMacro(macroStr?: string): void;
277
+ switchConditionalExecutionStatus(descriminant?: string): void;
274
278
  execSetMacro(macroStr?: string): void;
275
- parseType(str: string): SetMacroType | null;
276
- parseValue(str: string): number;
277
- checkCondition(macroStr: any): boolean;
278
- ifElseResetStatus(): void;
279
+ private _generateTokenValues;
280
+ resetConditionalMacroExecStaus(): void;
279
281
  userVarUserIf(_triggerPartsPosition: Coord, args: string[]): void;
280
282
  private compareUserVar;
281
283
  setPlayerSpeedIndex(speedIndex: number): void;
@@ -287,6 +289,9 @@ export declare class WWA {
287
289
  x: number;
288
290
  y: number;
289
291
  }): void;
292
+ private _getVirtualPadButton;
293
+ private _setVirtualPadTouch;
294
+ private _setVirtualPadLeave;
290
295
  private _actionGamePadButtonItemMacro;
291
296
  setGamePadButtonItemTable(buttonID: number, itemBoxNo: number): void;
292
297
  private _checkSaveDataCompatibility;
@@ -22,7 +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
+ isJunction(): boolean;
26
26
  execute(): void;
27
27
  private _concatEmptyArgs;
28
28
  private _parseInt;
@@ -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;
@@ -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 parseSetMacroExpression(macroStr: string, tokenValues: TokenValues): ValueAssignOperation;
5
+ export declare function checkCondition(descriminant: string, tokenValues: TokenValues): boolean;
@@ -0,0 +1,14 @@
1
+ import { Status } from "../wwa_data";
2
+ export interface TokenValues {
3
+ status: Status;
4
+ energyMax: number;
5
+ moveCount: number;
6
+ playTime: number;
7
+ userVars: number[];
8
+ }
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;
11
+ export declare function parseType(str: string): SetMacroType | null;
12
+ export declare function parseValue(value: string, tokenValues: TokenValues): number;
13
+ export declare function parseVariable(value: string, tokenValues: TokenValues): number;
14
+ export declare function parseNumber(value: string): number;
@@ -0,0 +1,5 @@
1
+ export interface ValueAssignOperation {
2
+ asignee: "energy" | "energyMax" | "strength" | "defence" | "gold" | number;
3
+ rawValue: number;
4
+ }
5
+ export declare function generateValueAssignOperation(calcResult: number, assigneeExpression: string): ValueAssignOperation;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wwawing/engine",
3
- "version": "3.9.0-alpha.0",
3
+ "version": "3.9.0-beta.1",
4
4
  "description": "World Wide Adventure: an RPG Engine.",
5
5
  "main": "./lib/wwa.js",
6
6
  "files": [
@@ -41,28 +41,29 @@
41
41
  },
42
42
  "homepage": "https://github.com/WWAWing/WWAWing#readme",
43
43
  "devDependencies": {
44
- "@types/crypto-js": "^4.0.1",
45
- "@types/pug": "^2.0.4",
46
- "@types/terser-webpack-plugin": "^5.0.3",
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.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
- "crypto-js": "4.0.0",
48
+ "@wwawing/assets": "^3.9.0-beta.1",
49
+ "@wwawing/common-interface": "^3.9.0-beta.1",
50
+ "@wwawing/debug-server": "^3.9.0-beta.1",
51
+ "@wwawing/event-emitter": "^3.9.0-beta.1",
52
+ "@wwawing/loader": "^3.9.0-beta.1",
53
+ "@wwawing/page-generator": "^3.9.0-beta.1",
54
+ "@wwawing/styles": "^3.9.0-beta.1",
55
+ "@wwawing/virtual-pad": "^3.9.0-beta.1",
56
+ "crypto-js": "^4.1.1",
56
57
  "npm-run-all": "^4.1.5",
57
58
  "pug": "^3.0.2",
58
- "shelljs": "^0.8.4",
59
- "shx": "^0.3.3",
60
- "terser-webpack-plugin": "^5.3.0",
61
- "ts-loader": "^4.3.0",
59
+ "shelljs": "^0.8.5",
60
+ "shx": "^0.3.4",
61
+ "terser-webpack-plugin": "^5.3.3",
62
+ "ts-loader": "^9.3.0",
62
63
  "ts-node": "^10.8.1",
63
64
  "typescript": "^4.7.3",
64
- "webpack": "^5.65.0",
65
- "webpack-cli": "^4.9.1"
65
+ "webpack": "^5.73.0",
66
+ "webpack-cli": "^4.10.0"
66
67
  },
67
68
  "publishConfig": {
68
69
  "access": "public"
@@ -71,5 +72,5 @@
71
72
  "node": ">=16",
72
73
  "npm": ">=8"
73
74
  },
74
- "gitHead": "99b7175f1ec57c4a21809a3faf5d82aba0e81f3c"
75
+ "gitHead": "afa09088a3983d144a072dfae45751d0b6c8aad4"
75
76
  }