@wwawing/engine 3.13.0-unstable.based-on.3.12.11.p.12 → 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.
- package/LICENSE +2 -2
- package/debug/index.pug +2 -2
- package/debug/make-debug-pages.ts +4 -3
- package/debug/maps-config.ts +1 -0
- package/lib/wwa.js +246 -21
- package/package.json +35 -35
- package/lib/__tests__/wwa_util-test.d.ts +0 -1
- package/lib/json_api_client/index.d.ts +0 -12
- package/lib/load_script_file/index.d.ts +0 -6
- package/lib/wwa_camera.d.ts +0 -20
- package/lib/wwa_cgmanager.d.ts +0 -51
- package/lib/wwa_data.d.ts +0 -591
- package/lib/wwa_encryption.d.ts +0 -4
- package/lib/wwa_estimate_battle.d.ts +0 -14
- package/lib/wwa_expression/__tests__/value-assign-operation.d.ts +0 -1
- package/lib/wwa_expression/eval.d.ts +0 -5
- package/lib/wwa_expression/index.d.ts +0 -11
- package/lib/wwa_expression/parsers.d.ts +0 -3
- package/lib/wwa_expression/regexp.d.ts +0 -11
- package/lib/wwa_expression/typedef.d.ts +0 -57
- package/lib/wwa_expression/value-assign-operation.d.ts +0 -22
- package/lib/wwa_expression2/acorn.d.ts +0 -111
- package/lib/wwa_expression2/converter.d.ts +0 -4
- package/lib/wwa_expression2/eval.d.ts +0 -59
- package/lib/wwa_expression2/index.d.ts +0 -4
- package/lib/wwa_expression2/wwa.d.ts +0 -144
- package/lib/wwa_inject_html.d.ts +0 -2
- package/lib/wwa_input.d.ts +0 -140
- package/lib/wwa_item_menu.d.ts +0 -20
- package/lib/wwa_main.d.ts +0 -384
- package/lib/wwa_message.d.ts +0 -241
- package/lib/wwa_monster.d.ts +0 -21
- package/lib/wwa_motion.d.ts +0 -29
- package/lib/wwa_parts_player.d.ts +0 -173
- package/lib/wwa_password_window.d.ts +0 -28
- package/lib/wwa_play_time.d.ts +0 -8
- package/lib/wwa_save/WWACompress.d.ts +0 -36
- package/lib/wwa_save/WWASave.d.ts +0 -27
- package/lib/wwa_save/WWASaveData.d.ts +0 -20
- package/lib/wwa_save/WWASaveDataDB.d.ts +0 -5
- package/lib/wwa_save/WWASaveDataDBList.d.ts +0 -31
- package/lib/wwa_save/WWASaveDataList.d.ts +0 -6
- package/lib/wwa_save/WWASaveDataLog.d.ts +0 -3
- package/lib/wwa_save/WWASaveDataLogList.d.ts +0 -14
- package/lib/wwa_save/common/definitions.d.ts +0 -11
- package/lib/wwa_save/common/index.d.ts +0 -2
- package/lib/wwa_save/common/mapDataRevisionKey.d.ts +0 -1
- package/lib/wwa_save/index.d.ts +0 -6
- package/lib/wwa_save/migrators/index.d.ts +0 -2
- package/lib/wwa_save/migrators/migrate-gameover-policy.d.ts +0 -2
- package/lib/wwa_sound.d.ts +0 -26
- package/lib/wwa_util.d.ts +0 -14
- package/lib/wwa_vardump/api.d.ts +0 -8
- package/lib/wwa_vardump/index.d.ts +0 -9
- package/lib/wwa_vardump/named-user-variable/api.d.ts +0 -1
- package/lib/wwa_vardump/named-user-variable/index.d.ts +0 -1
- package/lib/wwa_vardump/numbered-user-variable/api.d.ts +0 -3
- package/lib/wwa_vardump/numbered-user-variable/index.d.ts +0 -1
- package/lib/wwa_vardump/user-variable/user-variable-card/index.d.ts +0 -10
- package/lib/wwa_vardump/user-variable/user-variable-label/index.d.ts +0 -3
- package/lib/wwa_vardump/user-variable/user-variable-list/index.d.ts +0 -14
- package/lib/wwa_vardump/user-variable/user-variable-list-section/header/index.d.ts +0 -13
- package/lib/wwa_vardump/user-variable/user-variable-list-section/header/information/index.d.ts +0 -3
- package/lib/wwa_vardump/user-variable/user-variable-list-section/index.d.ts +0 -8
package/lib/wwa_main.d.ts
DELETED
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
import { SystemMessage } from "@wwawing/common-interface";
|
|
2
|
-
import { Coord, Position, LoaderProgress, LoadStage, YesNoState, Status, Face, Direction, SidebarButton, SpeedChange, PartsType, AppearanceTriggerType, EquipmentStatus, ChangeStyleType, MacroStatusIndex, UserDevice, MacroImgFrameIndex, StatusKind, StatusSolutionKind, ScoreOptions, TriggerParts, type BattleTurnResult, BattleEstimateParameters, BattleDamageDirection } from "./wwa_data";
|
|
3
|
-
import { MessageWindow, Page } from "./wwa_message";
|
|
4
|
-
import { ItemMenu } from "./wwa_item_menu";
|
|
5
|
-
import { WWACompress } from "./wwa_save";
|
|
6
|
-
import { IEventEmitter } from "@wwawing/event-emitter";
|
|
7
|
-
import * as ExpressionParser from "./wwa_expression";
|
|
8
|
-
import { WWANode } from "./wwa_expression2/wwa";
|
|
9
|
-
export declare function getProgress(current: number, total: number, stage: LoadStage): LoaderProgress;
|
|
10
|
-
interface PartsAppearance {
|
|
11
|
-
pos: Coord;
|
|
12
|
-
triggerType: AppearanceTriggerType;
|
|
13
|
-
triggerPartsId: number;
|
|
14
|
-
}
|
|
15
|
-
export declare class WWA {
|
|
16
|
-
private _cvs;
|
|
17
|
-
private _cvsSub;
|
|
18
|
-
private _cvsCover;
|
|
19
|
-
private _cgManager;
|
|
20
|
-
private _wwaData;
|
|
21
|
-
private _mainCallCounter;
|
|
22
|
-
private _animationCounter;
|
|
23
|
-
private _player;
|
|
24
|
-
private _monster;
|
|
25
|
-
private _keyStore;
|
|
26
|
-
private _mouseStore;
|
|
27
|
-
private _virtualPadStore;
|
|
28
|
-
private _virtualPadButtonElements;
|
|
29
|
-
private _gamePadStore;
|
|
30
|
-
private _camera;
|
|
31
|
-
_itemMenu: ItemMenu;
|
|
32
|
-
private _objectMovingDataManager;
|
|
33
|
-
_messageWindow: MessageWindow;
|
|
34
|
-
private _monsterWindow;
|
|
35
|
-
private _scoreWindow;
|
|
36
|
-
private _pages;
|
|
37
|
-
private _yesNoJudge;
|
|
38
|
-
private _yesNoJudgeInNextFrame;
|
|
39
|
-
private _yesNoChoicePartsCoord;
|
|
40
|
-
private _yesNoChoicePartsID;
|
|
41
|
-
private _yesNoChoiceCallInfo;
|
|
42
|
-
private _yesNoDispCounter;
|
|
43
|
-
private _yesNoUseItemPos;
|
|
44
|
-
private _yesNoURL;
|
|
45
|
-
private _waitFrame;
|
|
46
|
-
private _usePassword;
|
|
47
|
-
private _bottomButtonType;
|
|
48
|
-
private _mouseControllerElement;
|
|
49
|
-
private _statusPressCounter;
|
|
50
|
-
private _battleEstimateWindow;
|
|
51
|
-
private _passwordWindow;
|
|
52
|
-
private _wwaSave;
|
|
53
|
-
private _stopUpdateByLoadFlag;
|
|
54
|
-
private _isURLGateEnable;
|
|
55
|
-
private _loadType;
|
|
56
|
-
private _restartData;
|
|
57
|
-
checkOriginalMapString: string;
|
|
58
|
-
private _prevFrameEventExected;
|
|
59
|
-
private _reservedMoveMacroTurn;
|
|
60
|
-
private _isLastPage;
|
|
61
|
-
private _reservedPartsAppearances;
|
|
62
|
-
private _reservedJumpDestination;
|
|
63
|
-
private _frameCoord;
|
|
64
|
-
private _battleEffectCoord;
|
|
65
|
-
private sounds;
|
|
66
|
-
private _temporaryInputDisable;
|
|
67
|
-
private _isLoadedSound;
|
|
68
|
-
private _isSkippedSoundMessage;
|
|
69
|
-
private _soundLoadSkipFlag;
|
|
70
|
-
private _passwordLoadExecInNextFrame;
|
|
71
|
-
private _passwordSaveExtractData;
|
|
72
|
-
private _faces;
|
|
73
|
-
private _shouldSetNextPage;
|
|
74
|
-
private _clearFacesInNextFrame;
|
|
75
|
-
private _paintSkipByDoorOpen;
|
|
76
|
-
private _isClassicModeEnable;
|
|
77
|
-
private _useConsole;
|
|
78
|
-
private _audioDirectory;
|
|
79
|
-
private _hasTitleImg;
|
|
80
|
-
private _useSuspend;
|
|
81
|
-
private _useLookingAround;
|
|
82
|
-
private _isDisallowLoadOldSave;
|
|
83
|
-
private _userVar;
|
|
84
|
-
private _inlineUserVarViewer;
|
|
85
|
-
private _userVarNameList;
|
|
86
|
-
private _userVarNameListRequestError;
|
|
87
|
-
private _canDisplayUserVars;
|
|
88
|
-
private _isActive;
|
|
89
|
-
private _mapIDTable;
|
|
90
|
-
private _mapObjectIDTable;
|
|
91
|
-
wwaCustomEventEmitter: IEventEmitter;
|
|
92
|
-
private _lastScoreOptions?;
|
|
93
|
-
private _playerAndObjectsStopWaitingGameSpeedChangeRequest?;
|
|
94
|
-
private _windowCloseWaitingMessageDisplayRequests;
|
|
95
|
-
private _playerAndObjectsStopWaitingMessageDisplayRequests;
|
|
96
|
-
private _windowCloseWaitingJumpGateRequest?;
|
|
97
|
-
private _debugConsoleElement;
|
|
98
|
-
debug: boolean;
|
|
99
|
-
private hoge;
|
|
100
|
-
private _loadHandler;
|
|
101
|
-
audioContext: AudioContext;
|
|
102
|
-
audioGain: GainNode;
|
|
103
|
-
private audioExtension;
|
|
104
|
-
userDevice: UserDevice;
|
|
105
|
-
private soundLoadedCheckTimer;
|
|
106
|
-
private _playTimeCalculator;
|
|
107
|
-
private _dumpElement;
|
|
108
|
-
private evalCalcWwaNodeGenerator;
|
|
109
|
-
private userDefinedFunctions;
|
|
110
|
-
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);
|
|
111
|
-
setEvalCalcWwaNodeEarnedItem(itemObjectId: number, itemPos: number): void;
|
|
112
|
-
clearEvalCalcWwaNodeEarnedItem(): void;
|
|
113
|
-
callGetItemUserDefineFunction(): void;
|
|
114
|
-
callGetItemFullUserDefineFunction(): void;
|
|
115
|
-
callUseItemUserDefineFunction(): void;
|
|
116
|
-
callJumpGateUserDefineFunction(): void;
|
|
117
|
-
callUserDefinedBattleDamageFunction(damageDirection: BattleDamageDirection, estimatingParams?: BattleEstimateParameters): BattleTurnResult | undefined;
|
|
118
|
-
private getUserDefinedDamageFunctionNode;
|
|
119
|
-
callMoveUserDefineFunction(): void;
|
|
120
|
-
getUserScript(functionName: string): WWANode | null;
|
|
121
|
-
private setUsertScript;
|
|
122
|
-
private convertWwaNodes;
|
|
123
|
-
private setUserVarStatus;
|
|
124
|
-
private convertUserVariableNameListToArray;
|
|
125
|
-
private _setProgressBar;
|
|
126
|
-
private _setLoadingMessage;
|
|
127
|
-
private _setErrorMessage;
|
|
128
|
-
createSoundInstance(soundId: number): void;
|
|
129
|
-
loadSound(): void;
|
|
130
|
-
checkAllSoundLoaded(): void;
|
|
131
|
-
private _setSoundLoadedCheckTimer;
|
|
132
|
-
private _clearSoundLoadedCheckTimer;
|
|
133
|
-
playSound(id: number, bgmDelayDurationMs?: number): void;
|
|
134
|
-
openGameWindow(): void;
|
|
135
|
-
mainCaller: () => void;
|
|
136
|
-
soundCheckCaller: () => void;
|
|
137
|
-
onselectitem(itemPos: number): boolean;
|
|
138
|
-
onselectbutton(button: SidebarButton, forcePassword?: boolean, forceGoToWWA?: boolean): void;
|
|
139
|
-
onpasswordloadcalled(): void;
|
|
140
|
-
onpasswordsavecalled(): void;
|
|
141
|
-
onpasssuspendsavecalled(): void;
|
|
142
|
-
onitemmenucalled(): void;
|
|
143
|
-
onchangespeed(type: SpeedChange): void;
|
|
144
|
-
isBattleSpeedIndexForQuickBattle(battleSpeedIndex: number): boolean;
|
|
145
|
-
private _checkTurnKeyPressed;
|
|
146
|
-
private _executeNode;
|
|
147
|
-
private _executeNodes;
|
|
148
|
-
private _main;
|
|
149
|
-
vibration(isStrong: boolean): void;
|
|
150
|
-
private _drawAll;
|
|
151
|
-
private _drawMap;
|
|
152
|
-
private _drawPlayer;
|
|
153
|
-
private _drawObjects;
|
|
154
|
-
private _drawEffect;
|
|
155
|
-
private _drawFaces;
|
|
156
|
-
private _drawFrame;
|
|
157
|
-
private _checkNoDrawObject;
|
|
158
|
-
getMapWidth(): number;
|
|
159
|
-
getMapIdByPosition(pos: Position): number;
|
|
160
|
-
getObjectIdByPosition(pos: Position): number;
|
|
161
|
-
getMapTypeByPosition(pos: Position): number;
|
|
162
|
-
getObjectTypeByPosition(pos: Position): number;
|
|
163
|
-
getMapAttributeByPosition(pos: Position, attr: number): number;
|
|
164
|
-
isCurrentPosMapPartsIncludingMessage(pos: Position): boolean;
|
|
165
|
-
getObjectAttributeByPosition(pos: Position, attr: number): number;
|
|
166
|
-
getMapAttributeById(id: number, attr: number): number;
|
|
167
|
-
getObjectAttributeById(id: number, attr: number): number;
|
|
168
|
-
getObjectCropXById(id: number): number;
|
|
169
|
-
getObjectCropYById(id: number): number;
|
|
170
|
-
getMessageById(messageID: number): string;
|
|
171
|
-
getSystemMessageById(messageID: number): string;
|
|
172
|
-
checkMap(pos?: Coord): boolean;
|
|
173
|
-
checkObject(pos?: Coord): void;
|
|
174
|
-
private _execMapStreetEvent;
|
|
175
|
-
private _shouldTreatWillMessageDisplay;
|
|
176
|
-
private _execMapWallEvent;
|
|
177
|
-
private _execMapLocalGateEvent;
|
|
178
|
-
private _execMapUrlGateEvent;
|
|
179
|
-
private _execObjectNormalEvent;
|
|
180
|
-
private _execObjectMessageEvent;
|
|
181
|
-
private _execObjectStatusEvent;
|
|
182
|
-
private _execObjectMonsterEvent;
|
|
183
|
-
private _execObjectBuyEvent;
|
|
184
|
-
private _execObjectSellEvent;
|
|
185
|
-
private _execObjectItemEvent;
|
|
186
|
-
private _execObjectDoorEvent;
|
|
187
|
-
private _execObjectYesNoChoiceEvent;
|
|
188
|
-
private _execObjectLocalGateEvent;
|
|
189
|
-
private _execObjectUrlGateEvent;
|
|
190
|
-
private _execObjectScoreEvent;
|
|
191
|
-
updateScore(scoreOption?: ScoreOptions): void;
|
|
192
|
-
private _execChoiceWindowObjectSellEvent;
|
|
193
|
-
private _execChoiceWindowRunningEvent;
|
|
194
|
-
private _dispatchWindowClosedTimeRequests;
|
|
195
|
-
private _dispatchPlayerAndObjectsStopTimeRequests;
|
|
196
|
-
private _clearAllRequests;
|
|
197
|
-
reserveMessageDisplayWhenShouldOpen(message: string): void;
|
|
198
|
-
generatePageAndReserveExecution(message: string, showChoice: boolean, isSystemMessage: boolean, partsID?: number, partsType?: PartsType, partsPosition?: Coord, scoreOption?: ScoreOptions | undefined): void;
|
|
199
|
-
generatePagesByRawMessage(message: string, partsId: number, partsType: PartsType, partsPosition: Coord, isSystemMessage: boolean, showChoice: boolean, scoreOption: ScoreOptions): Page[];
|
|
200
|
-
private parseMessageLines;
|
|
201
|
-
private createNewNode;
|
|
202
|
-
private processConditionalExecuteMacroLine;
|
|
203
|
-
private connectOrMergeToPreviousNode;
|
|
204
|
-
private connectToFinalNode;
|
|
205
|
-
appearParts({ pos, triggerType, triggerPartsId }: PartsAppearance): void;
|
|
206
|
-
reserveAppearPartsInNextFrame(pos: Coord, triggerType: AppearanceTriggerType, triggerPartsId?: number): void;
|
|
207
|
-
reserveJumpInNextFrame(position: Position): void;
|
|
208
|
-
appearPartsByDirection(distance: number, targetPartsID: number, targetPartsType: PartsType): void;
|
|
209
|
-
appearPartsEval(triggerPartsPos: Coord, xstr: string, ystr: string, targetPartsID: number, targetPartsType: PartsType): void;
|
|
210
|
-
getPartsID(triggerPartsPos: Coord, targetPartsType: PartsType): number;
|
|
211
|
-
private _replaceRandomObject;
|
|
212
|
-
private _replaceRandomObjectsInScreen;
|
|
213
|
-
private _replaceAllRandomObjects;
|
|
214
|
-
gameover(): void;
|
|
215
|
-
setYesNoInput(yesNo: YesNoState): void;
|
|
216
|
-
getYesNoState(): YesNoState;
|
|
217
|
-
setStatusChangedEffect(additionalStatus: EquipmentStatus): void;
|
|
218
|
-
setPartsOnPosition(partsType: PartsType, id: number, pos: Coord): void;
|
|
219
|
-
private _countSamePartsLength;
|
|
220
|
-
private _compressMap;
|
|
221
|
-
private _decompressMap;
|
|
222
|
-
private _generateMapDataHash;
|
|
223
|
-
private _generateSaveDataHash;
|
|
224
|
-
private _saveDataList;
|
|
225
|
-
compressSystem(): WWACompress;
|
|
226
|
-
private _quickSave;
|
|
227
|
-
wwaCustomEvent(eventName: string, data?: object): void;
|
|
228
|
-
private _decodePassword;
|
|
229
|
-
private _quickLoad;
|
|
230
|
-
private _applyQuickLoad;
|
|
231
|
-
private _mapIDTableCreate;
|
|
232
|
-
restartGame(): void;
|
|
233
|
-
private _fadeout;
|
|
234
|
-
moveObjects(playerIsMoving: boolean): void;
|
|
235
|
-
private _getCandidateCoord;
|
|
236
|
-
private _getSecondCandidateMoveMode;
|
|
237
|
-
private _getThirdCandidate;
|
|
238
|
-
private _getRandomMoveCoord;
|
|
239
|
-
isPrevFrameEventExecuted(): boolean;
|
|
240
|
-
private _objectCanMoveTo;
|
|
241
|
-
private _setObjectsInNextFrame;
|
|
242
|
-
launchBattleEstimateWindow(): boolean;
|
|
243
|
-
isUsingDefaultDamageCalcFunction(): boolean;
|
|
244
|
-
private _createMonster;
|
|
245
|
-
hideBattleEstimateWindow(): void;
|
|
246
|
-
hidePasswordWindow(isCancel?: boolean): void;
|
|
247
|
-
private _displayUserVars;
|
|
248
|
-
private _displayHelp;
|
|
249
|
-
_setNextPage(): void;
|
|
250
|
-
private _hideMessageWindow;
|
|
251
|
-
getPlayerPositon(): Position;
|
|
252
|
-
loadMapPartsObjectID(id: number): number;
|
|
253
|
-
loadMapPartsID(id: number): number;
|
|
254
|
-
replaceParts(srcID: number, destID: number, partsType?: PartsType, onlyThisSight?: boolean): void;
|
|
255
|
-
getYesNoImgCoord(): Coord;
|
|
256
|
-
setYesNoImgCoord(coord: Coord): Coord;
|
|
257
|
-
getPlayerImgCoord(): Coord;
|
|
258
|
-
setPlayerImgCoord(coord: Coord): Coord;
|
|
259
|
-
setPlayerEnergyMax(eng: number): number;
|
|
260
|
-
getMapPartsNum(): number;
|
|
261
|
-
getObjectPartsNum(): number;
|
|
262
|
-
setMoveMacroWaitingToPlayer(moveNum: number): void;
|
|
263
|
-
disableSave(flag: boolean): boolean;
|
|
264
|
-
isOldMap(): boolean;
|
|
265
|
-
setOldMap(flag: boolean): boolean;
|
|
266
|
-
setObjectNotCollapseOnPartsOnPlayer(flag: boolean): boolean;
|
|
267
|
-
setGameOverPosition(pos: Coord): Coord;
|
|
268
|
-
getGemeOverPosition(): Coord;
|
|
269
|
-
private toValidStatusValue;
|
|
270
|
-
setPlayerStatus(type: MacroStatusIndex, value: number, isCalledByMacro: boolean): {
|
|
271
|
-
isGameOver?: true;
|
|
272
|
-
};
|
|
273
|
-
setDelPlayer(flag: boolean): boolean;
|
|
274
|
-
setPlayerGetItem(pos: number, id: number): void;
|
|
275
|
-
setStatusIconCoord(type: MacroImgFrameIndex, coord: Coord): Coord;
|
|
276
|
-
setWideCellCoord(coord: Coord): Coord;
|
|
277
|
-
setFrameCoord(coord: Coord): Coord;
|
|
278
|
-
setBattleEffectCoord(coord: Coord): Coord;
|
|
279
|
-
canInput(): boolean;
|
|
280
|
-
setEffect(waits: number, coords: Coord[]): void;
|
|
281
|
-
stopEffect(): void;
|
|
282
|
-
updateEffect(): void;
|
|
283
|
-
setImgClick(pos: Coord): void;
|
|
284
|
-
addFace(face: Face): void;
|
|
285
|
-
clearFaces(): void;
|
|
286
|
-
updateItemEffectEnabled(isEnabled: boolean): void;
|
|
287
|
-
setOldMove(flag: boolean): void;
|
|
288
|
-
setGameOverPolicy(gameOverPolicy: number): void;
|
|
289
|
-
setBgmDelay(delayMs: number): void;
|
|
290
|
-
private _stylePos;
|
|
291
|
-
private _styleElm;
|
|
292
|
-
private _sheet;
|
|
293
|
-
initCSSRule(): void;
|
|
294
|
-
updateCSSRule(): void;
|
|
295
|
-
changeStyleRule(type: ChangeStyleType, r: number, g: number, b: number): void;
|
|
296
|
-
showMonsterWindow(): void;
|
|
297
|
-
isClassicMode(): boolean;
|
|
298
|
-
isConsoleOutputMode(): boolean;
|
|
299
|
-
forcedJumpGate(jx: number, jy: number): void;
|
|
300
|
-
setUserVar(index: number | string, assignee: number | string | boolean, operator?: string): void;
|
|
301
|
-
private toAssignableValue;
|
|
302
|
-
private isValidUserVarIndex;
|
|
303
|
-
private isNotNumberTypeOrNaN;
|
|
304
|
-
getUserVar(no: number): number | string | boolean;
|
|
305
|
-
getUserNameVar(id: number | string): number | string | boolean;
|
|
306
|
-
getAllUserNameVar(): [string, string | number | boolean][];
|
|
307
|
-
recUserPosition(x: number, y: number): void;
|
|
308
|
-
jumpRecUserPosition(x: number, y: number): void;
|
|
309
|
-
jumpSpecifiedXPos(x: number): void;
|
|
310
|
-
jumpSpecifiedYPos(y: number): void;
|
|
311
|
-
outputUserVar(num: number): void;
|
|
312
|
-
setUserVarHP(num: number): void;
|
|
313
|
-
setUserVarHPMAX(num: number): void;
|
|
314
|
-
setUserVarAT(num: number, kind: StatusSolutionKind): void;
|
|
315
|
-
setUserVarDF(num: number, kind: StatusSolutionKind): void;
|
|
316
|
-
setUserVarMONEY(num: number): void;
|
|
317
|
-
setHPUserVar(index: number, isCalledByMacro: boolean): {
|
|
318
|
-
isGameOver?: true;
|
|
319
|
-
};
|
|
320
|
-
setHPMAXUserVar(index: number): void;
|
|
321
|
-
setATUserVar(index: number): void;
|
|
322
|
-
setDFUserVar(index: number): void;
|
|
323
|
-
setMONEYUserVar(index: number): void;
|
|
324
|
-
setUserVarStep(num: number): void;
|
|
325
|
-
setUserVarVal(x: number, num: number): void;
|
|
326
|
-
setUserValOtherUserVal(x: number, y: number): void;
|
|
327
|
-
setUserValAdd(x: number, y: number): void;
|
|
328
|
-
setUserValSub(x: number, y: number): void;
|
|
329
|
-
setUserValMul(x: number, y: number): void;
|
|
330
|
-
setUserValDiv(x: number, y: number): void;
|
|
331
|
-
setUserValMod(x: number, y: number): void;
|
|
332
|
-
setUserValRandNum(x: number, num: number, bias: number): void;
|
|
333
|
-
private _generateShowStrString;
|
|
334
|
-
speedChangeJudge(speedChangeFlag: boolean): void;
|
|
335
|
-
execSetMacro(macroStr: string, option: {
|
|
336
|
-
triggerParts: TriggerParts;
|
|
337
|
-
}): {
|
|
338
|
-
isGameOver?: true;
|
|
339
|
-
};
|
|
340
|
-
generateTokenValues(triggerParts: TriggerParts): ExpressionParser.TokenValues;
|
|
341
|
-
userVarUserIf(_triggerPartsPosition: Coord, args: string[]): void;
|
|
342
|
-
private compareUserVar;
|
|
343
|
-
setPlayerSpeedIndex(speedIndex: number): void;
|
|
344
|
-
setUserVarPlayTime(num: number): void;
|
|
345
|
-
hideStatus(no: number, isHide: boolean): void;
|
|
346
|
-
varMap(triggerPartsPos: Coord, xstr: string, ystr: string, partsID: number, targetPartsType: PartsType): void;
|
|
347
|
-
setItemboxBackgroundPosition(pos: {
|
|
348
|
-
x: number;
|
|
349
|
-
y: number;
|
|
350
|
-
}): void;
|
|
351
|
-
private _getVirtualPadButton;
|
|
352
|
-
private _setVirtualPadTouch;
|
|
353
|
-
private _setVirtualPadLeave;
|
|
354
|
-
private _actionGamePadButtonItemMacro;
|
|
355
|
-
setGamePadButtonItemTable(buttonID: number, itemBoxNo: number): void;
|
|
356
|
-
private _checkSaveDataCompatibility;
|
|
357
|
-
isVisibleStatus(statusKind: StatusKind): boolean;
|
|
358
|
-
private _changeStatusVisibility;
|
|
359
|
-
shouldApplyGameOver({ isCalledByMacro }: {
|
|
360
|
-
isCalledByMacro: boolean;
|
|
361
|
-
}): boolean;
|
|
362
|
-
getEnemyStatus(): Status | number;
|
|
363
|
-
setEnemyStatus(status: Status): void;
|
|
364
|
-
getGameStatus(): {
|
|
365
|
-
totalStatus: Status;
|
|
366
|
-
bareStatus: Status;
|
|
367
|
-
itemStatus: EquipmentStatus;
|
|
368
|
-
energyMax: number;
|
|
369
|
-
moveCount: number;
|
|
370
|
-
playTime: number;
|
|
371
|
-
userVars: (string | number | boolean)[];
|
|
372
|
-
playerCoord: Coord;
|
|
373
|
-
playerDirection: Direction;
|
|
374
|
-
itemBox: number[];
|
|
375
|
-
};
|
|
376
|
-
private _debugEvalString;
|
|
377
|
-
private _execEvalString;
|
|
378
|
-
movePlayer(moveDir: Direction): void;
|
|
379
|
-
isPlayerWaitingMessage(): boolean;
|
|
380
|
-
private _loadSystemMessage;
|
|
381
|
-
resolveSystemMessage(key: SystemMessage.Key): string;
|
|
382
|
-
overwriteSystemMessage(key: SystemMessage.Key, message: string | undefined): void;
|
|
383
|
-
}
|
|
384
|
-
export {};
|
package/lib/wwa_message.d.ts
DELETED
|
@@ -1,241 +0,0 @@
|
|
|
1
|
-
import { WWA } from "./wwa_main";
|
|
2
|
-
import { Coord, PartsType, MacroType, Position, Direction, PreprocessMacroType, ScoreOptions as ScoreOptions } from "./wwa_data";
|
|
3
|
-
import { Monster } from "./wwa_monster";
|
|
4
|
-
import { WWAData } from "./wwa_data";
|
|
5
|
-
import { WWASave } from "./wwa_save";
|
|
6
|
-
import { type TokenValues, type Descriminant } from "./wwa_expression";
|
|
7
|
-
export type LazyEvaluateValue = () => number | string | boolean;
|
|
8
|
-
export type MessageSegments = (string | LazyEvaluateValue)[];
|
|
9
|
-
export declare class Page {
|
|
10
|
-
firstNode?: Node;
|
|
11
|
-
isLastPage?: boolean;
|
|
12
|
-
showChoice?: boolean;
|
|
13
|
-
isSystemMessage?: boolean;
|
|
14
|
-
scoreOptions?: ScoreOptions;
|
|
15
|
-
extraInfo?: {
|
|
16
|
-
partsId: number;
|
|
17
|
-
partsType: PartsType;
|
|
18
|
-
partsPosition: Coord;
|
|
19
|
-
};
|
|
20
|
-
constructor(firstNode?: Node, isLastPage?: boolean, showChoice?: boolean, isSystemMessage?: boolean, scoreOptions?: ScoreOptions, extraInfo?: {
|
|
21
|
-
partsId: number;
|
|
22
|
-
partsType: PartsType;
|
|
23
|
-
partsPosition: Coord;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
export declare abstract class Node {
|
|
27
|
-
constructor();
|
|
28
|
-
}
|
|
29
|
-
export interface Branch {
|
|
30
|
-
descriminant?: Descriminant;
|
|
31
|
-
elseBranch?: {
|
|
32
|
-
type: "real" | "pesudo-else";
|
|
33
|
-
};
|
|
34
|
-
next?: Node;
|
|
35
|
-
}
|
|
36
|
-
export declare class Junction extends Node {
|
|
37
|
-
branches: Branch[];
|
|
38
|
-
constructor(branches?: Branch[]);
|
|
39
|
-
appendBranch(branch: Branch): void;
|
|
40
|
-
getLastUnconnectedBranch(): Branch | undefined;
|
|
41
|
-
evaluateAndGetNextNode(generateTokenValues: () => TokenValues): Node | undefined;
|
|
42
|
-
hasElseBranch(): boolean;
|
|
43
|
-
}
|
|
44
|
-
export declare class ParsedMessage extends Node {
|
|
45
|
-
macro?: Macro[];
|
|
46
|
-
next?: Node;
|
|
47
|
-
private messageSegments;
|
|
48
|
-
constructor(textOrMessageSegments: string | MessageSegments, macro?: Macro[], next?: Node);
|
|
49
|
-
isEmpty(): boolean;
|
|
50
|
-
generatePrintableMessage(): string;
|
|
51
|
-
appendMessage(message: string | MessageSegments, withNewLine?: boolean): void;
|
|
52
|
-
private parseMessage;
|
|
53
|
-
}
|
|
54
|
-
export declare function isEmptyMessageTree(node: Node | undefined): boolean;
|
|
55
|
-
export declare function getLastMessage(node: undefined): undefined;
|
|
56
|
-
export declare function getLastMessage(node: Node): Node;
|
|
57
|
-
export declare function concatMessage(node1: Node | undefined, node2: Node | undefined): Node | undefined;
|
|
58
|
-
export type MessageLineType = PreprocessMacroType | "text" | "normalMacro";
|
|
59
|
-
export declare const messagLineIsText: (lineType: MessageLineType) => boolean;
|
|
60
|
-
export type MessageLine = ({
|
|
61
|
-
type: PreprocessMacroType;
|
|
62
|
-
text: string;
|
|
63
|
-
macro: Macro;
|
|
64
|
-
} | {
|
|
65
|
-
type: "normalMacro";
|
|
66
|
-
text: string;
|
|
67
|
-
macro: Macro;
|
|
68
|
-
} | {
|
|
69
|
-
type: "text";
|
|
70
|
-
text: string;
|
|
71
|
-
macro?: undefined;
|
|
72
|
-
});
|
|
73
|
-
export declare class Macro {
|
|
74
|
-
private _wwa;
|
|
75
|
-
private _triggerPartsID;
|
|
76
|
-
private _triggerPartsType;
|
|
77
|
-
private _triggerPartsPosition;
|
|
78
|
-
macroType: MacroType;
|
|
79
|
-
macroArgs: string[];
|
|
80
|
-
constructor(_wwa: WWA, _triggerPartsID: number, _triggerPartsType: number, _triggerPartsPosition: Coord, macroType: MacroType, macroArgs: string[]);
|
|
81
|
-
isJunction(): boolean;
|
|
82
|
-
execute(): {
|
|
83
|
-
isGameOver?: true;
|
|
84
|
-
};
|
|
85
|
-
private _concatEmptyArgs;
|
|
86
|
-
private _evaluateIntValue;
|
|
87
|
-
private _executeJumpGateMacro;
|
|
88
|
-
private _executeRecPositionMacro;
|
|
89
|
-
private _executeJumpRecPositionMacro;
|
|
90
|
-
private _executeConsoleLogMacro;
|
|
91
|
-
private _executeCopyHpToMacro;
|
|
92
|
-
private _executeCopyHpMaxToMacro;
|
|
93
|
-
private _executeCopyAtToMacro;
|
|
94
|
-
private _executeCopyDfToMacro;
|
|
95
|
-
private _parseStatusKind;
|
|
96
|
-
private _executeCopyMoneyToMacro;
|
|
97
|
-
private _executeSetHPMacro;
|
|
98
|
-
private _executeSetHpMaxMacro;
|
|
99
|
-
private _executeSetAtMacro;
|
|
100
|
-
private _executeSetDfMacro;
|
|
101
|
-
private _executeSetMoneyMacro;
|
|
102
|
-
private _executeSetStepCountMacro;
|
|
103
|
-
private _executeVarSetValMacro;
|
|
104
|
-
private _executeVarSetMacro;
|
|
105
|
-
private _executeVarAddMacro;
|
|
106
|
-
private _executeVarSubMacro;
|
|
107
|
-
private _executeVarMulMacro;
|
|
108
|
-
private _executeVarDivMacro;
|
|
109
|
-
private _executeVarModMacro;
|
|
110
|
-
private _executeVarSetRandMacro;
|
|
111
|
-
private _executeGameSpeedMacro;
|
|
112
|
-
private _executeLegacyIfMacro;
|
|
113
|
-
private _executeSetSpeedMacro;
|
|
114
|
-
private _executeCopyTimeToMacro;
|
|
115
|
-
private _executeHideStatusMacro;
|
|
116
|
-
private _executeVarMapMacro;
|
|
117
|
-
private _executeImgPlayerMacro;
|
|
118
|
-
private _executeImgYesNoMacro;
|
|
119
|
-
private _executeHPMaxMacro;
|
|
120
|
-
private _executeSaveMacro;
|
|
121
|
-
private _executeItemMacro;
|
|
122
|
-
private _executeDefaultMacro;
|
|
123
|
-
private _executeOldMapMacro;
|
|
124
|
-
private _executePartsMacro;
|
|
125
|
-
private _executeMoveMacro;
|
|
126
|
-
private _executeMapMacro;
|
|
127
|
-
private _executeDirMapMacro;
|
|
128
|
-
private _executeImgFrameMacro;
|
|
129
|
-
private _executeImgBomMacro;
|
|
130
|
-
private _executeDelPlayerMacro;
|
|
131
|
-
private _executeFaceMacro;
|
|
132
|
-
private _executeEffectMacro;
|
|
133
|
-
private _executeGameOverMacro;
|
|
134
|
-
private _executeImgClickMacro;
|
|
135
|
-
private _executeEffItemMacro;
|
|
136
|
-
private _executeStatusMacro;
|
|
137
|
-
private _executeColorMacro;
|
|
138
|
-
private _executeWaitMacro;
|
|
139
|
-
private _executeSoundMacro;
|
|
140
|
-
private _executeGamePadButtonMacro;
|
|
141
|
-
private _executeOldMoveMacro;
|
|
142
|
-
private _executeNoGameOverMacro;
|
|
143
|
-
private _executeSetMacro;
|
|
144
|
-
private _executeDelayBgmMacro;
|
|
145
|
-
private _executeSysMsgMacro;
|
|
146
|
-
private resolveSystemMessageKeyFromMacroArg;
|
|
147
|
-
}
|
|
148
|
-
export declare function parseMacro(wwa: WWA, partsID: number, partsType: PartsType, position: Coord, macroStr: string): Macro;
|
|
149
|
-
export declare class TextWindow {
|
|
150
|
-
protected _wwa: WWA;
|
|
151
|
-
protected _coord: Coord;
|
|
152
|
-
protected _width: number;
|
|
153
|
-
protected _height: number;
|
|
154
|
-
protected _isVisible: boolean;
|
|
155
|
-
protected _parentElement: HTMLElement;
|
|
156
|
-
protected _element: HTMLElement;
|
|
157
|
-
constructor(_wwa: WWA, _coord: Coord, _width: number, _height: number, _isVisible: boolean, _parentElement: HTMLElement, zIndex: number);
|
|
158
|
-
update(a?: any): void;
|
|
159
|
-
show(): void;
|
|
160
|
-
hide(): void;
|
|
161
|
-
isVisible(): boolean;
|
|
162
|
-
protected get windowName(): string;
|
|
163
|
-
}
|
|
164
|
-
export declare class MonsterWindow extends TextWindow {
|
|
165
|
-
protected _cgFileName: string;
|
|
166
|
-
protected _monsterBox: HTMLDivElement;
|
|
167
|
-
protected _energyBox: HTMLDivElement;
|
|
168
|
-
protected _strengthBox: HTMLDivElement;
|
|
169
|
-
protected _defenceBox: HTMLDivElement;
|
|
170
|
-
constructor(wwa: WWA, coord: Coord, width: number, height: number, isVisible: boolean, parentElement: HTMLElement, _cgFileName: string);
|
|
171
|
-
update(monster?: Monster): void;
|
|
172
|
-
protected get windowName(): string;
|
|
173
|
-
}
|
|
174
|
-
export declare class ScoreWindow extends TextWindow {
|
|
175
|
-
protected static WINDOW_NAME: string;
|
|
176
|
-
constructor(wwa: WWA, coord: Coord, isVisible: boolean, parentElement: HTMLElement);
|
|
177
|
-
update(score?: number): void;
|
|
178
|
-
protected get windowName(): string;
|
|
179
|
-
}
|
|
180
|
-
export declare enum Positioning {
|
|
181
|
-
TOP = 0,
|
|
182
|
-
CENTER = 1,
|
|
183
|
-
BOTTOM = 2,
|
|
184
|
-
SCORE = 3
|
|
185
|
-
}
|
|
186
|
-
export declare class MessageWindow {
|
|
187
|
-
private _wwa;
|
|
188
|
-
private _x;
|
|
189
|
-
private _y;
|
|
190
|
-
private _width;
|
|
191
|
-
private _height;
|
|
192
|
-
private _message;
|
|
193
|
-
private _cgFileName;
|
|
194
|
-
private _isVisible;
|
|
195
|
-
private _isYesno;
|
|
196
|
-
private _isSave;
|
|
197
|
-
private _isItemMenu;
|
|
198
|
-
private _isInputDisable;
|
|
199
|
-
private _element;
|
|
200
|
-
private _msgWrapperElement;
|
|
201
|
-
private _dummyElement;
|
|
202
|
-
private _saveElement;
|
|
203
|
-
private _ynWrapperElement;
|
|
204
|
-
private _divYesElement;
|
|
205
|
-
private _divNoElement;
|
|
206
|
-
private _parentElement;
|
|
207
|
-
private _wwaSave;
|
|
208
|
-
private _save_select_id;
|
|
209
|
-
private _save_counter;
|
|
210
|
-
private _save_close;
|
|
211
|
-
constructor(wwa: WWA, x: number, y: number, width: number, height: number, cgFileName: string, isVisible: boolean, isYesno: boolean, isItemMenu: boolean, parentElement: HTMLElement);
|
|
212
|
-
setPosition(x: number, y: number, width: number, height: number): void;
|
|
213
|
-
setPositionByPlayerPosition(existsFaces: boolean, existsScoreWindow: boolean, displayCenter: boolean, playerPos: Position, cameraPos: Position): void;
|
|
214
|
-
setPositionEasy(pos: Positioning): void;
|
|
215
|
-
setMessage(message: string): void;
|
|
216
|
-
clear(): void;
|
|
217
|
-
setYesNoChoice(isYesNo: boolean): boolean;
|
|
218
|
-
isYesNoChoice(): boolean;
|
|
219
|
-
isSaveChoice(): boolean;
|
|
220
|
-
setItemMenuChoice(isItemMenu: boolean): boolean;
|
|
221
|
-
isItemMenuChoice(): boolean;
|
|
222
|
-
setInputDisable(): void;
|
|
223
|
-
isInputDisable(): boolean;
|
|
224
|
-
show(): void;
|
|
225
|
-
hide(): void;
|
|
226
|
-
isVisible(): boolean;
|
|
227
|
-
private isWideChar;
|
|
228
|
-
private createClassicTextElement;
|
|
229
|
-
update(): void;
|
|
230
|
-
setWWASave(wwaSave: WWASave): void;
|
|
231
|
-
createSaveDom(): void;
|
|
232
|
-
deleteSaveDom(): void;
|
|
233
|
-
setSaveID(save_select_id: number): void;
|
|
234
|
-
save(gameCvs: HTMLCanvasElement, _quickSaveData: WWAData): boolean;
|
|
235
|
-
load(): WWAData;
|
|
236
|
-
saveUpdate(): void;
|
|
237
|
-
isSaveClose(): boolean;
|
|
238
|
-
private cursor_wait;
|
|
239
|
-
saveControll(moveDir: Direction): void;
|
|
240
|
-
protected get windowName(): string;
|
|
241
|
-
}
|
package/lib/wwa_monster.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Coord, Status } from "./wwa_data";
|
|
2
|
-
export declare class Monster {
|
|
3
|
-
private _partsID;
|
|
4
|
-
private _position;
|
|
5
|
-
private _imgCoord;
|
|
6
|
-
private _status;
|
|
7
|
-
private _message;
|
|
8
|
-
private _item;
|
|
9
|
-
private _battleEndCallback?;
|
|
10
|
-
constructor(_partsID: number, _position: Coord, _imgCoord: Coord, _status: Status, _message: string, _item: number, _battleEndCallback?: () => void);
|
|
11
|
-
get partsID(): number;
|
|
12
|
-
get position(): Coord;
|
|
13
|
-
get imgCoord(): Coord;
|
|
14
|
-
get status(): Status;
|
|
15
|
-
get message(): string;
|
|
16
|
-
get item(): number;
|
|
17
|
-
damage(amount: number): void;
|
|
18
|
-
battleEndProcess(): void;
|
|
19
|
-
setStatus(status: Status): void;
|
|
20
|
-
clone(): Monster;
|
|
21
|
-
}
|
package/lib/wwa_motion.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { WWA } from "./wwa_main";
|
|
2
|
-
import { Direction as Dir, Position, Coord, Direction } from "./wwa_data";
|
|
3
|
-
import { Player } from "./wwa_parts_player";
|
|
4
|
-
export declare class ObjectMovingData {
|
|
5
|
-
private _player;
|
|
6
|
-
private _objectID;
|
|
7
|
-
private _srcPos;
|
|
8
|
-
private _destPos;
|
|
9
|
-
private _dir;
|
|
10
|
-
private _currentPos;
|
|
11
|
-
constructor(_player: Player, _objectID: number, _srcPos: Position, _destPos: Position, _dir: Dir);
|
|
12
|
-
update(): Position;
|
|
13
|
-
get isAchievedDestination(): boolean;
|
|
14
|
-
get currentPosition(): Position;
|
|
15
|
-
get beforePosition(): Position;
|
|
16
|
-
get destination(): Position;
|
|
17
|
-
get objID(): number;
|
|
18
|
-
}
|
|
19
|
-
export declare class ObjectMovingDataManager {
|
|
20
|
-
private _wwa;
|
|
21
|
-
private _player;
|
|
22
|
-
private _queue;
|
|
23
|
-
constructor(_wwa: WWA, _player: Player);
|
|
24
|
-
add(objectID: number, srcPos: Position, destPos: Position, dir: Direction): void;
|
|
25
|
-
update(): ObjectMovingData[];
|
|
26
|
-
clear(): void;
|
|
27
|
-
get objectMovingData(): ObjectMovingData[];
|
|
28
|
-
getOffsetByBeforePartsCoord(coord: Coord): Coord;
|
|
29
|
-
}
|