@wwawing/engine 4.0.0 → 4.0.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.
Files changed (73) hide show
  1. package/LICENSE +2 -2
  2. package/debug/make-debug-pages.ts +4 -3
  3. package/debug/maps-config.ts +1 -0
  4. package/lib/wwa.js +246 -21
  5. package/package.json +28 -29
  6. package/lib/__tests__/wwa_util-test.d.ts +0 -1
  7. package/lib/json_api_client/index.d.ts +0 -12
  8. package/lib/load_script_file/index.d.ts +0 -6
  9. package/lib/wwa_camera.d.ts +0 -20
  10. package/lib/wwa_cgmanager.d.ts +0 -51
  11. package/lib/wwa_data/options.d.ts +0 -2
  12. package/lib/wwa_data/typedef.d.ts +0 -20
  13. package/lib/wwa_data.d.ts +0 -591
  14. package/lib/wwa_encryption.d.ts +0 -4
  15. package/lib/wwa_estimate_battle.d.ts +0 -14
  16. package/lib/wwa_expression/__tests__/value-assign-operation.d.ts +0 -1
  17. package/lib/wwa_expression/eval.d.ts +0 -5
  18. package/lib/wwa_expression/index.d.ts +0 -11
  19. package/lib/wwa_expression/parsers.d.ts +0 -3
  20. package/lib/wwa_expression/regexp.d.ts +0 -11
  21. package/lib/wwa_expression/typedef.d.ts +0 -57
  22. package/lib/wwa_expression/value-assign-operation.d.ts +0 -22
  23. package/lib/wwa_expression2/acorn.d.ts +0 -111
  24. package/lib/wwa_expression2/converter.d.ts +0 -4
  25. package/lib/wwa_expression2/eval.d.ts +0 -73
  26. package/lib/wwa_expression2/index.d.ts +0 -4
  27. package/lib/wwa_expression2/typedef.d.ts +0 -9
  28. package/lib/wwa_expression2/wwa.d.ts +0 -150
  29. package/lib/wwa_inject_html.d.ts +0 -2
  30. package/lib/wwa_input.d.ts +0 -140
  31. package/lib/wwa_item_menu.d.ts +0 -20
  32. package/lib/wwa_macro.d.ts +0 -76
  33. package/lib/wwa_main.d.ts +0 -394
  34. package/lib/wwa_message/_internal/index.d.ts +0 -32
  35. package/lib/wwa_message/data/index.d.ts +0 -18
  36. package/lib/wwa_message/data/node.d.ts +0 -46
  37. package/lib/wwa_message/data/page.d.ts +0 -13
  38. package/lib/wwa_message/index.d.ts +0 -10
  39. package/lib/wwa_message/typedef.d.ts +0 -5
  40. package/lib/wwa_monster.d.ts +0 -21
  41. package/lib/wwa_motion.d.ts +0 -29
  42. package/lib/wwa_parts_player.d.ts +0 -173
  43. package/lib/wwa_password_window.d.ts +0 -28
  44. package/lib/wwa_play_time.d.ts +0 -8
  45. package/lib/wwa_save/WWACompress.d.ts +0 -36
  46. package/lib/wwa_save/WWASave.d.ts +0 -27
  47. package/lib/wwa_save/WWASaveData.d.ts +0 -20
  48. package/lib/wwa_save/WWASaveDataDB.d.ts +0 -5
  49. package/lib/wwa_save/WWASaveDataDBList.d.ts +0 -31
  50. package/lib/wwa_save/WWASaveDataList.d.ts +0 -6
  51. package/lib/wwa_save/WWASaveDataLog.d.ts +0 -3
  52. package/lib/wwa_save/WWASaveDataLogList.d.ts +0 -14
  53. package/lib/wwa_save/common/definitions.d.ts +0 -11
  54. package/lib/wwa_save/common/index.d.ts +0 -2
  55. package/lib/wwa_save/common/mapDataRevisionKey.d.ts +0 -1
  56. package/lib/wwa_save/index.d.ts +0 -6
  57. package/lib/wwa_save/migrators/index.d.ts +0 -2
  58. package/lib/wwa_save/migrators/migrate-gameover-policy.d.ts +0 -2
  59. package/lib/wwa_sound.d.ts +0 -26
  60. package/lib/wwa_util.d.ts +0 -14
  61. package/lib/wwa_vardump/api.d.ts +0 -8
  62. package/lib/wwa_vardump/index.d.ts +0 -9
  63. package/lib/wwa_vardump/named-user-variable/api.d.ts +0 -1
  64. package/lib/wwa_vardump/named-user-variable/index.d.ts +0 -1
  65. package/lib/wwa_vardump/numbered-user-variable/api.d.ts +0 -3
  66. package/lib/wwa_vardump/numbered-user-variable/index.d.ts +0 -1
  67. package/lib/wwa_vardump/user-variable/user-variable-card/index.d.ts +0 -10
  68. package/lib/wwa_vardump/user-variable/user-variable-label/index.d.ts +0 -3
  69. package/lib/wwa_vardump/user-variable/user-variable-list/index.d.ts +0 -14
  70. package/lib/wwa_vardump/user-variable/user-variable-list-section/header/index.d.ts +0 -13
  71. package/lib/wwa_vardump/user-variable/user-variable-list-section/header/information/index.d.ts +0 -3
  72. package/lib/wwa_vardump/user-variable/user-variable-list-section/index.d.ts +0 -8
  73. package/lib/wwa_window.d.ts +0 -97
package/lib/wwa_data.d.ts DELETED
@@ -1,591 +0,0 @@
1
- import { type WWAData } from "@wwawing/common-interface";
2
- import { WWA } from "./wwa_main";
3
- import { Camera } from "./wwa_camera";
4
- import type { JsonResponseErrorKind } from "./json_api_client";
5
- export { type WWAData };
6
- export declare class EquipmentStatus {
7
- strength: number;
8
- defence: number;
9
- add(s: EquipmentStatus): EquipmentStatus;
10
- plus(s: EquipmentStatus): EquipmentStatus;
11
- minus(s: EquipmentStatus): EquipmentStatus;
12
- equals(e: EquipmentStatus): boolean;
13
- constructor(s: number, d: number);
14
- }
15
- export declare class Status extends EquipmentStatus {
16
- energy: number;
17
- gold: number;
18
- add(s: EquipmentStatus): Status;
19
- plus(s: EquipmentStatus): Status;
20
- minus(s: EquipmentStatus): Status;
21
- equals(e: Status): boolean;
22
- calculateScore(scoreOption: ScoreOption): number;
23
- clone(): Status;
24
- constructor(e: number, s: number, d: number, g: number);
25
- }
26
- export declare class Coord {
27
- x: number;
28
- y: number;
29
- equals(coord: Coord): boolean;
30
- substract(c: Coord): Coord;
31
- clone(): Coord;
32
- convertIntoPosition(wwa: WWA): Position;
33
- getDirectionTo(dest: Coord): Direction;
34
- toString(): string;
35
- constructor(x?: number, y?: number);
36
- }
37
- export declare class Position {
38
- private _wwa;
39
- private _partsCoord;
40
- private _offsetCoord;
41
- getPartsCoord(): Coord;
42
- getOffsetCoord(): Coord;
43
- getScreenTopPosition(): Position;
44
- getDefaultCameraPosition(): Position;
45
- getNextJustPosition(dir?: Direction): Position;
46
- getNextFramePosition(dir: Direction, speedX: number, speedY: number): Position;
47
- isJustPosition(): boolean;
48
- isScreenTopPosition(): boolean;
49
- equals(pos: Position): boolean;
50
- isInCameraRange(camera: Camera, exceptRightBottomEdge?: boolean): boolean;
51
- hasLocalGate(): boolean;
52
- clone(): Position;
53
- constructor(wwa: WWA, x: number, y: number, offsetX?: number, offsetY?: number);
54
- }
55
- export declare class Face {
56
- destPos: Coord;
57
- srcPos: Coord;
58
- srcSize: Coord;
59
- constructor(destPos: Coord, srcPos: Coord, srcSize: Coord);
60
- }
61
- export declare class DrawPartsData {
62
- partsIDObj: number;
63
- x: number;
64
- y: number;
65
- isStatic: boolean;
66
- isFighting: boolean;
67
- constructor(partsIDObj: number, x: number, y: number, isStatic: boolean, isFighting: boolean);
68
- }
69
- export declare enum ControlPanelBottomButton {
70
- GOTO_WWA = 0,
71
- BATTLE_REPORT = 1,
72
- GAME_END = 2
73
- }
74
- export declare enum Direction {
75
- UNUSED = 0,
76
- LEFT = 4,
77
- RIGHT = 6,
78
- DOWN = 2,
79
- UP = 8,
80
- LEFT_DOWN = 1,
81
- LEFT_UP = 7,
82
- RIGHT_DOWN = 3,
83
- RIGHT_UP = 9,
84
- NO_DIRECTION = 5
85
- }
86
- export declare const vx: number[];
87
- export declare const vy: number[];
88
- export declare enum YesNoState {
89
- YES = 0,
90
- NO = 1,
91
- UNSELECTED = 2
92
- }
93
- export declare enum AppearanceTriggerType {
94
- MAP = 0,
95
- OBJECT = 1,
96
- CHOICE_YES = 2,
97
- CHOICE_NO = 3
98
- }
99
- export declare enum ItemMode {
100
- NORMAL = 0,
101
- CAN_USE = 1,
102
- NOT_DISAPPEAR = 2
103
- }
104
- export declare enum PartsType {
105
- MAP = 1,
106
- OBJECT = 0
107
- }
108
- export declare class UserDevice {
109
- os: number;
110
- browser: number;
111
- device: number;
112
- constructor();
113
- private _getOS;
114
- private getBrowser;
115
- private getDevice;
116
- }
117
- export declare enum OS_TYPE {
118
- WINDOWS = 1,
119
- MACINTOSH = 2,
120
- LINUX = 3,
121
- ANDROID = 4,
122
- IOS = 5,
123
- NINTENDO = 6,
124
- PLAY_STATION = 7,
125
- OCULUS = 8,
126
- XBOX = 9,
127
- OTHERS = 9999
128
- }
129
- export declare enum DEVICE_TYPE {
130
- PC = 1,
131
- SP = 2,
132
- VR = 3,
133
- GAME = 4,
134
- OTHERS = 9999
135
- }
136
- export declare enum BROWSER_TYPE {
137
- CHROME = 1,
138
- FIREFOX = 2,
139
- SAFARI = 3,
140
- OTHERS = 9999
141
- }
142
- export declare enum ChoiceCallInfo {
143
- NONE = 0,
144
- CALL_BY_MAP_PARTS = 1,
145
- CALL_BY_OBJECT_PARTS = 2,
146
- CALL_BY_ITEM_USE = 3,
147
- CALL_BY_QUICK_SAVE = 4,
148
- CALL_BY_QUICK_LOAD = 5,
149
- CALL_BY_RESTART_GAME = 6,
150
- CALL_BY_GOTO_WWA = 7,
151
- CALL_BY_PASSWORD_SAVE = 8,
152
- CALL_BY_PASSWORD_LOAD = 9,
153
- CALL_BY_END_GAME = 10,
154
- CALL_BY_SUSPEND = 11,
155
- CALL_BY_LOG_QUICK_SAVE = 12,
156
- CALL_BY_LOG_QUICK_LOAD = 13
157
- }
158
- export declare enum SidebarButton {
159
- QUICK_LOAD = 0,
160
- QUICK_SAVE = 1,
161
- RESTART_GAME = 2,
162
- GOTO_WWA = 3
163
- }
164
- export declare enum SpeedChange {
165
- UP = 0,
166
- DOWN = 1
167
- }
168
- export declare enum LoadType {
169
- QUICK_LOAD = 0,
170
- RESTART_GAME = 1,
171
- PASSWORD = 2
172
- }
173
- export declare enum MoveType {
174
- STATIC = 0,
175
- CHASE_PLAYER = 1,
176
- RUN_OUT = 2,
177
- HANG_AROUND = 3
178
- }
179
- export declare enum SecondCandidateMoveType {
180
- MODE_X = 0,
181
- MODE_Y = 1,
182
- UNDECIDED = 2
183
- }
184
- export declare var sidebarButtonCellElementID: string[];
185
- export declare enum MacroType {
186
- UNDEFINED = 0,
187
- IMGPLAYER = 1,
188
- IMGYESNO = 2,
189
- HPMAX = 3,
190
- SAVE = 4,
191
- ITEM = 5,
192
- DEFAULT = 6,
193
- OLDMAP = 7,
194
- PARTS = 8,
195
- MOVE = 9,
196
- MAP = 10,
197
- DIRMAP = 11,
198
- IMGFRAME = 12,
199
- IMGBOM = 13,
200
- DELPLAYER = 14,
201
- FACE = 15,
202
- EFFECT = 16,
203
- GAMEOVER = 17,
204
- IMGCLICK = 18,
205
- STATUS = 19,
206
- EFFITEM = 20,
207
- COLOR = 21,
208
- WAIT = 22,
209
- SOUND = 23,
210
- JUMPGATE = 24,
211
- RECPOSITION = 25,
212
- JUMPRECPOSITION = 26,
213
- CONSOLE_LOG = 27,
214
- COPY_HP_TO = 28,
215
- SET_HP = 29,
216
- COPY_HPMAX_TO = 30,
217
- SET_HPMAX = 31,
218
- COPY_AT_TO = 32,
219
- SET_AT = 33,
220
- COPY_DF_TO = 34,
221
- SET_DF = 35,
222
- COPY_MONEY_TO = 36,
223
- SET_MONEY = 37,
224
- COPY_STEP_COUNT_TO = 38,
225
- VAR_SET_VAL = 39,
226
- VAR_SET = 40,
227
- VAR_ADD = 41,
228
- VAR_SUB = 42,
229
- VAR_MUL = 43,
230
- VAR_DIV = 44,
231
- VAR_SET_RAND = 45,
232
- SHOW_STR = 46,
233
- GAME_SPEED = 47,
234
- IF = 50,
235
- SET_SPEED = 51,
236
- COPY_TIME_TO = 52,
237
- HIDE_STATUS = 53,
238
- VAR_MAP = 54,
239
- VAR_MOD = 55,
240
- NO_GAMEOVER = 56,
241
- ELSE_IF = 57,
242
- ELSE = 58,
243
- END_IF = 59,
244
- SET = 60,
245
- MAP2 = 61,
246
- SHOW_STR2 = 62,
247
- CONSOLE_LOG2 = 63,
248
- DELAYBGM = 64,
249
- SYSMSG = 65,
250
- GAMEPAD_BUTTON = 100,
251
- OLDMOVE = 101,
252
- LEGACY_IF = 10050
253
- }
254
- export type ConditionalExecuteMacroType = MacroType.IF | MacroType.ELSE_IF | MacroType.ELSE | MacroType.END_IF;
255
- export type PreprocessMacroType = ConditionalExecuteMacroType | MacroType.SHOW_STR | MacroType.SHOW_STR2;
256
- export declare var macrotable: {
257
- "": number;
258
- $imgplayer: number;
259
- $imgyesno: number;
260
- $hpmax: number;
261
- $save: number;
262
- $item: number;
263
- $default: number;
264
- $oldmap: number;
265
- $parts: number;
266
- $move: number;
267
- $map: number;
268
- $dirmap: number;
269
- $imgframe: number;
270
- $imgbom: number;
271
- $delplayer: number;
272
- $face: number;
273
- $effect: number;
274
- $gameover: number;
275
- $imgclick: number;
276
- $status: number;
277
- $effitem: number;
278
- $color: number;
279
- $wait: number;
280
- $sound: number;
281
- $jumpgate: number;
282
- $rec_pos: number;
283
- $jump_rec_pos: number;
284
- $console_log: number;
285
- $copy_hp_to: number;
286
- $set_hp: number;
287
- $copy_hpmax_to: number;
288
- $set_hpmax: number;
289
- $copy_at_to: number;
290
- $set_at: number;
291
- $copy_df_to: number;
292
- $set_df: number;
293
- $copy_money_to: number;
294
- $set_money: number;
295
- $copy_step_count_to: number;
296
- $var_set_val: number;
297
- $var_set: number;
298
- $var_add: number;
299
- $var_sub: number;
300
- $var_mul: number;
301
- $var_div: number;
302
- $var_set_rand: number;
303
- $show_str: number;
304
- $game_speed: number;
305
- $if: number;
306
- $set_speed: number;
307
- $copy_time_to: number;
308
- $hide_status: number;
309
- $var_map: number;
310
- $var_mod: number;
311
- $no_gameover: number;
312
- $else_if: number;
313
- $else: number;
314
- $endif: number;
315
- $set: number;
316
- $map2: number;
317
- $show_str2: number;
318
- $console_log2: number;
319
- $delaybgm: number;
320
- $sysmsg: number;
321
- $gamepad_button: number;
322
- $oldmove: number;
323
- };
324
- export declare enum MacroStatusIndex {
325
- ENERGY = 0,
326
- STRENGTH = 1,
327
- DEFENCE = 2,
328
- GOLD = 3,
329
- MOVES = 4
330
- }
331
- export declare enum MacroImgFrameIndex {
332
- ENERGY = 0,
333
- STRENGTH = 1,
334
- DEFENCE = 2,
335
- GOLD = 3,
336
- WIDE_CELL_ROW = 4,
337
- ITEM_BG = 5,
338
- MAIN_FRAME = 6
339
- }
340
- export declare enum SystemSound {
341
- DECISION = 1,
342
- ATTACK = 3,
343
- BGM_LB = 70,
344
- NO_SOUND = 99
345
- }
346
- export declare const speedList: number[];
347
- export declare const speedNameList: string[];
348
- export declare const StatusKind: readonly ["energy", "strength", "defence", "gold"];
349
- export type StatusKind = typeof StatusKind[number];
350
- export declare class WWAConsts {
351
- static WWA_HOME: string;
352
- static ITEMBOX_SIZE: number;
353
- static MAP_ATR_MAX: number;
354
- static OBJ_ATR_MAX: number;
355
- static OLD_MAP_ATR_MAX: number;
356
- static OLD_OBJ_ATR_MAX: number;
357
- static ATR_TYPE: number;
358
- static ATR_MODE: number;
359
- static ATR_STRING: number;
360
- static ATR_X: number;
361
- static ATR_Y: number;
362
- static ATR_X2: number;
363
- static ATR_Y2: number;
364
- static ATR_ENERGY: number;
365
- static ATR_STRENGTH: number;
366
- static ATR_DEFENCE: number;
367
- static ATR_GOLD: number;
368
- static ATR_ITEM: number;
369
- static ATR_NUMBER: number;
370
- static ATR_JUMP_X: number;
371
- static ATR_MOVE: number;
372
- static ATR_JUMP_Y: number;
373
- static ATR_SOUND: number;
374
- static ATR_APPERANCE_BASE: number;
375
- static REL_ATR_APPERANCE_ID: number;
376
- static REL_ATR_APPERANCE_X: number;
377
- static REL_ATR_APPERANCE_Y: number;
378
- static REL_ATR_APPERANCE_TYPE: number;
379
- static REL_ATR_APPERANCE_UNIT_LENGTH: number;
380
- static ATR_RANDOM_BASE: number;
381
- static RANDOM_ATR_NUM: number;
382
- static RANDOM_ITERATION_MAX: number;
383
- static MAP_STREET: number;
384
- static MAP_WALL: number;
385
- static MAP_LOCALGATE: number;
386
- static MAP_URLGATE: number;
387
- static OBJECT_NORMAL: number;
388
- static OBJECT_MESSAGE: number;
389
- static OBJECT_URLGATE: number;
390
- static OBJECT_STATUS: number;
391
- static OBJECT_ITEM: number;
392
- static OBJECT_DOOR: number;
393
- static OBJECT_MONSTER: number;
394
- static OBJECT_SCORE: number;
395
- static OBJECT_SELL: number;
396
- static OBJECT_BUY: number;
397
- static OBJECT_RANDOM: number;
398
- static OBJECT_SELECT: number;
399
- static OBJECT_LOCALGATE: number;
400
- static SYSTEM_MESSAGE_NUM: number;
401
- static IMGPOS_DEFAULT_YESNO_X: number;
402
- static IMGPOS_DEFAULT_YESNO_Y: number;
403
- static IMGRELPOS_YESNO_YES_X: number;
404
- static IMGRELPOS_YESNO_NO_X: number;
405
- static IMGRELPOS_YESNO_YESP_X: number;
406
- static IMGRELPOS_YESNO_NOP_X: number;
407
- static IMGPOS_DEFAULT_CLICKABLE_ITEM_SIGN_X: number;
408
- static IMGPOS_DEFAULT_CLICKABLE_ITEM_SIGN_Y: number;
409
- static IMGPOS_DEFAULT_FRAME_X: number;
410
- static IMGPOS_DEFAULT_FRAME_Y: number;
411
- static IMGPOS_DEFAULT_BATTLE_EFFECT_X: number;
412
- static IMGPOS_DEFAULT_BATTLE_EFFECT_Y: number;
413
- static DEFAULT_DISABLE_SAVE: boolean;
414
- static DEFAULT_OLDMAP: boolean;
415
- static DEFAULT_OBJECT_NO_COLLAPSE: boolean;
416
- static SPLASH_SCREEN_DISP_MILLS: number;
417
- static DEFAULT_FRAME_INTERVAL: number;
418
- static GAMEOVER_FRAME_INTERVAL: number;
419
- static YESNO_PRESS_DISP_FRAME_NUM: number;
420
- static WAIT_TIME_FRAME_NUM: number;
421
- static CHIP_SIZE: number;
422
- static MAP_WINDOW_WIDTH: number;
423
- static MAP_WINDOW_HEIGHT: number;
424
- static H_PARTS_NUM_IN_WINDOW: number;
425
- static V_PARTS_NUM_IN_WINDOW: number;
426
- static MIN_SPEED_INDEX: number;
427
- static MAX_SPEED_INDEX: number;
428
- static QUICK_BATTLE_SPEED_INDECIES: number[];
429
- static ANIMATION_REP_HALF_FRAME: number;
430
- static PLAYER_LOOKING_AROUND_START_FRAME: number;
431
- static RELATIVE_COORD_BIAS: number;
432
- static RELATIVE_COORD_LOWER: number;
433
- static PLAYER_COORD: number;
434
- static LOCALGATE_PLAYER_WAIT_FRAME: number;
435
- static STATUS_CHANGED_EFFECT_FRAME_NUM: number;
436
- static PASSABLE_OBJECT: number;
437
- static APPERANCE_PARTS_MIN_INDEX: number;
438
- static APPERANCE_PARTS_MAX_INDEX: number;
439
- static APPERANCE_PARTS_MIN_INDEX_NO: number;
440
- static APPERANCE_PARTS_MAX_INDEX_YES: number;
441
- static FADEOUT_SPEED: number;
442
- static STATUS_MINUS_BORDER: number;
443
- static ITEMBOX_IS_FULL: number;
444
- static BATTLE_INTERVAL_FRAME_NUM: number;
445
- static BATTLE_SPEED_CHANGE_TURN_NUM: number;
446
- static RANDOM_MOVE_ITERATION_NUM: number;
447
- static RANDOM_MOVE_ITERATION_NUM_BEFORE_V31: number;
448
- static BATTLE_ESTIMATE_MONSTER_TYPE_MAX: number;
449
- static SOUND_MAX: number;
450
- static ITEM_BORDER_IMG_DATA_URL: string;
451
- static LOAD_STAGE_MAX_EXCEPT_AUDIO: number;
452
- static WWA_STYLE_TAG_ID: string;
453
- static DEFAULT_FRAME_COLOR_R: number;
454
- static DEFAULT_FRAME_COLOR_G: number;
455
- static DEFAULT_FRAME_COLOR_B: number;
456
- static DEFAULT_FRAMEOUT_COLOR_R: number;
457
- static DEFAULT_FRAMEOUT_COLOR_G: number;
458
- static DEFAULT_FRAMEOUT_COLOR_B: number;
459
- static DEFAULT_STRBACK_COLOR_R: number;
460
- static DEFAULT_STRBACK_COLOR_G: number;
461
- static DEFAULT_STRBACK_COLOR_B: number;
462
- static DEFAULT_STATUS_COLOR_R: number;
463
- static DEFAULT_STATUS_COLOR_G: number;
464
- static DEFAULT_STATUS_COLOR_B: number;
465
- static KEYPRESS_MESSAGE_CHANGE_FRAME_NUM: number;
466
- static WWAP_SERVER_OLD: string;
467
- static WWAP_SERVER: string;
468
- static WWAP_SERVER_AUDIO_DIR: string;
469
- static WWAP_SERVER_TITLE_IMG: string;
470
- static WWAP_SERVER_LOADER_NO_WORKER: string;
471
- static SCREEN_WIDTH: number;
472
- static SCREEN_HEIGHT: number;
473
- static LOADING_FONT: string;
474
- static MSG_STR_WIDTH: number;
475
- static ITEM_EFFECT_SPEED_PIXEL_PER_FRAME: number;
476
- static ITEMBOX_TOP_Y: number;
477
- static USER_VAR_NUM: number;
478
- static USER_VAR_NUM_MAX_VALUE: number;
479
- static USET_VAR_NUM_MIN_VALUE: number;
480
- static CONTROLL_WAIT_FRAME: number;
481
- static INLINE_USER_VAR_VIEWER_DISPLAY_NUM: number;
482
- static readonly FIGHT_DRAW_TURN: number;
483
- }
484
- export declare class WWASaveConsts {
485
- static QUICK_SAVE_MAX: number;
486
- static QUICK_SAVE_THUMNAIL_WIDTH: number;
487
- static QUICK_SAVE_THUMNAIL_HEIGHT: number;
488
- static SAVE_INTERVAL_MOVE: number;
489
- static INDEXEDDB_DB_NAME: string;
490
- static INDEXEDDB_TABLE_NAME: string;
491
- static DATE_LAST_SAVE_TEXT_COLOR: string;
492
- }
493
- export declare class WWAButtonTexts {
494
- static EMPTY_LOAD: string;
495
- static EMPTY_SAVE: string;
496
- static PASSWORD: string;
497
- static QUICK_SAVE: string;
498
- static QUICK_LOAD: string;
499
- static BATTLE_REPORT: string;
500
- static GAME_END: string;
501
- static GOTO_WWA: string;
502
- static RESTART_GAME: string;
503
- }
504
- export declare class LoaderResponse {
505
- error: LoaderError;
506
- progress: LoaderProgress;
507
- wwaData: WWAData;
508
- }
509
- export declare class LoaderError implements Error {
510
- name: string;
511
- message: string;
512
- }
513
- export declare class LoaderProgress {
514
- current: number;
515
- total: number;
516
- stage: LoadStage;
517
- }
518
- export declare enum LoadStage {
519
- INIT = 0,
520
- MAP_LOAD = 1,
521
- OBJ_LOAD = 2,
522
- MAP_ATTR = 3,
523
- OBJ_ATTR = 4,
524
- RAND_PARTS = 5,
525
- MESSAGE = 6,
526
- GAME_INIT = 7,
527
- AUDIO = 8,
528
- FINISH = 9
529
- }
530
- export declare var loadMessages: string[];
531
- export declare var loadMessagesClassic: string[];
532
- export declare enum LoadingMessagePosition {
533
- LINE = 30,
534
- TITLE_X = 100,
535
- TITLE_Y = 70,
536
- LOADING_X = 50,
537
- LOADING_Y = 140,
538
- ERROR_X = 10,
539
- ERROR_Y = 180,
540
- FOOTER_X = 160,
541
- FOOTER_Y = 360,
542
- WORLD_Y = 330,
543
- COPYRIGHT_Y = 390
544
- }
545
- export declare enum LoadingMessageSize {
546
- TITLE = 32,
547
- LOADING = 22,
548
- FOOTER = 18,
549
- ERRROR = 16
550
- }
551
- export declare enum ChangeStyleType {
552
- COLOR_FRAME = 0,
553
- COLOR_FRAMEOUT = 1,
554
- COLOR_STR = 2,
555
- COLOR_STATUS_STR = 4
556
- }
557
- export declare enum SelectorType {
558
- MESSAGE_WINDOW = 0,
559
- SIDEBAR = 1
560
- }
561
- export declare enum IDTable {
562
- BITSHIFT = 16,
563
- BITMASK = 65535
564
- }
565
- export type StatusSolutionKind = "all" | "bare" | "equipment";
566
- export type UserVarNameListRequestErrorKind = JsonResponseErrorKind | "notObject" | "noFileSpecified";
567
- export interface ScoreOption {
568
- rates: ScoreRates;
569
- }
570
- export interface ScoreRates {
571
- energy: number;
572
- strength: number;
573
- defence: number;
574
- gold: number;
575
- }
576
- export interface TriggerParts {
577
- id: number;
578
- type: PartsType;
579
- position: Coord;
580
- }
581
- export type UserVariableKind = "named" | "numbered";
582
- export interface BattleTurnResult {
583
- damage: number;
584
- aborted?: boolean;
585
- hasError?: boolean;
586
- }
587
- export interface BattleEstimateParameters {
588
- playerStatus: Status;
589
- enemyStatus: Status;
590
- }
591
- export type BattleDamageDirection = "playerToEnemy" | "enemyToPlayer";
@@ -1,4 +0,0 @@
1
- export declare function encodeSaveData(saveData: string, worldPassNumber: number): string;
2
- export declare function decodeSaveDataV0(password: string, worldPassNumber: number, checkOriginalMapString: string): string;
3
- export declare function decodeSaveDataV1(password: string, worldPassNumber: number): string;
4
- export declare function generateMD5(text: string): string;
@@ -1,14 +0,0 @@
1
- import { WWA } from "./wwa_main";
2
- import { type BattleTurnResult, Status } from "./wwa_data";
3
- import { Monster } from "./wwa_monster";
4
- export declare class BattleEstimateWindow {
5
- private _wwa;
6
- private _imgFileName;
7
- private _parent;
8
- private _element;
9
- private _edes;
10
- constructor(_wwa: WWA, _imgFileName: string, _parent: HTMLElement);
11
- update(playerStatus: Status, monsters: Monster[], calcPlayerTurnResult: (playerStatus: Status, monster: Monster) => BattleTurnResult, calcEnemyTurnResult: (monster: Monster, playerStatus: Status) => BattleTurnResult, usingDefaultDamageFunction: boolean): void;
12
- show(): void;
13
- hide(): void;
14
- }
@@ -1,5 +0,0 @@
1
- import type { Descriminant, TokenValues, Comparable } from "./typedef";
2
- export declare function evaluateDescriminant(d: Descriminant, tokenValues: TokenValues, fallbackValue?: number): boolean;
3
- export declare function evaluateValue(comparable: Comparable, tokenValues: TokenValues, fallbackValue?: number): number;
4
- export declare function calc(operator: string, leftValue: number, rightValue: number): number;
5
- export declare function compare(operator: string, leftValue: number, rightValue: number): boolean;
@@ -1,11 +0,0 @@
1
- import type { TokenValues, Descriminant } from "./typedef";
2
- import { type ValueAssignOperation } from "./value-assign-operation";
3
- export * from "./typedef";
4
- export * from "./parsers";
5
- export * from "./eval";
6
- export * from "./regexp";
7
- export declare function parseAndEvaluateValue(value: string, tokenValues: TokenValues, fallbackValue?: number): number;
8
- export declare function evaluateSetMacroExpression(expression: string, tokenValues: TokenValues): ValueAssignOperation;
9
- export declare function evaluateMacroArgExpression(expression: string, tokenValues: TokenValues, fallbackValue?: number): number;
10
- export declare function isValidMacroArgExpression(expression: string): boolean;
11
- export declare function parseDescriminant(expression: string): Descriminant | undefined;
@@ -1,3 +0,0 @@
1
- import type { Comparable, CValue } from "./typedef";
2
- export declare function isCValue(c: Comparable): c is CValue;
3
- export declare function parseType(str: string): Comparable | null;
@@ -1,11 +0,0 @@
1
- export declare const regNumber: RegExp;
2
- export declare const regUserVar: RegExp;
3
- export declare const regMapByCoord: RegExp;
4
- export declare const regObjectByCoord: RegExp;
5
- export declare const regItemByBoxId: RegExp;
6
- export declare const regRand: RegExp;
7
- export declare const regItemCount: RegExp;
8
- export declare const regAdvance: RegExp;
9
- export declare const regNormal: RegExp;
10
- export declare const regMacroArg: RegExp;
11
- export declare const regIf: RegExp;
@@ -1,57 +0,0 @@
1
- import type { EquipmentStatus, Status, Coord, PartsType, Direction } from "../wwa_data";
2
- export type SetMacroType = 'VARIABLE' | 'MAP' | 'OBJECT' | 'ITEM' | 'NUMBER' | 'HP' | 'HPMAX' | 'AT' | 'AT_TOTAL' | 'AT_ITEMS' | 'DF' | 'DF_TOTAL' | 'DF_ITEMS' | 'GD' | 'TIME' | 'STEP' | 'X' | 'Y' | 'PX' | 'PY' | 'PDIR' | 'ID' | 'TYPE' | 'ITEM_COUNT_ALL' | 'RAND' | 'ITEM_COUNT';
3
- export type CNumberKind = "NUMBER";
4
- export type CVariableKind = "VARIABLE";
5
- export type CPartsKind = "MAP" | "OBJECT";
6
- export type CItemKind = "ITEM";
7
- export type CEnvKind = "HP" | "HPMAX" | "AT" | "AT_TOTAL" | "AT_ITEMS" | "DF" | "DF_TOTAL" | "DF_ITEMS" | "GD" | "STEP" | "TIME" | "X" | "Y" | "PX" | "PY" | "PDIR" | "ID" | "TYPE" | "ITEM_COUNT_ALL";
8
- export type CFunctionKind = "RAND" | "ITEM_COUNT";
9
- export interface CNumber {
10
- type: CNumberKind;
11
- rawValue: number;
12
- }
13
- export interface CVariable {
14
- type: CVariableKind;
15
- index: number;
16
- }
17
- export interface CParts {
18
- type: CPartsKind;
19
- x: number;
20
- y: number;
21
- }
22
- export interface CItem {
23
- type: CItemKind;
24
- boxIndex1To12: number;
25
- }
26
- export interface CEnv {
27
- type: CEnvKind;
28
- }
29
- export interface CFunction {
30
- type: CFunctionKind;
31
- argument: CValue;
32
- }
33
- export type CValue = CNumber | CVariable | CParts | CItem | CEnv;
34
- export type Comparable = CValue | CFunction;
35
- export type ComparisionOperatorKind = "<" | ">" | "<=" | ">=" | "==" | "!=";
36
- export type Descriminant = boolean | {
37
- left: Comparable;
38
- right: Comparable;
39
- operator: ComparisionOperatorKind;
40
- };
41
- export interface TokenValues {
42
- totalStatus: Status;
43
- bareStatus: EquipmentStatus;
44
- itemStatus: EquipmentStatus;
45
- energyMax: number;
46
- moveCount: number;
47
- playTime: number;
48
- userVars: (number | string | boolean)[];
49
- partsPosition?: Coord;
50
- playerCoord: Coord;
51
- partsId?: number;
52
- partsType?: PartsType;
53
- map: number[][];
54
- mapObject: number[][];
55
- itemBox: number[];
56
- playerDirection: Direction;
57
- }