diff --git a/node_modules/@types/noname-typings/nonameModules/noname.d.ts b/node_modules/@types/noname-typings/nonameModules/noname.d.ts index 4221e9b7d..0074af79c 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname.d.ts @@ -1,3 +1,4 @@ +export const rootURL: URL; export { boot } from "./noname/init/index.js"; export { GNC, gnc, setGNC } from "./noname/gnc/index.js"; export { AI, ai, setAI } from "./noname/ai/index.js"; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/ai/basic.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/ai/basic.d.ts index 5fcef7eef..4f10c4acf 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/ai/basic.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/ai/basic.d.ts @@ -5,7 +5,7 @@ export class Basic { * buttons?: Button[] * ) => number } check */ - chooseButton(check: (button: Button, buttons?: Button[]) => number): boolean | undefined; + chooseButton(check: (button: Button, buttons?: Button[]) => number): boolean; /** * @param { ( * card?: Card, @@ -20,5 +20,5 @@ export class Basic { * targets?: Player[] * ) => number } check */ - chooseTarget(check: (target?: Player, targets?: Player[]) => number): boolean | undefined; + chooseTarget(check: (target?: Player, targets?: Player[]) => number): boolean; } diff --git a/node_modules/@types/noname-typings/nonameModules/noname/ai/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/ai/index.d.ts index bf812acf2..70c9609f7 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/ai/index.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/ai/index.d.ts @@ -3,6 +3,6 @@ export class AI { get: import("../get/index.js").Get; } export let ai: AI; -export function setAI(instance?: AI | undefined): void; +export function setAI(instance?: InstanceType): void; export { Basic }; import { Basic } from "./basic.js"; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/game/check.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/game/check.d.ts index cf0668041..7075e1710 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/game/check.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/game/check.d.ts @@ -7,19 +7,19 @@ export class Check { isSelectable: any; }): { ok: boolean; - auto: boolean | undefined; + auto: boolean; }; button(event: any, useCache: any): { ok: boolean; - auto: boolean | undefined; + auto: boolean; }; card(event: any, useCache: any): { ok: boolean; - auto: boolean | undefined; + auto: boolean; }; target(event: any, useCache: any): { ok: boolean; - auto: boolean | undefined; + auto: boolean; }; skill(event: any): void; confirm(event: any, confirm: any): void; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/game/dynamic-style/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/game/dynamic-style/index.d.ts index 46cb93dc8..64e1ceb64 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/game/dynamic-style/index.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/game/dynamic-style/index.d.ts @@ -37,7 +37,7 @@ export class DynamicStyle { */ get(name: string): { [x: string]: string | number; - } | null; + }; /** * Callback of `DynamicStyle#find`, getting the rule wanted. * `DynamicStyle#find`的回调函数,用于获取符合要求的规则 diff --git a/node_modules/@types/noname-typings/nonameModules/noname/game/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/game/index.d.ts index 9971c369c..9679f261a 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/game/index.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/game/index.d.ts @@ -1,7 +1,7 @@ export class Game { online: boolean; - onlineID: null; - onlineKey: null; + onlineID: any; + onlineKey: any; /** * @type {Player[]} */ @@ -64,7 +64,7 @@ export class Game { /** * 洗牌 */ - washCard(): false | never[] | (import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise); + washCard(): false | any[] | (import("../library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise); /** * 基于钩子的添加势力方法 */ @@ -81,7 +81,7 @@ export class Game { * @param {Parameters} args */ callHook(name: Name, args: Parameters): void; - yingbianEffect(event: any, content: any, ...args: any[]): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise; + yingbianEffect(event: any, content: any, ...args: any[]): import("../library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; setYingbianConditionColor(yingbianCondition: any, color: any): void; setComplexYingbianCondition(yingbianCondition: any, condition: any): void; setSimpleYingbianCondition(yingbianCondition: any, condition: any): void; @@ -168,7 +168,7 @@ export class Game { */ loseAsync(arg?: { [key: string]: any; - } | undefined): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise; + }): import("../library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; callFuncUseStepCache(prefix: any, func: any, params: any): any; /** * @param {string} name @@ -181,7 +181,7 @@ export class Game { * @param { GameEventPromise } [last] * @returns { boolean } */ - hasGlobalHistory(key: T, filter: (event: GameEventPromise) => boolean, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): boolean; + hasGlobalHistory(key: T, filter: (event: GameEventPromise) => boolean, last?: GameEventPromise): boolean; /** * @template { keyof GameHistory } T * @param { T } key @@ -189,7 +189,7 @@ export class Game { * @param { GameEventPromise } [last] * @returns { void } */ - checkGlobalHistory(key: T_1, filter: (event: GameEventPromise) => boolean, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): void; + checkGlobalHistory(key: T_1, filter: (event: GameEventPromise) => boolean, last?: GameEventPromise): void; /** * @overload * @returns { GameHistory } @@ -203,7 +203,7 @@ export class Game { * @param { GameEventPromise } [last] * @returns { GameHistory[T] } */ - getGlobalHistory(key: T_2, filter?: ((event: GameEventPromise) => boolean) | undefined, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): GameHistory[T_2]; + getGlobalHistory(key: T_2, filter?: (event: GameEventPromise) => boolean, last?: GameEventPromise): GameHistory[T_2]; /** * @template { keyof GameHistory } T * @param { T } key @@ -211,7 +211,7 @@ export class Game { * @param { GameEventPromise } [last] * @returns { boolean } */ - hasAllGlobalHistory(key: T_3, filter: (event: GameEventPromise) => boolean, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): boolean; + hasAllGlobalHistory(key: T_3, filter: (event: GameEventPromise) => boolean, last?: GameEventPromise): boolean; /** * @template { keyof GameHistory } T * @param { T } key @@ -219,7 +219,7 @@ export class Game { * @param { GameEventPromise } [last] * @returns { void } */ - checkAllGlobalHistory(key: T_4, filter: (event: GameEventPromise) => boolean, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): void; + checkAllGlobalHistory(key: T_4, filter: (event: GameEventPromise) => boolean, last?: GameEventPromise): void; /** * @overload * @returns { GameHistory[] } @@ -233,7 +233,7 @@ export class Game { * @param { GameEventPromise } [last] * @returns { GameHistory[T] } */ - getAllGlobalHistory(key: T_5, filter?: ((event: GameEventPromise) => boolean) | undefined, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): GameHistory[T_5]; + getAllGlobalHistory(key: T_5, filter?: (event: GameEventPromise) => boolean, last?: GameEventPromise): GameHistory[T_5]; /** * @overload * @returns { void } @@ -279,14 +279,14 @@ export class Game { * @param { 'toRenku' | false } [bool] 为false时不触发trigger,为'toRenku'时牌放到仁库 * @returns { GameEventPromise } */ - cardsGotoSpecial(cards: Card, bool?: false | "toRenku" | undefined): GameEventPromise; + cardsGotoSpecial(cards: Card, bool?: 'toRenku' | false): GameEventPromise; /** * @overload * @param {Card[]} cards * @param { 'toRenku' | false } [bool] 为false时不触发trigger,为'toRenku'时牌放到仁库 * @returns { GameEventPromise } */ - cardsGotoSpecial(cards: Card[], bool?: false | "toRenku" | undefined): GameEventPromise; + cardsGotoSpecial(cards: Card[], bool?: 'toRenku' | false): GameEventPromise; /** * * @param {...( @@ -301,7 +301,7 @@ export class Game { cardsGotoPile(...args: (Card[] | Card | Function | 'insert' | 'washCard' | 'triggeronly' | [ string, any - ])[]): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise; + ])[]): import("../library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * @param { GameEventPromise } event */ @@ -309,18 +309,18 @@ export class Game { /** * @param { false } [pause] */ - showHistory(pause?: false | undefined): void; + showHistory(pause?: false): void; /** * @param { string } src * @param { true } [blur] */ - createBackground(src: string, blur?: true | undefined): HTMLDivElement; + createBackground(src: string, blur?: true): HTMLDivElement; /** * * @param { string } url * @param { Player } [player] */ - changeLand(url: string, player?: import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): void; + changeLand(url: string, player?: Player): void; /** * @param { string[] } updates * @param { Function } proceed @@ -343,7 +343,7 @@ export class Game { /** * @param { 'hidden' } [type] */ - randomMapOL(type?: "hidden" | undefined): void; + randomMapOL(type?: 'hidden'): void; closeMenu(): void; closeConnectMenu(): void; closePopped(): void; @@ -378,7 +378,7 @@ export class Game { createDialog: (id: any, ...args: any[]) => void; gameStart: () => void; updateWaiting: (map: any) => void; - }[T_6]> | undefined): void; + }[T_6]>): void; /** * @template { any[] } T * @overload @@ -386,7 +386,7 @@ export class Game { * @param { ...T } args * @returns { void } */ - broadcast(func: (...args: T_6) => void, ...args: T_6 | undefined): void; + broadcast(func: (...args: T_6) => void, ...args: T_6): void; /** * @template { keyof typeof lib.message.client } T * @overload @@ -418,7 +418,7 @@ export class Game { createDialog: (id: any, ...args: any[]) => void; gameStart: () => void; updateWaiting: (map: any) => void; - }[T_7]> | undefined): void; + }[T_7]>): void; /** * @template { any[] } T * @overload @@ -426,7 +426,7 @@ export class Game { * @param { ...T } args * @returns { void } */ - broadcastAll(func: (...args: T_7) => void, ...args: T_7 | undefined): void; + broadcastAll(func: (...args: T_7) => void, ...args: T_7): void; syncState(): void; updateWaiting(): void; /** @@ -437,7 +437,7 @@ export class Game { * @param { number } time * @param { Function } [onEnd] */ - countDown(time: number, onEnd?: Function | undefined): void; + countDown(time: number, onEnd?: Function): void; countChoose(clear: any): void; stopCountChoose(): void; /** @@ -461,8 +461,9 @@ export class Game { * @typedef {[string,number]|string|number|boolean} audioInfo * @typedef {{audio: audioInfo, audioname?:string[], audioname2?:{[playerName: string]: audioInfo}}} skillInfo * @param { string } skill 技能名 - * @param { Player | string } [player] 角色/角色名 + * @param { Player | Object | string } [player] 角色/角色名 * @param { skillInfo | audioInfo } [skillInfo] 预设的skillInfo/audioInfo(转为skillInfo),覆盖lib.skill[skill] + * @param { boolean | undefined } [useRawAudio] * @returns { string[] } 语音地址列表 * @example * ```js @@ -494,13 +495,47 @@ export class Game { * //如果key中包含发动技能的角色名player,则直接改用info.audioname2[player]来播放语音 * ``` */ - parseSkillAudio(skill: string, player?: string | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined, skillInfo?: { + parseSkillAudio(skill: string, player?: Player | any | string, skillInfo?: { audio: string | number | boolean | [string, number]; - audioname?: string[] | undefined; + audioname?: string[]; audioname2?: { [playerName: string]: string | number | boolean | [string, number]; - } | undefined; - } | (string | number | boolean | [string, number]) | undefined): string[]; + }; + } | (string | number | boolean | [string, number])): string[]; + /** + * 根据skill中的audio,audioname,audioname2和player来获取技能台词列表 + * @param { string } skill 技能名 + * @param { Player | Object | string } [player] 角色/角色名 + * @param { skillInfo | audioInfo } [skillInfo] 预设的skillInfo/audioInfo(转为skillInfo),覆盖lib.skill[skill] + * @returns { string[] } 语音地址列表 + */ + parseSkillText(skill: string, player?: Player | any | string, skillInfo?: { + audio: string | number | boolean | [string, number]; + audioname?: string[]; + audioname2?: { + [playerName: string]: string | number | boolean | [string, number]; + }; + } | (string | number | boolean | [string, number])): string[]; + /** + * 根据skill中的audio,audioname,audioname2和player来获取技能台词列表及其对应的源文件名 + * @param { string } skill 技能名 + * @param { Player | Object | string } [player] 角色/角色名 + * @param { skillInfo | audioInfo } [skillInfo] 预设的skillInfo/audioInfo(转为skillInfo),覆盖lib.skill[skill] + * @returns { any[] } 语音地址列表 + */ + parseSkillTextMap(skill: string, player?: Player | any | string, skillInfo?: { + audio: string | number | boolean | [string, number]; + audioname?: string[]; + audioname2?: { + [playerName: string]: string | number | boolean | [string, number]; + }; + } | (string | number | boolean | [string, number])): any[]; + /** + * 获取角色死亡时能播放的所有阵亡语音 + * @param { string | Player } player 角色名 + * @returns { any[] } 语音地址列表 + */ + parseDieTextMap(player: string | Player): any[]; /** * * @param { string } skill @@ -510,13 +545,18 @@ export class Game { * @param { ['lib']['skill'] } [skillInfo] * @returns */ - trySkillAudio(skill: string, player: Player | string, directaudio?: boolean | undefined, nobroadcast?: boolean | undefined, skillInfo?: any): HTMLAudioElement | undefined; + trySkillAudio(skill: string, player: Player | string, directaudio?: boolean, nobroadcast?: boolean, skillInfo?: any): HTMLAudioElement; + /** + * @param { Player | string } player + * @returns + */ + tryDieAudio(player: Player | string): HTMLAudioElement; /** * @param { string } name * @param { number } [index] * @returns */ - playSkillAudio(name: string, index?: number | undefined, ...args: any[]): void; + playSkillAudio(name: string, index?: number, ...args: any[]): void; /** * @param { string | Card } card * @param { Player | Sex } sex @@ -612,47 +652,47 @@ export class Game { * 下载文件 * @type { undefined | ((url: string, folder: string, onsuccess?: Function, onerror?: (e: Error) => void, dev?: 'nodev', onprogress?: Function) => void) } */ - download: ((url: string, folder: string, onsuccess?: Function, onerror?: ((e: Error) => void) | undefined, dev?: 'nodev', onprogress?: Function) => void) | undefined; + download: (url: string, folder: string, onsuccess?: Function, onerror?: (e: Error) => void, dev?: 'nodev', onprogress?: Function) => void; /** * 读取文件为arraybuffer * @type { undefined | ((filename: string, callback?: (data: Buffer | ArrayBuffer) => any, onerror?: (e: Error) => void) => void) } */ - readFile: ((filename: string, callback?: ((data: Buffer | ArrayBuffer) => any) | undefined, onerror?: ((e: Error) => void) | undefined) => void) | undefined; + readFile: (filename: string, callback?: (data: Buffer | ArrayBuffer) => any, onerror?: (e: Error) => void) => void; /** * 读取文件为文本 * @type { undefined | ((filename: string, callback?: (data: string) => any, onerror?: (e: Error) => void) => void) } */ - readFileAsText: ((filename: string, callback?: ((data: string) => any) | undefined, onerror?: ((e: Error) => void) | undefined) => void) | undefined; + readFileAsText: (filename: string, callback?: (data: string) => any, onerror?: (e: Error) => void) => void; /** * 将数据写入文件 * @type { undefined | ((data: File | ArrayBuffer, path: string, name: string, callback?: (e: Error) => void) => void) } */ - writeFile: ((data: File | ArrayBuffer, path: string, name: string, callback?: ((e: Error) => void) | undefined) => void) | undefined; + writeFile: (data: File | ArrayBuffer, path: string, name: string, callback?: (e: Error) => void) => void; /** * 移除文件 * @type { undefined | ((filename: string, callback?: (e: Error) => void) => void) } */ - removeFile: ((filename: string, callback?: ((e: Error) => void) | undefined) => void) | undefined; + removeFile: (filename: string, callback?: (e: Error) => void) => void; /** * 获取文件列表 * @type { undefined | ((dir: string, success: (folders: string[], files: string[]) => any, failure?: (e: Error) => void) => void) } */ - getFileList: ((dir: string, success: (folders: string[], files: string[]) => any, failure?: ((e: Error) => void) | undefined) => void) | undefined; + getFileList: (dir: string, success: (folders: string[], files: string[]) => any, failure?: (e: Error) => void) => void; /** * 按路径依次创建文件夹 * @type { undefined | ((list: string | string[], callback: Function, file?: boolean) => void) } */ - ensureDirectory: ((list: string | string[], callback: Function, file?: boolean) => void) | undefined; + ensureDirectory: (list: string | string[], callback: Function, file?: boolean) => void; /** * 创建文件夹 * @type { undefined | ((directory: string, successCallback?: Function, errorCallback?: Function) => void) } */ - createDir: ((directory: string, successCallback?: Function, errorCallback?: Function) => void) | undefined; + createDir: (directory: string, successCallback?: Function, errorCallback?: Function) => void; /** * 删除文件夹 * @type { undefined | ((directory: string, successCallback?: Function, errorCallback?: Function) => void) } */ - removeDir: ((directory: string, successCallback?: Function, errorCallback?: Function) => void) | undefined; + removeDir: (directory: string, successCallback?: Function, errorCallback?: Function) => void; /** * @type { (forcecheck?: boolean | null, dev?: boolean) => Promise } */ @@ -661,12 +701,12 @@ export class Game { * @type { () => Promise } */ checkForAssetUpdate: () => Promise; - importExtension(data: any, finishLoad: any, exportExtension: any, extensionPackage: any): Promise; + importExtension(data: any, finishLoad: any, exportExtension: any, extensionPackage: any): Promise; /** * @param { string } textToWrite * @param { string } [name] */ - export(textToWrite: string, name?: string | undefined): void; + export(textToWrite: string, name?: string): void; /** * @param { string[] } list * @param { Function } [onsuccess] @@ -675,7 +715,7 @@ export class Game { * @param { Function } [process] * @param {*} [dev] */ - multiDownload2(list: string[], onsuccess?: Function | undefined, onerror?: Function | undefined, onfinish?: Function | undefined, process?: Function | undefined, dev?: any): void; + multiDownload2(list: string[], onsuccess?: Function, onerror?: Function, onfinish?: Function, process?: Function, dev?: any): void; /** * @param { string[] } list * @param { Function } onsuccess @@ -684,14 +724,14 @@ export class Game { * @param { Function } [process] * @param {*} [dev] */ - multiDownload(list: string[], onsuccess: Function, onerror: Function, onfinish: Function, process?: Function | undefined, dev?: any, ...args: any[]): void; + multiDownload(list: string[], onsuccess: Function, onerror: Function, onfinish: Function, process?: Function, dev?: any, ...args: any[]): void; /** * @param { string } url * @param { Function } onload * @param { Function } [onerror] * @param { Function } [onprogress] */ - fetch(url: string, onload: Function, onerror?: Function | undefined, onprogress?: Function | undefined): void; + fetch(url: string, onload: Function, onerror?: Function, onprogress?: Function): void; /** * @param { string } time * @param { string } mode @@ -745,6 +785,7 @@ export class Game { reinit2: (source: any, name: any) => void; reinit3: (source: any, content: any) => void; changeSkin: (player: any, map: any) => void; + changeGroup: (player: any, targetGroup: any) => void; skill: (player: any, content: any) => void; addFellow: (content: any) => void; windowzoom1: () => void; @@ -856,7 +897,7 @@ export class Game { /** * @param { number } [time] */ - vibrate(time?: number | undefined): void; + vibrate(time?: number): void; prompt(...args: any[]): void; alert(str: any): void; print(...args: any[]): void; @@ -897,7 +938,7 @@ export class Game { * @param { false } [trigger] * @param { GameEventPromise } [triggerEvent] */ - createEvent(name: string, trigger?: false | undefined, triggerEvent?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise; + createEvent(name: string, trigger?: false, triggerEvent?: GameEventPromise): import("../library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * @param { string } name * @param { { extension: string, sex: Sex, group: string, hp: string | number, skills?: string[], tags?: any[], translate: string } } information @@ -917,7 +958,7 @@ export class Game { */ addCharacterPack(pack: { [key: string]: any; - mode?: string | undefined; + mode?: string; forbid?: any; character: { [key: string]: Character; @@ -925,7 +966,7 @@ export class Game { skill: { [key: string]: any; }; - }, packagename?: string | undefined): void; + }, packagename?: string): void; /** * @param { string } name * @param { Card } info @@ -944,8 +985,8 @@ export class Game { */ addCardPack(pack: { extension: string; - mode?: string[] | undefined; - forbid?: string[] | undefined; + mode?: string[]; + forbid?: string[]; list: any[]; card: { [key: string]: import("noname-typings/nonameModules/noname/library/element/card.js").Card; @@ -953,7 +994,7 @@ export class Game { skill: { [key: string]: any; }; - }, packagename?: string | undefined): void; + }, packagename?: string): void; /** * @param { string } name * @param { { [key: string]: object } } info @@ -964,7 +1005,7 @@ export class Game { */ addSkill(name: string, info: { [key: string]: any; - }, translate?: string | undefined, description?: string | undefined, appendInfo?: string | undefined, abInfo?: string | undefined): boolean; + }, translate?: string, description?: string, appendInfo?: string, abInfo?: string): boolean; /** * @param { string } name * @param {*} info @@ -980,7 +1021,7 @@ export class Game { * @param { string } skill * @param { Player } [player] */ - addGlobalSkill(skill: string, player?: import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): boolean; + addGlobalSkill(skill: string, player?: Player): boolean; /** * @param { string } skill * @param { lib.element.Player } player @@ -1008,7 +1049,7 @@ export class Game { * @param { string } extensionName * @param { boolean } [keepFile] */ - removeExtension(extensionName: string, keepFile?: boolean | undefined): void; + removeExtension(extensionName: string, keepFile?: boolean): void; addRecentCharacter(...args: any[]): void; /** * @overload @@ -1022,7 +1063,7 @@ export class Game { * @param { number | string } [number] * @param { string } [nature] */ - createCard(name: Card | string, suit?: string | undefined, number?: string | number | undefined, nature?: string | undefined): any; + createCard(name: Card | string, suit?: string, number?: number | string, nature?: string): any; /** * @overload * @returns { Card } @@ -1046,7 +1087,7 @@ export class Game { * @param { boolean } [bool] * @returns */ - over(result?: string | boolean | undefined, bool?: boolean | undefined, ...args: any[]): void; + over(result?: boolean | string, bool?: boolean, ...args: any[]): void; /** * @type { Map> } * @@ -1062,27 +1103,27 @@ export class Game { /** * @param { GameEventPromise } [belongAsyncEvent] */ - loop(belongAsyncEvent?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): Promise; + loop(belongAsyncEvent?: GameEventPromise): Promise; /** * @param { GameEventPromise } [belongAsyncEvent] */ - runContent(belongAsyncEvent?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): Promise; + runContent(belongAsyncEvent?: GameEventPromise): Promise; pause(): void; pause2(): void; resume(): void; resume2(): void; - delaye(...args: any[]): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise; - delayex(...args: any[]): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise; + delaye(...args: any[]): import("../library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + delayex(...args: any[]): import("../library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * @param { number } [time] * @param { number } [time2] */ - delay(time?: number | undefined, time2?: number | undefined): void; + delay(time?: number, time2?: number): void; /** * @param { number } [time] * @param { number } [time2] */ - delayx(time?: number | undefined, time2?: number | undefined): void; + delayx(time?: number, time2?: number): void; /** * 在async content中对game.delay的代替使用方法 * @@ -1091,7 +1132,7 @@ export class Game { * @param { number } [time] * @param { number } [time2] */ - asyncDelay(time?: number | undefined, time2?: number | undefined): Promise; + asyncDelay(time?: number, time2?: number): Promise; /** * 在async content中对game.delayx的代替使用方法 * @@ -1100,11 +1141,11 @@ export class Game { * @param { number } [time] * @param { number } [time2] */ - asyncDelayx(time?: number | undefined, time2?: number | undefined): Promise; + asyncDelayx(time?: number, time2?: number): Promise; /** * @param { GameEventPromise } [event] */ - check(event?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): boolean; + check(event?: GameEventPromise): boolean; Check: Check; uncheck(...args: any[]): void; /** @@ -1114,12 +1155,12 @@ export class Game { * @param { boolean } [behind] * @param { boolean } [noanimate] */ - swapSeat(player1: Player, player2: Player, prompt?: boolean | undefined, behind?: boolean | undefined, noanimate?: boolean | undefined): void; + swapSeat(player1: Player, player2: Player, prompt?: boolean, behind?: boolean, noanimate?: boolean): void; /** * @param { Player } player1 * @param { Player } [player2] */ - swapPlayer(player: any, player2?: import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): void; + swapPlayer(player: any, player2?: Player): void; /** * @param { Player } player */ @@ -1154,7 +1195,7 @@ export class Game { /** * @param { Player } [player] */ - gameDraw(player?: import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined, num?: number): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise; + gameDraw(player?: Player, num?: number): import("../library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; chooseCharacterDouble(...args: any[]): void; updateRoundNumber(): void; /** @@ -1163,9 +1204,9 @@ export class Game { * @param { { drawDeck: boolean } } [drawDeck] * @param { boolean } [bottom] */ - asyncDraw(players: Player[], num?: number | number[] | ((player: Player) => number) | undefined, drawDeck?: { + asyncDraw(players: Player[], num?: number | number[] | ((player: Player) => number), drawDeck?: { drawDeck: boolean; - } | undefined, bottom?: boolean | undefined): void; + }, bottom?: boolean): Promise; /** * @param { Player[] } players * @param { number | number[] | (player: Player) => number } num @@ -1173,7 +1214,7 @@ export class Game { */ asyncDrawAuto(players: Player[], num: number | number[] | ((player: Player) => number), drawDeck?: { drawDeck: boolean; - } | undefined, ...args: any[]): void; + }, ...args: any[]): void; finishSkill(i: any, sub: any): void; finishCards(): void; /** @@ -1195,7 +1236,7 @@ export class Game { * @param { boolean } [forced] * @param { string } [logvid] */ - logv(player: Player, card: string | Card[], targets?: import("noname-typings/nonameModules/noname/library/element/player.js").Player[] | undefined, event?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined, forced?: boolean | undefined, logvid?: string | undefined): HTMLDivElement | undefined; + logv(player: Player, card: string | Card[], targets?: Player[], event?: GameEventPromise, forced?: boolean, logvid?: string): HTMLDivElement; /** * @param { string } storeName * @param { string } idbValidKey @@ -1203,7 +1244,7 @@ export class Game { * @param { Function } [onSuccess] * @param { Function } [onError] */ - putDB(storeName: string, idbValidKey: string, value: any, onSuccess?: Function | undefined, onError?: Function | undefined): Promise; + putDB(storeName: string, idbValidKey: string, value: any, onSuccess?: Function, onError?: Function): Promise; /** * * @param { string } storeName @@ -1211,33 +1252,33 @@ export class Game { * @param { Function } [onSuccess] * @param { Function } [onError] */ - getDB(storeName: string, query?: string | null | undefined, onSuccess?: Function | undefined, onError?: Function | undefined): Promise; + getDB(storeName: string, query?: string | null, onSuccess?: Function, onError?: Function): Promise; /** * @param { string } storeName * @param { string } [query] * @param { Function } [onSuccess] * @param { Function } [onError] */ - deleteDB(storeName: string, query?: string | undefined, onSuccess?: Function | undefined, onError?: Function | undefined): Promise; + deleteDB(storeName: string, query?: string, onSuccess?: Function, onError?: Function): Promise; /** * @param { string } key * @param { * } [value] * @param { string } [mode] */ - save(key: string, value?: any, mode?: string | undefined): void; + save(key: string, value?: any, mode?: string): void; showChangeLog(): void; /** * @param { string } str * @param { string } [extname] */ - showExtensionChangeLog(str: string, extname?: string | undefined): void; + showExtensionChangeLog(str: string, extname?: string): void; /** * @param { string } key * @param { * } [value] * @param { string | boolean } [local] * @param { Function } [callback] */ - saveConfig(key: string, value?: any, local?: string | boolean | undefined, callback?: Function | undefined): void; + saveConfig(key: string, value?: any, local?: string | boolean, callback?: Function): void; /** * @param { string } key */ @@ -1267,21 +1308,21 @@ export class Game { * @param { string } [character] * @param { string } [character2] */ - addPlayer(position: number, character?: string | undefined, character2?: string | undefined): import("../library/element/player.js").Player; + addPlayer(position: number, character?: string, character2?: string): import("../library/element/player.js").Player; /** * @param { number } position * @param { string } [character] * @param { string } [animation] */ - addFellow(position: number, character?: string | undefined, animation?: string | undefined): import("../library/element/player.js").Player; + addFellow(position: number, character?: string, animation?: string): import("../library/element/player.js").Player; /** * @param { Player } player */ - triggerEnter(player: Player): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise; + triggerEnter(player: Player): import("../library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * @param { Player } player */ - restorePlayer(player: Player): import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined; + restorePlayer(player: Player): import("noname-typings/nonameModules/noname/library/element/player.js").Player; /** * @param { Player } player */ @@ -1291,7 +1332,7 @@ export class Game { * @param { string } [character] * @param { string } [character2] */ - replacePlayer(player: Player, character?: string | undefined, character2?: string | undefined): import("../library/element/player.js").Player; + replacePlayer(player: Player, character?: string, character2?: string): import("../library/element/player.js").Player; arrangePlayers(): void; /** * @param { string[] } skills @@ -1313,22 +1354,22 @@ export class Game { * @param { (player: Player) => boolean } func * @param { boolean } [includeOut] */ - hasPlayer(func: (player: Player) => boolean, includeOut?: boolean | undefined): boolean; + hasPlayer(func: (player: Player) => boolean, includeOut?: boolean): boolean; /** * @param { (player: Player) => boolean } func * @param { boolean } [includeOut] */ - hasPlayer2(func: (player: Player) => boolean, includeOut?: boolean | undefined): boolean; + hasPlayer2(func: (player: Player) => boolean, includeOut?: boolean): boolean; /** * @param { (player: Player) => boolean } func * @param { boolean } [includeOut] */ - countPlayer(func: (player: Player) => boolean, includeOut?: boolean | undefined): number; + countPlayer(func: (player: Player) => boolean, includeOut?: boolean): number; /** * @param { (player: Player) => boolean } func * @param { boolean } [includeOut] */ - countPlayer2(func: (player: Player) => boolean, includeOut?: boolean | undefined): number; + countPlayer2(func: (player: Player) => boolean, includeOut?: boolean): number; /** * @overload * @returns { Player[] } @@ -1341,7 +1382,7 @@ export class Game { * @param { boolean } [includeOut] * @returns { Player[] } */ - filterPlayer(func: (player: Player) => boolean, list?: import("noname-typings/nonameModules/noname/library/element/player.js").Player[] | undefined, includeOut?: boolean | undefined): Player[]; + filterPlayer(func: (player: Player) => boolean, list?: Player[], includeOut?: boolean): Player[]; /** * @overload * @returns { Player[] } @@ -1354,22 +1395,22 @@ export class Game { * @param { boolean } [includeOut] * @returns { Player[] } */ - filterPlayer2(func: (player: Player) => boolean, list?: import("noname-typings/nonameModules/noname/library/element/player.js").Player[] | undefined, includeOut?: boolean | undefined): Player[]; + filterPlayer2(func: (player: Player) => boolean, list?: Player[], includeOut?: boolean): Player[]; /** * @param { (player: Player) => boolean } func * @param { boolean } [includeOut] */ - findPlayer(func: (player: Player) => boolean, includeOut?: boolean | undefined): import("noname-typings/nonameModules/noname/library/element/player.js").Player | null; + findPlayer(func: (player: Player) => boolean, includeOut?: boolean): import("noname-typings/nonameModules/noname/library/element/player.js").Player; /** * @param { (player: Player) => boolean } func * @param { boolean } [includeOut] */ - findPlayer2(func: (player: Player) => boolean, includeOut?: boolean | undefined): import("noname-typings/nonameModules/noname/library/element/player.js").Player | null; + findPlayer2(func: (player: Player) => boolean, includeOut?: boolean): import("noname-typings/nonameModules/noname/library/element/player.js").Player; /** * @param { (player: Player) => boolean } func * @param { boolean } [all] */ - findCards(func: (player: Player) => boolean, all?: boolean | undefined): string[]; + findCards(func: (player: Player) => boolean, all?: boolean): string[]; countGroup(): number; /** * 此函数用于计算函数的时间消耗。 @@ -1387,7 +1428,7 @@ export class Game { doAsyncInOrder(targets: Player[], asyncFunc: (player: Player, i: number) => Promise, sort: (a: Player, b: Player) => number): Promise; } export let game: Game; -export function setGame(instance?: Game | undefined): void; +export function setGame(instance?: InstanceType): void; export type GameHistory = { cardMove: GameEventPromise[]; custom: GameEventPromise[]; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/game/promises.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/game/promises.d.ts index c5b8861fd..64459709f 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/game/promises.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/game/promises.d.ts @@ -12,7 +12,7 @@ export class GamePromises { * @returns { Promise } * */ - prompt(title: string, forced?: boolean | undefined): Promise; + prompt(title: string, forced?: boolean): Promise; /** * 模仿h5的alert,用于显示信息的对话框 * @@ -36,4 +36,11 @@ export class GamePromises { createDir(directory: any): Promise; removeFile(filename: any): Promise; removeDir(directory: any): Promise; + /** + * 获取文件列表 + * + * @param { string } dir 目录 + * @returns { Promise<[string[], string[]]> } 返回一个数组,第一个元素是文件夹列表,第二个元素是文件列表 + */ + getFileList(dir: string): Promise<[string[], string[]]>; } diff --git a/node_modules/@types/noname-typings/nonameModules/noname/get/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/get/index.d.ts index b4290be5e..4384797d6 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/get/index.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/get/index.d.ts @@ -11,6 +11,12 @@ export class Get { * @returns {["firefox" | "chrome" | "safari" | "other", number, number, number]} */ coreInfo(): ["firefox" | "chrome" | "safari" | "other", number, number, number]; + /** + * 将一个传统格式的character转化为Character对象格式 + * @param { Array|Object|import("../library/element/character").Character } data + * @returns {import("../library/element/character").Character} + */ + convertedCharacter(data: any[] | any | import("../library/element/character").Character): import("../library/element/character").Character; /** * 返回 VCard[] 形式的所有牌,用于印卡将遍历 * @param {Function} filter @@ -74,17 +80,27 @@ export class Get { * @param { false | Player } [player] * @returns { string[] } */ - subtypes(obj: string | Card | VCard | CardBaseUIData, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): string[]; + subtypes(obj: string | Card | VCard | CardBaseUIData, player?: false | Player): string[]; /** - * @returns { string[] } + * @param {string} chinese + * @param {boolean|undefined} withTone + * @returns { any[] } */ - pinyin(chinese: any, withTone: any): string[]; - yunmu(str: any): any; + pinyin(chinese: string, withTone: boolean | undefined): any[]; + /** + * @param { string } str + * @returns { string } + */ + yunmu(str: string): string; /** * 用于将参数转换为字符串,作为缓存的key。 */ paramToCacheKey(...args: any[]): string; - yunjiao(str: any): string | null; + /** + * @param { string } str + * @returns { string|null } + */ + yunjiao(str: string): string | null; /** * @param { string } skill * @param { Player } player @@ -95,11 +111,11 @@ export class Get { connectNickname(): any; zhinangs(filter: any): any; sourceCharacter(str: any): any; - isLuckyStar(player: any): any; + isLuckyStar(player: any): boolean; infoHp(hp: any): number; infoMaxHp(hp: any): number; infoHujia(hp: any): number; - bottomCards(num: any, putBack: any): Node | Node[]; + bottomCards(num: any, putBack: any): ChildNode | ChildNode[]; discarded(): any; cardOffset(): number; colorspan(str: any): any; @@ -114,9 +130,9 @@ export class Get { /** * @overload * @param { string } name - * @returns { Character } + * @returns { import("../library/element/character").Character } */ - character(name: string): Character; + character(name: string): import("../library/element/character").Character; /** * @template { 0 | 1 | 2 | 3 | 4 } T * @overload @@ -139,11 +155,11 @@ export class Get { zip(callback: (zip: JSZip) => any): void; delayx(num: any, max: any): number; prompt(skill: any, target: any, player: any): string; - prompt2(skill: any, target: any, player: any, ...args: any[]): string; + prompt2(skill: any, target: any, player: any, ...args: any[]): any; url(master: any): string; round(num: any, f: any): number; playerNumber(): number; - benchmark(func1: any, func2: any, iteration: any, arg: any): number | undefined; + benchmark(func1: any, func2: any, iteration: any, arg: any): number; /** * @param {any} obj */ @@ -159,7 +175,7 @@ export class Get { * @param {WeakMap} [map] - 拷贝用的临时存储,用于处理循环引用(请勿自行赋值) * @returns {T} - 深拷贝后的对象,若传入值不是对象则为传入值 */ - copy(obj: T_1, copyKeyDeep?: boolean | undefined, map?: WeakMap | undefined): T_1; + copy(obj: T_1, copyKeyDeep?: boolean, map?: WeakMap): T_1; inpilefull(type: any): { name: any; suit: any; @@ -170,14 +186,14 @@ export class Get { inpile2(type: any): any[]; typeCard(type: any, filter: any): string[]; libCard(filter: any): string[]; - ip(): any; + ip(): string; modetrans(config: any, server: any): string; charactersOL(func: any): number[]; trimip(str: any): any; mode(): any; - idDialog(id: any): import("noname-typings/nonameModules/noname/library/element/dialog.js").Dialog | null; + idDialog(id: any): import("noname-typings/nonameModules/noname/library/element/dialog.js").Dialog; arenaState(): { - number: string | undefined; + number: string; players: {}; mode: any; dying: any[]; @@ -195,7 +211,7 @@ export class Get { zhu(player: any, skill: any, group: any): any; config(item: any, mode: any): any; coinCoeff(list: any): number; - rank(name: any, num: any): number | "x" | "s" | "c" | "d" | "b" | "a" | "ap" | "am" | "bp" | "bm" | "sp"; + rank(name: any, num: any): number | "x" | "s" | "b" | "c" | "d" | "a" | "ap" | "am" | "bp" | "bm" | "sp"; skillRank(skill: any, type: any, grouped: any): number; targetsInfo(targets: any): any[]; infoTargets(infos: any): import("noname-typings/nonameModules/noname/library/element/player.js").Player[]; @@ -217,7 +233,7 @@ export class Get { /** * @param {string} item */ - infoEventOL(item: string): import("../library/element/gameEvent.js").GameEvent; + infoEventOL(item: string): string | import("../library/element/gameEvent.js").GameEvent; stringifiedResult(item: any, level: any, nomore: any): any; parsedResult(item: any): any; verticalStr(str: any, sp: any): string; @@ -305,7 +321,7 @@ export class Get { */ itemtype(obj: GameEvent | GameEventPromise): 'event'; equipNum(card: any): number; - objtype(obj: any): "div" | "object" | "array" | "table" | "tr" | "td" | "fragment" | undefined; + objtype(obj: any): "object" | "div" | "array" | "table" | "tr" | "td" | "fragment"; type(obj: any, method: any, player: any): any; type2(card: any, player: any): any; /** @@ -314,7 +330,7 @@ export class Get { * @param { false | Player } [player] * @returns { string } */ - subtype(obj: string | Card | VCard | CardBaseUIData, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): string; + subtype(obj: string | Card | VCard | CardBaseUIData, player?: false | Player): string; equiptype(card: any, player: any): number; /** * @@ -322,40 +338,40 @@ export class Get { * @param { false | Player } [player] * @returns { string } */ - name(card: Card | VCard | CardBaseUIData, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): string; + name(card: Card | VCard | CardBaseUIData, player?: false | Player): string; /** * @param {Card | VCard | Card[] | VCard[]} card * @param {false | Player} [player] * @returns {string} */ - suit(card: Card | VCard | Card[] | VCard[], player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): string; + suit(card: Card | VCard | Card[] | VCard[], player?: false | Player): string; /** * @param {Card | VCard | Card[] | VCard[]} card * @param {false | Player} [player] * @returns {string} */ - color(card: Card | VCard | Card[] | VCard[], player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): string; + color(card: Card | VCard | Card[] | VCard[], player?: false | Player): string; /** * @param {Card | VCard} card * @param {false | Player} [player] * @returns {number} */ - number(card: Card | VCard, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): number; + number(card: Card | VCard, player?: false | Player): number; /** * 返回一张杀的属性。如有多种属性则用`lib.natureSeparator`分割开来。例:火雷【杀】的返回值为`fire|thunder` * @param {string | string[] | Card | VCard} card * @param {false | Player} [player] * @returns {string} */ - nature(card: string | string[] | Card | VCard, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): string; + nature(card: string | string[] | Card | VCard, player?: false | Player): string; /** * 返回包含所有属性的数组 * @param {string[] | string} card * @param {false | Player} [player] * @returns {string[]} */ - natureList(card: string[] | string, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): string[]; - cards(num: any, putBack: any): Node | Node[]; + natureList(card: string[] | string, player?: false | Player): string[]; + cards(num: any, putBack: any): ChildNode | ChildNode[]; judge(card: any): any; judge2(card: any): any; distance(from: any, to: any, method: any): number; @@ -371,12 +387,12 @@ export class Get { * @param { Player | false } [player] * @returns { any } */ - info(item: Card | VCard | CardBaseUIData, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): any; + info(item: Card | VCard | CardBaseUIData, player?: Player | false): any; /** * @param { number | Select | (()=>Select) } [select] * @returns { Select } */ - select(select?: number | Select | (() => Select) | undefined): Select; + select(select?: number | Select | (() => Select)): Select; card(original: any): any; /** * @overload @@ -392,7 +408,7 @@ export class Get { event(key: T_2): import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent[T_2]; player(): import("noname-typings/nonameModules/noname/library/element/player.js").Player; players(sort: any, dead: any, out: any): import("noname-typings/nonameModules/noname/library/element/player.js").Player[]; - position(card: any, ordering: any): number | "e" | "j" | "x" | "s" | "h" | "c" | "d" | "o" | null | undefined; + position(card: any, ordering: any): number | "x" | "s" | "e" | "j" | "h" | "c" | "d" | "o"; skillTranslation(str: any, player: any): string; skillInfoTranslation(name: any, player: any): any; /** @@ -412,12 +428,12 @@ export class Get { * @param {((a: Button, b: Button) => number)} [sort] 排序函数 * @returns { Button[] } */ - selectableButtons(sort?: ((a: Button, b: Button) => number) | undefined): Button[]; + selectableButtons(sort?: (a: Button, b: Button) => number): Button[]; /** * @param {((a: Card, b: Card) => number)} [sort] 排序函数 * @returns { Card[] } */ - selectableCards(sort?: ((a: Card, b: Card) => number) | undefined): Card[]; + selectableCards(sort?: (a: Card, b: Card) => number): Card[]; /** * @returns { string[] } 技能名数组 */ @@ -429,11 +445,11 @@ export class Get { * @param {((a: Player, b: Player) => number)} [sort] 排序函数 * @returns { Player[] } */ - selectableTargets(sort?: ((a: Player, b: Player) => number) | undefined): Player[]; + selectableTargets(sort?: (a: Player, b: Player) => number): Player[]; filter(filter: any, i: any): any; cardCount(card: any, player: any): any; skillCount(skill: any, player: any): any; - owner(card: any, method: any): import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined; + owner(card: any, method: any): import("noname-typings/nonameModules/noname/library/element/player.js").Player; noSelected(): boolean; population(identity: any): number; totalPopulation(identity: any): number; @@ -442,7 +458,7 @@ export class Get { */ cardtag(item: Card | VCard, tag: any): any; tag(item: any, tag: any, item2: any, bool: any): any; - sortCard(sort: any): ((card: any) => any) | undefined; + sortCard(sort: any): (card: any) => any; difficulty(): 2 | 1 | 3; cardPile(name: any, create: any): any; cardPile2(name: any): any; @@ -451,7 +467,7 @@ export class Get { skillintro(name: any, learn: any, learn2: any): string; intro(name: any): string; storageintro(type: any, content: any, player: any, dialog: any, skill: any): any; - nodeintro(node: any, simple: any, evt: any): import("../library/element/dialog.js").Dialog | undefined; + nodeintro(node: any, simple: any, evt: any): import("../library/element/dialog.js").Dialog; linkintro(dialog: any, content: any, player: any): void; groups(): string[]; types(): any[]; @@ -492,9 +508,84 @@ export class Get { recoverEffect(target: any, player: any, viewer: any): number; buttonValue(button: any): number; attitude2(to: any): any; + /** + * 将URL转换成相对于无名杀根目录的路径 + * + * --- + * + * 在无名杀正式过渡到http协议前,无名杀的路径在不同端拥有不同的情况: + * - 网页端: 除了`db`外,没任何可能 + * - 电脑端(electron): 和`node.js`保持一致 + * - 手机端(cordova): 需要使用`cordova`的`cordova-plugin-file`插件实现,有较为严格的限制 + * + * 故之前的路径API基本如下: + * - 网页端完全不考虑 + * - 使用`lib.assetURL + `的形式,其中`lib.assetURL`的值为: + * - 在网页端和电脑端为空字符串 + * - 在手机端为无名杀包的`externalApplicationStorageDirectory`里(也就是`Android/data//`) + * + * 现在无名杀即将踏入http协议,也早已用上了ES Module,故活用`import.meta.url`来提供路径理应被重视,`URL`也理应成为路径的主要构成 + * + * 然而由于之前的API混乱且针对多端有不同的情况,故需要提供函数,来方便提供调用旧API的情况 + * + * @param {URL} url - 需要转换的URL对象 + * @param {boolean} [addAssetURL=false] - 是否需要在函数内加上`lib.assetURL`, + * 默认为`false`,当为`true`时会在协议为`file`时增加`lib.assetURL` + * @returns {string} + * + * @example + * // 当前文件以"noname/get/index.js"举例 + * let parsedPath = get.relativePath(import.meta.url, true); + * console.assert(parsedPath == `${lib.assetURL}noname/get/index.js`); + */ + relativePath(url: URL, addAssetURL?: boolean): string; + /** + * 通过`FileReader`,将Blob转换成对应内容的[Data URL](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Basics_of_HTTP/Data_URLs) + * + * @async + * @param {Blob} blob - 需要转换的内容 + * @returns {Promise} 对应Blob内容的 + * + * @example + * let text = "Hello, World!"; + * console.assert(btoa(text) === "SGVsbG8sIFdvcmxkIQ=="); + * + * let blob = new Blob([text], { type: "text/plain" }); + * let url = await get.dataUrlAsync(blob); + * console.assert(url.href === "data:text/plain;base64,SGVsbG8sIFdvcmxkIQ=="); + */ + dataUrlAsync(blob: Blob): Promise; + /** + * 通过`Get#blobFromUrl`读取data URL的内容,转换成Blob后返回生成的blob URL + * + * > 实际上所有的URL都能通过此方法读取 + * + * 该方法具有缓存,同一data URL仅会返回同一blob URL + * + * 该方法相比`get.objectURL`,会保留文件的类型 + * + * --- + * + * > 其实我不确定`get.objectURL`是否有实际意义上的需求,我也不确定`get.objectURL`不保留类型是否是刚需,但既然原先就存在,那么就不要动 + * + * @async + * @param {string | URL} dataUrl - 需要转换的data URL + * @returns {Promise} + */ + objectUrlAsync(dataUrl: string | URL): Promise; + /** + * 读取给定的URL,将其中的内容转换成Blob + * + * 在File协议下通过无名杀自带的文件处理函数读取内容,其他协议通过`fetch`读取内容 + * + * @async + * @param {string | URL} url - 需要读取的URL + * @returns {Promise} + */ + blobFromUrl(url: string | URL): Promise; } export let get: Get; -export function setGet(instance?: Get | undefined): void; +export function setGet(instance?: InstanceType): void; import { Is } from "./is.js"; import { Promises } from "./promises.js"; export { Is, Promises }; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/get/is.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/get/is.d.ts index dfcf107d3..4420ac402 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/get/is.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/get/is.d.ts @@ -5,14 +5,14 @@ export class Is { * @param { false | Player } [player] * @returns { boolean } */ - attackingMount(card: Card | VCard, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): boolean; + attackingMount(card: Card | VCard, player?: false | Player): boolean; /** * 判断是否为防御坐骑 * @param { Card | VCard } card * @param { false | Player } [player] * @returns { boolean } */ - defendingMount(card: Card | VCard, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): boolean; + defendingMount(card: Card | VCard, player?: false | Player): boolean; /** * 判断坐骑栏是否被合并 * @returns { boolean } @@ -65,10 +65,10 @@ export class Is { /** * 是否是双势力武将 * @param { string } name - * @param { string[] } array + * @param { string[] } [array] * @returns { boolean | string[] } */ - double(name: string, array: string[]): boolean | string[]; + double(name: string, array?: string[]): boolean | string[]; /** * Check if the card has a Yingbian condition * @@ -99,7 +99,7 @@ export class Is { /** * @param { string } [substring] */ - emoji(substring?: string | undefined): boolean; + emoji(substring?: string): boolean; /** * @param { string } str */ @@ -162,7 +162,7 @@ export class Is { /** * @param { Player } [player] */ - mobileMe(player?: import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): boolean | undefined; + mobileMe(player?: Player): boolean; newLayout(): boolean; phoneLayout(): boolean; singleHandcard(): any; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/get/pinyins/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/get/pinyins/index.d.ts new file mode 100644 index 000000000..efabf5349 --- /dev/null +++ b/node_modules/@types/noname-typings/nonameModules/noname/get/pinyins/index.d.ts @@ -0,0 +1,47 @@ +export function addDict(dict: any, name: any): void; +export function clearCustomDict(dict: any): void; +/** + * @description: 拼音格式转换。pin1 yin1 -> pīn yīn 或 pīn yīn -> pin1 yin1 或 pīn yīn -> pin yin + * @param {string | string[]} pinyin 要转换的拼音字符串或者拼音字符串数组 + * @param {any} options 配置项 + * @return {string | string[]} 转换后的拼音字符串或者拼音字符串数组 + */ +export function convert(pinyin: string | string[], options: any): string | string[]; +/** + * @description: 用户自定义拼音 + * @param {{ [key: string]: string }} config 用户自定义的拼音映射(支持汉字、词语、句子的映射),若匹配到该映射,优先将汉字转换为该映射 + * @param {any} options multiple/polyphonic 对于 customPinyin 补充词汇的处理 + */ +export function customPinyin(config: { + [key: string]: string; +}, options: any): void; +/** + * @description: 获取带拼音汉字的 html 字符串 + * @param {string} text 要转换的字符串 + * @param {any} options html 中标签类名相关配置 + * @return {string} 带汉字的拼音字符串 + */ +export function html(text: string, options: any): string; +/** + * @description: 检测汉语字符串和拼音是否匹配 + * @param {string} text 汉语字符串 + * @param {string} pinyin 拼音,支持各种缩写形式 + * @param {any} options 配置项 + * @return {Array | null} 若匹配成功,返回 text 中匹配成功的下标数组;若匹配失败,返回 null + */ +export function match(text: string, pinyin: string, options: any): any[] | null; +/** + * @description: 获取汉语字符串的拼音 + * @param {string} word 要转换的汉语字符串 + * @param {any} options 配置项 + * @return {string | string[] | any[]} options.type 为 string 时,返回字符串,中间用空格隔开;为 array 时,返回拼音字符串数组;为 all 时返回全部信息的数组 + */ +export function pinyin(word: string, options: any): string | string[] | any[]; +/** + * @description: 获取每个汉字的所有读音 + * @param {string} text 要转换的汉语字符串 + * @param {any} options 配置项 + * @return {string[] | string[][] | any[][]} options.type 为 string 时,返回字符串数组,中间用空格隔开;为 array 时,返回二维拼音字符串数组;为 all 时返回二维全部信息的数组 + */ +export function polyphonic(text: string, options?: any): string[] | string[][] | any[][]; +export function removeDict(dictName: any): void; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/get/pinyins/noname-dict.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/get/pinyins/noname-dict.d.ts new file mode 100644 index 000000000..4bb2b3d3a --- /dev/null +++ b/node_modules/@types/noname-typings/nonameModules/noname/get/pinyins/noname-dict.d.ts @@ -0,0 +1,172 @@ +export default dictionary; +declare namespace dictionary { + let 用间: string[]; + let 乐进: string[]; + let 乐就: string[]; + let 乐綝: string[]; + let 华歆: string[]; + let 华雄: string[]; + let 贾诩: string[]; + let 贾逵: string[]; + let 贾充: string[]; + let 沮授: string[]; + let 纪灵: string[]; + let 笮融: string[]; + let 逢纪: string[]; + let 许褚: string[]; + let 刘辟: string[]; + let 刘禅: string[]; + let 甄宓: string[]; + let 孙綝: string[]; + let 李傕: string[]; + let 李遗: string[]; + let 张嶷: string[]; + let 蒋干: string[]; + let 雷薄: string[]; + let 吕蒙: string[]; + let 于禁: string[]; + let 赵累: string[]; + let 夏侯令女: string[]; + let 马日磾: string[]; + let 史阿: string[]; + let 凯撒: string[]; + let 乐无异: string[]; + let 端蒙: string[]; + let 妹喜: string[]; + let 洛欧塞布: string[]; + let 塞纳留斯: string[]; + let 半藏: string[]; + let 地藏王: string[]; + let 查莉娅: string[]; + let 单小小: string[]; + let 少微: string[]; + let 少昊: string[]; + let 欧阳少恭: string[]; + let 卡尔维特: string[]; + let 卡西尔: string[]; + let 卡扎库斯: string[]; + let 卡德加: string[]; + let 法兰茜斯卡: string[]; + let 卡利莫斯: string[]; + let 安卡: string[]; + let 卡玛: string[]; + let 梼杌: string[]; + let 亚煞极: string[]; + let 库特莉亚芙卡: string[]; + let 露娜: string[]; + let 弹雀: string[]; + let 重身: string[]; + let 畜鸣: string[]; + let 聆乐: string[]; + let 没矢: string[]; + let 没欲: string[]; + let 血裔: string[]; + let 血卫: string[]; + let 血诏: string[]; + let 血偿: string[]; + let 血拼: string[]; + let 血途: string[]; + let 行殇: string[]; + let 节行: string[]; + let 天行: string[]; + let 神行: string[]; + let 镇行: string[]; + let 行图: string[]; + let 绝行: string[]; + let 好施: string[]; + let 荐降: string[]; + let 破降: string[]; + let 拒降: string[]; + let 应势: string[]; + let 应援: string[]; + let 应机: string[]; + let 节应: string[]; + let 驰应: string[]; + let 断发: string[]; + let 旋风: string[]; + let 将驰: string[]; + let 将烈: string[]; + let 将略: string[]; + let 斩将: string[]; + let 拜将: string[]; + let 强识: string[]; + let 默识: string[]; + let 数谏: string[]; + let 巧说: string[]; + let 营说: string[]; + let 说盟: string[]; + let 落宠: string[]; + let 落雁: string[]; + let 落雷: string[]; + let 贲育: string[]; + let 造王: string[]; + let 舍宴: string[]; + let 舍裔: string[]; + let 省身: string[]; + let 单骑: string[]; + let 间书: string[]; + let 伏间: string[]; + let 间计: string[]; + let 贵相: string[]; + let 相鼠: string[]; + let 辟田: string[]; + let 辟撰: string[]; + let 辟境: string[]; + let 斗阵: string[]; + let 斗缠: string[]; + let 冯河: string[]; + let 势吓: string[]; + let 虚吓: string[]; + let 叱吓: string[]; + let 度断: string[]; + let 度势: string[]; + let 诛綝: string[]; + let 大喝: string[]; + let 暴喝: string[]; + let 曲误: string[]; + let 媛丽: string[]; + let 调归: string[]; + let 款塞: string[]; + let 父荫: string[]; + let 穆荫: string[]; + let 长姬: string[]; + let 朝凤: string[]; + let 朝争: string[]; + let 令法: string[]; + let 耀令: string[]; + let 冠绝: string[]; + let 先著: string[]; + let 量反: string[]; + let 复难: string[]; + let 膴仕: string[]; + let 蒙斥: string[]; + let 乐动: string[]; + let 血凰: string[]; + let 血戮: string[]; + let 血刃: string[]; + let 血契: string[]; + let 血逐: string[]; + let 血咒: string[]; + let 血殇: string[]; + let 血池: string[]; + let 越行: string[]; + let 侠行: string[]; + let 枭行: string[]; + let 劫行: string[]; + let 割发: string[]; + let 落梅: string[]; + let 落石: string[]; + let 落刀: string[]; + let 星落: string[]; + let 奈落: string[]; + let 舍身: string[]; + let 舍愿: string[]; + let 月露: string[]; + let 沾露: string[]; + let 禁咒: string[]; + let 挟令: string[]; + let 七煞: string[]; + let 冥煞: string[]; + let 虎煞: string[]; + let 煞魂: string[]; +} diff --git a/node_modules/@types/noname-typings/nonameModules/noname/gnc/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/gnc/index.d.ts index b2143da90..ecf3e4eaa 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/gnc/index.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/gnc/index.d.ts @@ -7,6 +7,6 @@ export class GNC { is: Is; } export let gnc: GNC; -export function setGNC(instance?: GNC | undefined): void; +export function setGNC(instance?: InstanceType): void; import { GeneratorFunction } from "../util/index.js"; import { Is } from "./is.js"; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/init/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/init/index.d.ts index eed360421..51456cf8c 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/init/index.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/init/index.d.ts @@ -1,4 +1,4 @@ -export function canUseHttpProtocol(): any; +export function canUseHttpProtocol(): boolean; /** * 传递升级完成的信息 * @returns { string | void } 返回一个网址 diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/cache/cacheContext.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/cache/cacheContext.d.ts index 1e90c9af0..d7163e86b 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/library/cache/cacheContext.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/cache/cacheContext.d.ts @@ -33,7 +33,7 @@ export class CacheContext { * @param {Array} methods * @returns */ - static inject(source: any, methods: Array): null | undefined; + static inject(source: any, methods: Array): any; static _getCacheValueFromObject(storage: any, key: any, params: any, source: any, func: any): any; static _ensureMember(obj: any, key: any): any; static _wrapParametersToCacheKey(params: any): string; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/channel/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/channel/index.d.ts index 2631e4630..a929b8a42 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/library/channel/index.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/channel/index.d.ts @@ -9,7 +9,7 @@ export class Channel { /** * @type {PromiseResolve | [T, PromiseResolve] | null} */ - _buffer: ((value?: T | PromiseLike | undefined) => void) | [T, (value?: void | PromiseLike | undefined) => void] | null; + _buffer: ((value?: T | PromiseLike) => void) | [T, (value?: void | PromiseLike) => void]; /** * 向该频道发送消息,在消息未被接受前将等待 * diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/element/button.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/element/button.d.ts index 98c3dd6a1..0ec414a72 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/library/element/button.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/element/button.d.ts @@ -6,7 +6,7 @@ export class Button extends HTMLDivElement { * @param {true} [noClick] * @param { Button } [button] */ - constructor(item: {}, type: "character" | "tdnodes" | "blank" | "card" | "vcard" | "characterx" | "player" | ((item: {}, type: Function, position?: HTMLDivElement | DocumentFragment, noClick?: true, button?: Button) => Button), position?: HTMLDivElement | DocumentFragment | undefined, noClick?: true | undefined, button?: Button | undefined); + constructor(item: {}, type: "character" | "tdnodes" | "blank" | "card" | "vcard" | "characterx" | "player" | ((item: {}, type: Function, position?: HTMLDivElement | DocumentFragment, noClick?: true, button?: Button) => Button), position?: HTMLDivElement | DocumentFragment, noClick?: true, button?: Button); /** * @type { string | undefined } */ diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/element/card.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/element/card.d.ts index d0e622684..e7b8e322d 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/library/element/card.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/element/card.d.ts @@ -2,12 +2,12 @@ export class Card extends HTMLDivElement { /** * @param {HTMLDivElement|DocumentFragment} [position] */ - constructor(position?: HTMLDivElement | DocumentFragment | undefined); + constructor(position?: HTMLDivElement | DocumentFragment); /** * @param {'noclick'} [info] * @param {true} [noclick] */ - build(info?: "noclick" | undefined, noclick?: true | undefined): this; + build(info?: 'noclick', noclick?: true): this; buildEventListener(info: any): void; buildProperty(): void; /** @@ -42,8 +42,8 @@ export class Card extends HTMLDivElement { willBeDestroyed(targetPosition: any, player: any, event: any): any; hasNature(nature: any, player: any): boolean; addNature(nature: any): string; - nature: string | undefined; - removeNature(nature: any): string | undefined; + nature: string; + removeNature(nature: any): string; addGaintag(gaintag: any): void; removeGaintag(tag: any): void; hasGaintag(tag: any): boolean; @@ -61,10 +61,10 @@ export class Card extends HTMLDivElement { name: string; nature: string; }): this; - suit: string | undefined; - number: number | undefined; + suit: string; + number: number; destroyed: any; - cardid: string | undefined; + cardid: string; /** * @param {[string, number, string, string]} card */ @@ -72,17 +72,17 @@ export class Card extends HTMLDivElement { updateTransform(bool: any, delay: any): void; aiexclude(): void; addKnower(player: any): void; - _knowers: any[] | undefined; + _knowers: any[]; removeKnower(player: any): void; clearKnowers(): void; isKnownBy(player: any): boolean; getSource(name: any): any; moveDelete(player: any): void; - fixed: boolean | undefined; + fixed: boolean; _onEndMoveDelete: any; moveTo(player: any): this; copy(...args: any[]): Card; - clone: Card | undefined; + clone: Card; uncheck(skill: any): void; recheck(skill: any): void; /** diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/element/character.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/element/character.d.ts new file mode 100644 index 000000000..7c9f98f82 --- /dev/null +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/element/character.d.ts @@ -0,0 +1,199 @@ +export class Character { + /** + * @param { Object|[string, string, string|number, string[], any[]|undefined, any[]|undefined] } [data] + */ + constructor(data?: any | [string, string, string | number, string[], any[] | undefined, any[] | undefined]); + /** + * 武将牌的性别 + * @type { string } + **/ + sex: string; + /** + * 武将牌的体力值 + * @type { number } + **/ + hp: number; + /** + * 武将牌的体力上限 + * @type { number } + **/ + maxHp: number; + /** + * 武将牌的护甲值 + * @type { number } + **/ + hujia: number; + /** + * 武将牌的势力 + * @type { string } + **/ + group: string; + /** + * 武将牌的势力边框颜色(如徐庶“身在曹营心在汉”) + * @type { string|undefined } + **/ + groupBorder: string | undefined; + /** + * 神武将牌在国战模式下的势力 + * @type { string|undefined } + **/ + groupInGuozhan: string | undefined; + /** + * 武将牌拥有的技能 + * @type { string[] } + **/ + skills: string[]; + /** + * 武将牌是否为常备主公 + * @type { boolean } + **/ + isZhugong: boolean; + /** + * 武将牌是否为隐藏武将 + * @type { boolean } + **/ + isUnseen: boolean; + /** + * 武将牌是否拥有隐匿技能 + * @type { boolean } + **/ + hasHiddenSkill: boolean; + /** + * 垃圾桶,用于存储原本Character[4]的垃圾数据 + * @type { any[] } + **/ + trashBin: any[]; + /** + * 武将牌对应的另一半双面武将牌 + * @type { string|undefined } + **/ + dualSideCharacter: string | undefined; + /** + * 多势力武将牌的全部势力 + * @type { string[] } + **/ + doubleGroup: string[]; + /** + * 武将牌是否为minskin + * @type { boolean } + **/ + isMinskin: boolean; + /** + * 武将牌是否为挑战模式下的BOSS + * @type { boolean } + **/ + isBoss: boolean; + /** + * 武将牌是否为隐藏BOSS + * @type { boolean } + **/ + isHiddenBoss: boolean; + /** + * 武将牌是否“仅点将可用” + * @type { boolean } + **/ + isAiForbidden: boolean; + /** + * 武将牌在炉石模式/挑战模式下的特殊信息 + * @type { any[]|undefined } + **/ + extraModeData: any[] | undefined; + /** + * 武将牌是否为炉石模式下的随从 + * @type { boolean } + **/ + isFellowInStoneMode: boolean; + /** + * 武将牌是否为炉石模式下的隐藏武将 + * @type { boolean } + **/ + isHiddenInStoneMode: boolean; + /** + * 武将牌是否为炉石模式下的特殊随从(可以使用装备和法术) + * @type { boolean } + **/ + isSpecialInStoneMode: boolean; + /** + * 武将牌是否为bossallowed + * @type { boolean } + **/ + isBossAllowed: boolean; + /** + * 武将牌是否为战旗模式下的BOSS + * @type { boolean } + **/ + isChessBoss: boolean; + /** + * 武将牌是否为剑阁模式下的BOSS + * @type { boolean } + **/ + isJiangeBoss: boolean; + /** + * 武将牌是否为剑阁模式下的机械 + * @type { boolean } + **/ + isJiangeMech: boolean; + /** + * 武将牌是否在国战模式下拥有独立的皮肤 + * @type { boolean } + **/ + hasSkinInGuozhan: boolean; + /** + * 武将牌对应的全部宗族 + * @type { string[] } + **/ + clans: string[]; + /** + * 武将牌拥有的全部阵亡语音 + * @type { string[] } + **/ + dieAudios: string[]; + /** + * 武将牌“无法享受到的主公/地主红利” + * @type { string[] } + **/ + initFilters: string[]; + /** + * 武将牌的“临时名称” + * @type { string[] } + */ + tempname: string[]; + /** + * 武将牌是否存在(get.character未找到武将使用) + * @type { boolean } + */ + isNull: boolean; + initializeTrashProperties(): void; + /** + * @param { any[] } trash + */ + setPropertiesFromTrash(trash: any[]): void; + set 0(sex: string); + /** + * @deprecated + */ + get 0(): string; + set 1(group: string); + /** + * @deprecated + */ + get 1(): string; + set 2(hp: string | number); + /** + * @deprecated + */ + get 2(): string | number; + set 3(skills: string[]); + /** + * @deprecated + */ + get 3(): string[]; + set 4(trashBin: string[]); + /** + * 把新格式下的数据转换回传统的屎山 + * @deprecated + */ + get 4(): string[]; + set 5(stoneData: any[]); + get 5(): any[]; +} diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/element/dialog.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/element/dialog.d.ts index dc2406ed3..3d8980c2a 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/library/element/dialog.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/element/dialog.d.ts @@ -22,16 +22,16 @@ export class Dialog extends HTMLDivElement { * @param {*} [noclick] * @param { boolean } [zoom] */ - add(item: string | HTMLDivElement | Card[] | Player[], noclick?: any, zoom?: boolean | undefined): string | HTMLDivElement | import("noname-typings/nonameModules/noname/library/element/player.js").Player[] | import("noname-typings/nonameModules/noname/library/element/card.js").Card[]; - forcebutton: boolean | undefined; + add(item: string | HTMLDivElement | Card[] | Player[], noclick?: any, zoom?: boolean): string | HTMLDivElement | import("noname-typings/nonameModules/noname/library/element/player.js").Player[] | import("noname-typings/nonameModules/noname/library/element/card.js").Card[]; + forcebutton: boolean; /** * @param { string } str * @param { boolean } [center] */ - addText(str: string, center?: boolean | undefined): this; + addText(str: string, center?: boolean): this; addSmall(item: any, noclick: any): string | HTMLDivElement | import("noname-typings/nonameModules/noname/library/element/player.js").Player[] | import("noname-typings/nonameModules/noname/library/element/card.js").Card[]; addAuto(content: any): void; - open(): this | undefined; + open(): this; _dragtransform: any; close(): this; /** diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/element/gameEvent.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/element/gameEvent.d.ts index de20fcee0..9505dc17e 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/library/element/gameEvent.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/element/gameEvent.d.ts @@ -1,10 +1,10 @@ export class GameEvent { - static initialGameEvent(): GameEvent & import("./gameEventPromise.js").GameEventPromise; + static initialGameEvent(): GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * @param {string | GameEvent} [name] * @param {false} [trigger] */ - constructor(name?: string | GameEvent | undefined, trigger?: false | undefined); + constructor(name?: string | GameEvent, trigger?: false); /** * @type { string } */ @@ -35,10 +35,10 @@ export class GameEvent { **/ async: boolean; /** - * @type {null|(event: GameEvent)=>any} 这个异步事件对应Promise的resolve函数 + * @type {null|((event: GameEvent | PromiseLike)=>void)} 这个异步事件对应Promise的resolve函数 **/ - resolve: ((event: GameEvent) => any) | null; - _triggered: number | undefined; + resolve: (event: GameEvent | PromiseLike) => void; + _triggered: number; __args: any; /** * @type { Player } @@ -161,23 +161,23 @@ export class GameEvent { * @param {number} [value] * @param {number} [baseValue] */ - addNumber(key: keyof this, value?: number | undefined, baseValue?: number | undefined): this; + addNumber(key: keyof this, value?: number, baseValue?: number): this; /** * @param {keyof this} key * @param {number} [baseValue] */ - decrease(key: keyof this, baseValue?: number | undefined): this; + decrease(key: keyof this, baseValue?: number): this; /** * @param {keyof this} key * @param {number} [baseValue] */ - increase(key: keyof this, baseValue?: number | undefined): this; + increase(key: keyof this, baseValue?: number): this; /** * @param {keyof this} key * @param {number} [value] * @param {number} [baseValue] */ - subtractNumber(key: keyof this, value?: number | undefined, baseValue?: number | undefined): this; + subtractNumber(key: keyof this, value?: number, baseValue?: number): this; /** * @param {Parameters[0]} type * @param {GameEvent} event @@ -189,7 +189,7 @@ export class GameEvent { callHandler(type: Parameters[0], event: GameEvent, option: { state?: 'begin' | 'end'; }): this; - getDefaultHandlerType(): string | undefined; + getDefaultHandlerType(): string; /** * @param {Parameters[0]} [type] * @returns {((event: GameEvent, option: { @@ -202,7 +202,7 @@ export class GameEvent { /** * @param {`on${Capitalize}`} [type] */ - hasHandler(type?: `on${Capitalize}` | undefined): any; + hasHandler(type?: `on${Capitalize}`): any; /** * @overload * @param {...((event: GameEvent, option: { @@ -212,7 +212,7 @@ export class GameEvent { */ pushHandler(...handlers: ((event: GameEvent, option: { state?: 'begin' | 'end'; - }) => void)[] | undefined): number; + }) => void)[]): number; /** * @overload * @param {Parameters[0]} type @@ -223,24 +223,24 @@ export class GameEvent { */ pushHandler(type: Parameters[0], ...handlers: ((event: GameEvent, option: { state?: 'begin' | 'end'; - }) => void)[] | undefined): number; + }) => void)[]): number; changeToZero(): this; - numFixed: boolean | undefined; + numFixed: boolean; finish(): this; putStepCache(key: any, value: any): this; - _stepCache: {} | undefined; + _stepCache: {}; getStepCache(key: any): any; clearStepCache(key: any): this; callFuncUseStepCache(prefix: any, func: any, params: any): any; putTempCache(key1: any, key2: any, value: any): any; - _tempCache: {} | undefined; + _tempCache: {}; getTempCache(key1: any, key2: any): any; - cancel(arg1: any, arg2: any, notrigger: any): (GameEvent & import("./gameEventPromise.js").GameEventPromise) | null | undefined; + cancel(arg1: any, arg2: any, notrigger: any): GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; neutralize(event: any): this; - _neutralized: boolean | undefined; + _neutralized: boolean; _neutralize_event: any; unneutralize(): this; - directHit: boolean | undefined; + directHit: boolean; goto(step: any): this; redo(): this; setHiddenSkill(skill: any): this; @@ -256,7 +256,7 @@ export class GameEvent { * @returns {GameEvent} */ setContents(contents: Function | keyof typeof lib.element.contents): GameEvent; - contents: ((string | number | Function) & any[]) | undefined; + contents: (string | number | Function) & any[]; getLogv(): any; send(): this; resume(): this; @@ -269,20 +269,20 @@ export class GameEvent { * @param {boolean} [includeSelf] 若level不是数字,指定搜索时是否包含事件本身 * @returns {GameEvent|{}|null} */ - getParent(level?: string | number | ((evt: GameEvent) => boolean) | undefined, forced?: boolean | undefined, includeSelf?: boolean | undefined): GameEvent | {} | null; + getParent(level?: string | number | ((evt: GameEvent) => boolean), forced?: boolean, includeSelf?: boolean): GameEvent | {} | null; getTrigger(): any; getRand(name: any): any; - _rand_map: {} | undefined; - _rand: number | undefined; - insert(content: any, map: any): GameEvent & import("./gameEventPromise.js").GameEventPromise; - insertAfter(content: any, map: any): GameEvent & import("./gameEventPromise.js").GameEventPromise; + _rand_map: {}; + _rand: number; + insert(content: any, map: any): GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + insertAfter(content: any, map: any): GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; backup(skill: any): this; _backup: any; filterButton: any; selectButton: any; filterTarget: any; selectTarget: any; - ignoreMod: boolean | undefined; + ignoreMod: boolean; filterCard2: any; filterCard: any; filterOk: any; @@ -305,12 +305,12 @@ export class GameEvent { isPhaseUsing(player: any): boolean; addTrigger(skills: any, player: any): this; removeTrigger(skills: any, player: any): this; - trigger(name: any): (GameEvent & import("./gameEventPromise.js").GameEventPromise) | null | undefined; - untrigger(all: boolean | undefined, player: any): this; + trigger(name: any): GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + untrigger(all: boolean, player: any): this; /** * 事件转为Promise化 */ - toPromise(): this & import("./gameEventPromise.js").GameEventPromise; + toPromise(): this & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; #private; } import { lib } from "../index.js"; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/element/gameEventPromise.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/element/gameEventPromise.d.ts index 8ca046c2b..93ff7357f 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/library/element/gameEventPromise.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/element/gameEventPromise.d.ts @@ -23,11 +23,11 @@ */ export class GameEventPromise extends Promise { /** - * @param { import('./gameEvent.js').GameEvent } arg + * @param { GameEvent } arg */ - constructor(arg: import('./gameEvent.js').GameEvent); + constructor(arg: GameEvent); /** 获取原事件对象 */ - toEvent(): import("./gameEvent.js").GameEvent; + toEvent(): import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent; /** * 在某个异步事件中调试变量信息 * diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/element/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/element/index.d.ts index 0b0417fb3..57432e197 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/library/element/index.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/element/index.d.ts @@ -10,3 +10,4 @@ export { GameEventPromise } from "./gameEventPromise.js"; export { NodeWS } from "./nodeWS.js"; export { Player } from "./player.js"; export { VCard } from "./vcard.js"; +export { Character } from "./character.js"; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/element/nodeWS.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/element/nodeWS.d.ts index 3a7c6e9ff..1e7572241 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/library/element/nodeWS.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/element/nodeWS.d.ts @@ -3,7 +3,7 @@ export class NodeWS { * @param {string | NodeWS} id */ constructor(id: string | NodeWS); - wsid: string | undefined; + wsid: string; send(message: any): void; on(type: any, func: any): void; close(): void; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/element/player.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/element/player.d.ts index be00c0882..93eef87df 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/library/element/player.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/element/player.d.ts @@ -2,7 +2,7 @@ export class Player extends HTMLDivElement { /** * @param {HTMLDivElement|DocumentFragment} [position] */ - constructor(position?: HTMLDivElement | DocumentFragment | undefined); + constructor(position?: HTMLDivElement | DocumentFragment); build(noclick: any): this; buildNode(): void; /** @type { SMap } */ @@ -125,7 +125,7 @@ export class Player extends HTMLDivElement { */ outCount: number; buildEventListener(noclick: any): void; - noclick: boolean | undefined; + noclick: boolean; /** * @type { number } */ @@ -207,7 +207,7 @@ export class Player extends HTMLDivElement { * @param { number } amount * @param { boolean } [limit] */ - changeFury(amount: number, limit?: boolean | undefined): void; + changeFury(amount: number, limit?: boolean): void; /** * version 1.7 * @@ -284,8 +284,8 @@ export class Player extends HTMLDivElement { /** * 让一名角色明置一些手牌 */ - addShownCards(...args: any[]): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined; - hideShownCards(...args: any[]): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined; + addShownCards(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + hideShownCards(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * 获取角色所有的明置手牌 */ @@ -295,24 +295,24 @@ export class Player extends HTMLDivElement { * @param { Player } [other] * @param { (card: Card) => boolean } [filter] */ - getKnownCards(other?: Player | undefined, filter?: ((card: Card) => boolean) | undefined): import("noname-typings/nonameModules/noname/library/element/card.js").Card[]; + getKnownCards(other?: Player, filter?: (card: Card) => boolean): import("noname-typings/nonameModules/noname/library/element/card.js").Card[]; /** * 判断此角色的手牌是否已经被看光了 * @param { Player } [other] */ - isAllCardsKnown(other?: Player | undefined): boolean; + isAllCardsKnown(other?: Player): boolean; /** * 判断此角色是否有被知的牌。 * @param { Player } [other] * @param { (card: Card) => boolean } [filter] */ - hasKnownCards(other?: Player | undefined, filter?: ((card: Card) => boolean) | undefined): boolean; + hasKnownCards(other?: Player, filter?: (card: Card) => boolean): boolean; /** * 数此角色被知道的牌 * @param { Player } [other] * @param { (card: Card) => boolean } [filter] */ - countKnownCards(other?: Player | undefined, filter?: ((card: Card) => boolean) | undefined): number; + countKnownCards(other?: Player, filter?: (card: Card) => boolean): number; /** * Execute the delay card effect * @@ -323,7 +323,7 @@ export class Player extends HTMLDivElement { * @param {*} judge2 * @returns */ - executeDelayCardEffect(card: Card | string, target: Player, judge: any, judge2: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + executeDelayCardEffect(card: Card | string, target: Player, judge: any, judge2: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * Check if the card does not count toward hand limit * @@ -338,7 +338,7 @@ export class Player extends HTMLDivElement { * @param { Card | Card[] } cards * @param { Player } target */ - gift(cards: Card | Card[], target: Player, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + gift(cards: Card | Card[], target: Player, ...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * Check if the player can gift the card * @@ -347,7 +347,7 @@ export class Player extends HTMLDivElement { * @param { Player } target * @param { boolean } [strict] */ - canGift(card: Card, target: Player, strict?: boolean | undefined): boolean; + canGift(card: Card, target: Player, strict?: boolean): boolean; /** * Check if the player refuses gifts * @@ -375,7 +375,7 @@ export class Player extends HTMLDivElement { * @param { (player: Player, cards: Card[]) => any } [recastingLose] * @param { (player: Player, cards: Card[]) => any } [recastingGain] */ - recast(cards: Card | Card[], recastingLose?: ((player: Player, cards: Card[]) => any) | undefined, recastingGain?: ((player: Player, cards: Card[]) => any) | undefined, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + recast(cards: Card | Card[], recastingLose?: (player: Player, cards: Card[]) => any, recastingGain?: (player: Player, cards: Card[]) => any, ...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * Check if the player can recast the card * @@ -384,7 +384,7 @@ export class Player extends HTMLDivElement { * @param { Player } [source] * @param { boolean } [strict] */ - canRecast(card: Card, source?: Player | undefined, strict?: boolean | undefined): boolean; + canRecast(card: Card, source?: Player, strict?: boolean): boolean; /** * 判断一名角色的某个区域是否被废除 * @@ -392,39 +392,39 @@ export class Player extends HTMLDivElement { * @param { string | number } [type] * @returns { boolean } */ - hasDisabledSlot(type?: string | number | undefined): boolean; + hasDisabledSlot(type?: string | number): boolean; /** * 判断一名角色的某个区域被废除的数量 * * 用法同 {@link hasDisabledSlot} * @param { string | number } [type] */ - countDisabledSlot(type?: string | number | undefined): number; + countDisabledSlot(type?: string | number): number; /** * 判断一名角色是否有某个装备栏空着 * @param { string | number } [type] * @returns { boolean } */ - hasEmptySlot(type?: string | number | undefined): boolean; + hasEmptySlot(type?: string | number): boolean; /** * 判断一名角色的某个装备栏空位的数量 * @param { string | number } [type] */ - countEmptySlot(type?: string | number | undefined): number; + countEmptySlot(type?: string | number): number; /** * 判断一名角色是否有可以用于装备新装备牌的区域(排除金箍棒和六龙等“不可被替换装备”) * * 用法同 {@link hasEnabledSlot} * @param { string | number } [type] */ - hasEquipableSlot(type?: string | number | undefined): boolean; + hasEquipableSlot(type?: string | number): boolean; /** * 统计一名角色有多少个可以用于装备新的装备牌的区域 * * 用法同 {@link hasEnabledSlot} * @param { string | number } [type] */ - countEquipableSlot(type?: string | number | undefined): number; + countEquipableSlot(type?: string | number): number; /** * 判断一名角色是否拥有未被废除的某个区域 * @@ -432,14 +432,14 @@ export class Player extends HTMLDivElement { * @param { string | number } [type] * @returns { boolean } */ - hasEnabledSlot(type?: string | number | undefined): boolean; + hasEnabledSlot(type?: string | number): boolean; /** * 判断一名角色的某个区域未被废除的数量 * * 用法同 {@link hasEnabledSlot} * @param { string | number } [type] */ - countEnabledSlot(type?: string | number | undefined): number; + countEnabledSlot(type?: string | number): number; /** * 获取一名角色装备区内某种类型的装备牌 * @@ -453,19 +453,19 @@ export class Player extends HTMLDivElement { * * 参数:废除来源角色(不写默认当前事件角色),废除区域(数字/区域字符串/数组,可以写多个,重复废除) */ - disableEquip(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + disableEquip(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * 新的恢复装备区 * * 参数:恢复来源角色(不写默认当前事件角色),恢复区域(数字/区域字符串/数组,可以写多个,重复恢复) */ - enableEquip(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + enableEquip(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * 新的扩展装备区 * * 参数:扩展来源角色(不写默认当前事件角色),扩展区域(数字/区域字符串/数组,可以写多个,重复扩展) */ - expandEquip(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + expandEquip(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * 判断判定区是否被废除 */ @@ -474,18 +474,18 @@ export class Player extends HTMLDivElement { * 同步显示扩展装备区状态 * @param { SMap } [map] */ - $syncExpand(map?: SMap | undefined): void; + $syncExpand(map?: SMap): void; /** * 同步装备区废除牌显示状态 * @param { SMap } [map] */ - $syncDisable(map?: SMap | undefined): void; + $syncDisable(map?: SMap): void; /** * @param { string | Card | VCard | CardBaseUIData } name * @param { boolean } [replace] * @returns */ - canEquip(name: string | Card | VCard | CardBaseUIData, replace?: boolean | undefined): boolean; + canEquip(name: string | Card | VCard | CardBaseUIData, replace?: boolean): boolean; /** * @deprecated */ @@ -506,7 +506,7 @@ export class Player extends HTMLDivElement { * @deprecated */ $enableEquip(): void; - chooseToDebate(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + chooseToDebate(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * 向target发起协力 * @param { Player } target @@ -514,12 +514,18 @@ export class Player extends HTMLDivElement { * @param {*} reason */ cooperationWith(target: Player, type: string, reason: any): void; - chooseCooperationFor(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + chooseCooperationFor(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; checkCooperationStatus(target: any, reason: any): boolean; removeCooperation(info: any): void; + /** + * @param { boolean } unseen 是否无视暗将的限制 + * @returns { string[] } + */ + getClans(unseen: boolean): string[]; /** * @param { string } clan 氏族名称 * @param { boolean } unseen 是否无视暗将的限制 + * @returns { boolean } */ hasClan(clan: string, unseen: boolean): boolean; /** @@ -558,7 +564,7 @@ export class Player extends HTMLDivElement { * @param { string } skill */ removeSkillBlocker(skill: string): void; - loseToSpecial(cards: any, tag: any, target: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + loseToSpecial(cards: any, tag: any, target: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * @param { Card | Card[] } cards * @param { string } tag @@ -568,7 +574,7 @@ export class Player extends HTMLDivElement { * @param { string } tag * @param { Card[] } [cards] */ - removeGaintag(tag: string, cards?: import("noname-typings/nonameModules/noname/library/element/card.js").Card[] | undefined): void; + removeGaintag(tag: string, cards?: Card[]): void; /** * @param { Player } target */ @@ -593,15 +599,15 @@ export class Player extends HTMLDivElement { * @param { 0 | 1 | 2 } num * @param { false } [log] */ - showCharacter(num: 0 | 1 | 2, log?: false | undefined, ...args: any[]): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined; + showCharacter(num: 0 | 1 | 2, log?: false, ...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * @param { 0 | 1 | 2 } num * @param { false } [log] */ - $showCharacter(num: 0 | 1 | 2, log?: false | undefined): void; - chooseToPlayBeatmap(beatmap: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseToMove(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseToGuanxing(num: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + $showCharacter(num: 0 | 1 | 2, log?: false): void; + chooseToPlayBeatmap(beatmap: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseToMove(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseToGuanxing(num: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * @param { Player } target * @param { string } name @@ -624,7 +630,7 @@ export class Player extends HTMLDivElement { * @param { string } [nature] * @param { string } [popname] */ - tryCardAnimate(card: Card, name: string, nature?: string | undefined, popname?: string | undefined, ...args: any[]): void; + tryCardAnimate(card: Card, name: string, nature?: string, popname?: string, ...args: any[]): void; /** * @param { string } name * @param { string } type @@ -647,7 +653,7 @@ export class Player extends HTMLDivElement { * * @param { boolean } [raw] */ - getHp(raw?: boolean | undefined): number; + getHp(raw?: boolean): number; /** * Set “raw” to true to get the player's raw damaged HP instead. * @@ -655,45 +661,45 @@ export class Player extends HTMLDivElement { * * @param { boolean } [raw] */ - getDamagedHp(raw?: boolean | undefined): number; + getDamagedHp(raw?: boolean): number; /** * @param { string } group */ - changeGroup(group: string, log: any, broadcast: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + changeGroup(group: string, log: any, broadcast: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * @param { Player } target */ - chooseToDuiben(target: Player): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + chooseToDuiben(target: Player): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * @param { Player } target */ - chooseToPSS(target: Player): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseToEnable(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseToDisable(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + chooseToPSS(target: Player): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseToEnable(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseToDisable(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * @param { boolean } [notmeisok] */ - isPhaseUsing(notmeisok?: boolean | undefined): boolean; + isPhaseUsing(notmeisok?: boolean): boolean; /** * @param { Player } target */ - swapEquip(target: Player): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + swapEquip(target: Player): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * @param { Player } target * @param { boolean } [goon] * @param { boolean} [bool] */ - canCompare(target: Player, goon?: boolean | undefined, bool?: boolean | undefined): boolean; + canCompare(target: Player, goon?: boolean, bool?: boolean): boolean; $disableJudge(): void; $enableJudge(): void; - disableJudge(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - enableJudge(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - init(character: any, character2: any, skill: any, update: any): this | undefined; + disableJudge(): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + enableJudge(): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + init(character: any, character2: any, skill: any, update: any): this; skin: { name: any; name2: any; - } | undefined; - singleHp: boolean | undefined; + }; + singleHp: boolean; $init(character: any, character2: any): this; /** * 换肤换音:想要支持某个武将更换皮肤,必须在lib.character.characterSubstitute中存在该武将的id(以下以name代指武将id,character代指换肤图片名) @@ -712,17 +718,17 @@ export class Player extends HTMLDivElement { avatar: any; uninitOL(): void; initRoom(info: any, info2: any): this; - serving: boolean | undefined; - roomempty: boolean | undefined; - roomfull: boolean | undefined; - roomgaming: boolean | undefined; + serving: boolean; + roomempty: boolean; + roomfull: boolean; + roomgaming: boolean; version: any; key: any; config: any; reinit2(newPairs: any): void; $reinit12(newPairs: any): void; $reinit21(newPairs: any): void; - reinit(from: any, to: any, maxHp: any, online: any): this | undefined; + reinit(from: any, to: any, maxHp: any, online: any): this; $reinit(from: any, to: any, maxHp: any, online: any): void; uninit(): this; $uninit(): void; @@ -732,13 +738,13 @@ export class Player extends HTMLDivElement { changeSeat(position: any, video: any): void; send(...args: any[]): this; getId(): this; - playerid: string | undefined; + playerid: string; throwEmotion(target: any, emotion: any, rotate: any): void; emotion(pack: any, id: any): void; chat(str: any): void; say(str: any): void; showGiveup(): void; - _giveUp: boolean | undefined; + _giveUp: boolean; applySkills(skills: any): void; getState(): { hp: number; @@ -750,21 +756,21 @@ export class Player extends HTMLDivElement { name1: string; name2: string; handcards: import("noname-typings/nonameModules/noname/library/element/card.js").Card[]; - gaintag: never[]; + gaintag: any[]; equips: import("noname-typings/nonameModules/noname/library/element/card.js").Card[]; judges: import("noname-typings/nonameModules/noname/library/element/card.js").Card[]; specials: import("noname-typings/nonameModules/noname/library/element/card.js").Card[]; expansions: import("noname-typings/nonameModules/noname/library/element/card.js").Card[]; - expansion_gaintag: never[]; + expansion_gaintag: any[]; disableJudge: boolean; disabledSlots: SMap; expandedSlots: SMap; - views: never[]; + views: any[]; position: number; hujia: number; side: any; - identityShown: boolean | undefined; - identityNode: (string | undefined)[]; + identityShown: boolean; + identityNode: string[]; identity: string; dead: boolean; linked: boolean; @@ -796,8 +802,8 @@ export class Player extends HTMLDivElement { num(arg1: any, arg2: any, arg3: any): any; line(target: any, config: any): void; line2(targets: any, config: any): void; - getNext(): this | null; - getPrevious(): this | null; + getNext(): this; + getPrevious(): this; countUsed(card: any, type: any): number; getCacheKey(): string; countSkill(skill: any): any; @@ -813,34 +819,34 @@ export class Player extends HTMLDivElement { * @param { string | Record | ((card: Card) => boolean) } [arg2] * @returns { Iterable } */ - iterableGetCards(arg1?: string | undefined, arg2?: string | Record | ((card: Card) => boolean) | undefined): Iterable; + iterableGetCards(arg1?: string, arg2?: string | Record | ((card: Card) => boolean)): Iterable; /** * @param { string } [arg1='h'] * @param { string | Record | ((card: Card) => boolean) } [arg2] * @returns { Card[] } */ - getCards(arg1?: string | undefined, arg2?: string | Record | ((card: Card) => boolean) | undefined): Card[]; - iterableGetDiscardableCards(player: any, arg1: any, arg2: any): Generator; - getDiscardableCards(player: any, arg1: any, arg2: any): import("noname-typings/nonameModules/noname/library/element/card.js").Card[]; + getCards(arg1?: string, arg2?: string | Record | ((card: Card) => boolean)): Card[]; + iterableGetDiscardableCards(player: any, arg1: any, arg2: any): Generator; + getDiscardableCards(player: any, arg1: any, arg2: any): any[]; /** * @param {Parameters[1]} player * @param {Parameters[0]} arg1 * @param {Parameters[1]} arg2 */ - iterableGetGainableCards(player: [card?: any, player?: any, target?: any, event?: any][1], arg1: Parameters[0], arg2: Parameters[1]): Generator; + iterableGetGainableCards(player: [card?: any, player?: any, target?: any, event?: any][1], arg1: Parameters[0], arg2: Parameters[1]): Generator; /** * * @param {Parameters[0]} player * @param {Parameters[1]} [arg1] * @param {Parameters[2]} [arg2] */ - getGainableCards(player: Parameters[0], arg1?: Parameters[1] | undefined, arg2?: Parameters[2] | undefined): import("noname-typings/nonameModules/noname/library/element/card.js").Card[]; + getGainableCards(player: Parameters[0], arg1?: Parameters[1], arg2?: Parameters[2]): any[]; getGainableSkills(func: any): any[]; /** * @param { Parameters[0] } [arg1] * @param { Parameters[1] } [arg2] */ - countCards(arg1?: Parameters[0] | undefined, arg2?: Parameters[1] | undefined): number; + countCards(arg1?: Parameters[0], arg2?: Parameters[1]): number; getCardIndex(arg1: any, name: any, card: any, max: any): number; countDiscardableCards(player: any, arg1: any, arg2: any): number; /** @@ -848,7 +854,7 @@ export class Player extends HTMLDivElement { * @param {Parameters[1]} [arg1] * @param {Parameters[2]} [arg2] */ - countGainableCards(player: Parameters[0], arg1?: Parameters[1] | undefined, arg2?: Parameters[2] | undefined): number; + countGainableCards(player: Parameters[0], arg1?: Parameters[1], arg2?: Parameters[2]): number; getOriginalSkills(): any[]; getModableSkills(): any[]; /** @@ -856,61 +862,61 @@ export class Player extends HTMLDivElement { * @param { boolean | null} [arg3] * @param {boolean} [arg4] */ - getSkills(arg2?: string | boolean | null | undefined, arg3?: boolean | null | undefined, arg4?: boolean | undefined): any[]; - get(arg1: any, arg2: any, arg3: any, arg4: any, ...args: any[]): any[] | ChildNode | undefined; + getSkills(arg2?: string | boolean | null, arg3?: boolean | null, arg4?: boolean): any[]; + get(arg1: any, arg2: any, arg3: any, arg4: any, ...args: any[]): any[] | ChildNode; syncStorage(skill: any): void; syncSkills(): void; playerfocus(time: any): this; setIdentity(identity: any, nature: any): this; - insertPhase(skill: any, insert: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - insertEvent(name: any, content: any, arg: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - phase(skill: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - phaseZhunbei(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - phaseJudge(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - phaseDraw(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - phaseUse(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - phaseDiscard(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - phaseJieshu(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseToUse(use: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseToRespond(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseToGive(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseToDiscard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseToCompare(target: any, check: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + insertPhase(skill: any, insert: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + insertEvent(name: any, content: any, arg: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + phase(skill: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + phaseZhunbei(): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + phaseJudge(): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + phaseDraw(): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + phaseUse(): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + phaseDiscard(): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + phaseJieshu(): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseToUse(use: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseToRespond(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseToGive(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseToDiscard(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseToCompare(target: any, check: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; chooseSkill(target: any, ...args: any[]): void; - discoverCard(list: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseCardButton(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseVCardButton(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseButton(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseButtonOL(list: any, callback: any, ai: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseCardOL(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseCard(choose: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseUseTarget(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseTarget(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseCardTarget(choose: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseControlList(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseControl(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseBool(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - chooseDrawRecover(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - choosePlayerCard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - discardPlayerCard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - gainPlayerCard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - showHandcards(str: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - showCards(cards: any, str: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - viewCards(str: any, cards: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - viewHandcards(target: any): false | (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise); + discoverCard(list: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseCardButton(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseVCardButton(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseButton(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseButtonOL(list: any, callback: any, ai: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseCardOL(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseCard(choose: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseUseTarget(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseTarget(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseCardTarget(choose: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseControlList(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseControl(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseBool(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + chooseDrawRecover(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + choosePlayerCard(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + discardPlayerCard(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + gainPlayerCard(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + showHandcards(str: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + showCards(cards: any, str: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + viewCards(str: any, cards: any, ...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + viewHandcards(target: any): false | (import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise); canMoveCard(withatt: any, nojudge: any, ...args: any[]): boolean; - moveCard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - useResult(result: any, event: any): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined; - useCard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - useSkill(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - drawTo(num: any, args: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - draw(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + moveCard(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + useResult(result: any, event: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + useCard(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + useSkill(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + drawTo(num: any, args: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + draw(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; randomDiscard(...args: any[]): import("noname-typings/nonameModules/noname/library/element/card.js").Card[]; randomGain(...args: any[]): any; - discard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - loseToDiscardpile(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - respond(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - swapHandcards(target: any, cards1: any, cards2: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + discard(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + loseToDiscardpile(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + respond(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + swapHandcards(target: any, cards1: any, cards2: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; directequip(cards: any): void; $addToExpansion(cards: any, broadcast: any, gaintag: any): this; directgain(cards: any, broadcast: any, gaintag: any): this; @@ -920,52 +926,52 @@ export class Player extends HTMLDivElement { * @param { Player[] } targets * @param { string } [position] */ - gainMultiple(targets: Player[], position?: string | undefined): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - gain(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - addToExpansion(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + gainMultiple(targets: Player[], position?: string): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + gain(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + addToExpansion(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * * @param { Card | Card[] } cards * @param { Player } target * @param { boolean } [visible] */ - give(cards: Card | Card[], target: Player, visible?: boolean | undefined): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - lose(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - damage(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - recover(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - recoverTo(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - doubleDraw(): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + give(cards: Card | Card[], target: Player, visible?: boolean): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + lose(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + damage(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + recover(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + recoverTo(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + doubleDraw(): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * @param { number } [num] */ - loseHp(num?: number | undefined): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - loseMaxHp(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - gainMaxHp(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - changeHp(num: any, popup: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - changeHujia(num: any, type: any, limit: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + loseHp(num?: number): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + loseMaxHp(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + gainMaxHp(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + changeHp(num: any, popup: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + changeHujia(num: any, type: any, limit: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; getBuff(...args: any[]): this; getDebuff(...args: any[]): this; - dying(reason: any): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined; - die(reason: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + dying(reason: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + die(reason: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; revive(hp: any, log: any): void; isMad(): boolean; goMad(end: any): void; unMad(): void; tempHide(): void; addExpose(num: any): this; - equip(card: any, draw: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - addJudge(card: any, cards: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + equip(card: any, draw: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + addJudge(card: any, cards: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * @returns { boolean } */ canAddJudge(card: any): boolean; addJudgeNext(card: any, unlimited: any): void; - judge(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; - turnOver(bool: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + judge(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + turnOver(bool: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; out(skill: any): void; - outSkills: any[] | undefined; + outSkills: any[]; in(skill: any): void; - link(bool: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + link(bool: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; skip(name: any): void; wait(callback: any): void; unwait(result: any): void; @@ -976,7 +982,7 @@ export class Player extends HTMLDivElement { * @param { boolean | string } [nature] * @param { boolean } [logv] */ - logSkill(name: string | string[], targets?: Player | Player[] | undefined, nature?: string | boolean | undefined, logv?: boolean | undefined): void; + logSkill(name: string | string[], targets?: Player | Player[], nature?: boolean | string, logv?: boolean): void; unprompt(): void; prompt(str: any, nature: any): void; prompt_old(name2: any, className: any): void; @@ -986,7 +992,7 @@ export class Player extends HTMLDivElement { * @param { string } className * @param { Parameters[3] } [nobroadcast] */ - popup(name: string, className?: string, nobroadcast?: Parameters[3] | undefined): void; + popup(name: string, className?: string, nobroadcast?: Parameters[3]): void; popup_old(name: any, className: any): HTMLDivElement; _popup(): void; showTimer(time: any): void; @@ -1008,7 +1014,7 @@ export class Player extends HTMLDivElement { markSkill(name: any, info: any, card: any, nobroadcast: any): this; unmarkSkill(name: any, nobroadcast: any): this; markSkillCharacter(id: any, target: any, name: any, content: any, nobroadcast: any): this; - markCharacter(name: any, info: any, learn: any, learn2: any): HTMLDivElement | undefined; + markCharacter(name: any, info: any, learn: any, learn2: any): HTMLDivElement; mark(name: any, info: any, skill: any): any; unmark(name: any, info: any): void; addLink(): void; @@ -1020,32 +1026,32 @@ export class Player extends HTMLDivElement { * @param { GameEventPromise | boolean } [includecard] * @returns { boolean } */ - canUse(card: string | Card | VCard, target: Player, distance?: boolean | undefined, includecard?: boolean | import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): boolean; + canUse(card: string | Card | VCard, target: Player, distance?: boolean, includecard?: GameEventPromise | boolean): boolean; hasUseTarget(card: any, distance: any, includecard: any): boolean; hasValueTarget(card: any, distance: any, includecard: any): boolean; getUseValue(card: any, distance: any, includecard: any): number; addSubPlayer(cfg: any): string; removeSubPlayer(name: any): void; - callSubPlayer(...args: any[]): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined; - toggleSubPlayer(...args: any[]): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined; - exitSubPlayer(remove: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + callSubPlayer(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + toggleSubPlayer(...args: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + exitSubPlayer(remove: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; getSubPlayers(tag: any): any[]; addSkillTrigger(skills: any, hidden: any, triggeronly: any): this; - _hookTrigger: any[] | undefined; - addSkillLog(skill: any): this | undefined; - removeSkillLog(skill: any, popup: any): this | undefined; + _hookTrigger: any[]; + addSkillLog(skill: any): this; + removeSkillLog(skill: any, popup: any): this; addInvisibleSkill(skill: any): void; removeInvisibleSkill(skill: any, ...args: any[]): any; - addSkills(skill: any): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined; - removeSkills(skill: any): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined; - changeSkills(addSkill?: any[], removeSkill?: any[]): (import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise) | undefined; + addSkills(skill: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + removeSkills(skill: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; + changeSkills(addSkill?: any[], removeSkill?: any[]): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; addSkill(skill: any, checkConflict: any, nobroadcast: any, addToSkills: any): any; - addAdditionalSkills(skill: any, skillsToAdd: any, keep: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + addAdditionalSkills(skill: any, skillsToAdd: any, keep: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; addAdditionalSkill(skill: any, skillsToAdd: any, keep: any): this; $removeAdditionalSkills(skill: any, target: any): void; getRemovableAdditionalSkills(skill: any, target: any): string[]; removeAdditionalSkill(skill: any, target: any): this; - removeAdditionalSkills(skill: any, target: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + removeAdditionalSkills(skill: any, target: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; awakenSkill(skill: any, nounmark: any): this; restoreSkill(skill: any, nomark: any): this; disableSkill(skill: any, skills: any): this; @@ -1055,21 +1061,21 @@ export class Player extends HTMLDivElement { removeEquipTrigger(card: any): this; removeSkillTrigger(skills: any, triggeronly: any): this; removeSkill(skill: any, ...args: any[]): any; - addTempSkills(skillsToAdd: any, expire: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; + addTempSkills(skillsToAdd: any, expire: any): import("./gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise; /** * @overload * @param { string } skill * @param { SkillTrigger | string } [expire] * @param { boolean } [checkConflict] */ - addTempSkill(skill: string, expire?: string | SkillTrigger | undefined, checkConflict?: boolean | undefined): any; + addTempSkill(skill: string, expire?: SkillTrigger | string, checkConflict?: boolean): any; /** * @overload * @param { string[] } skill * @param { SkillTrigger } [expire] * @param { boolean } [checkConflict] */ - addTempSkill(skill: string[], expire?: SkillTrigger | undefined, checkConflict?: boolean | undefined): any; + addTempSkill(skill: string[], expire?: SkillTrigger, checkConflict?: boolean): any; tempBanSkill(skill: any, expire: any, log: any): any; isTempBanned(skill: any): boolean; attitudeTo(target: any): any; @@ -1104,14 +1110,14 @@ export class Player extends HTMLDivElement { * @param { GameEventPromise } [last] * @returns { ActionHistory[T] } */ - getHistory(key: T, filter?: ((event: GameEventPromise) => boolean) | undefined, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): ActionHistory[T]; + getHistory(key: T, filter?: (event: GameEventPromise) => boolean, last?: GameEventPromise): ActionHistory[T]; /** * @template { keyof ActionHistory } T * @param { T } key * @param { (event: GameEventPromise) => boolean } filter * @param { GameEventPromise } [last] */ - checkHistory(key: T_1, filter: (event: GameEventPromise) => boolean, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): void; + checkHistory(key: T_1, filter: (event: GameEventPromise) => boolean, last?: GameEventPromise): void; /** * @template { keyof ActionHistory } T * @param { T } key @@ -1119,7 +1125,7 @@ export class Player extends HTMLDivElement { * @param { GameEventPromise } [last] * @returns { boolean } */ - hasHistory(key: T_2, filter?: ((event: GameEventPromise) => boolean) | undefined, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): boolean; + hasHistory(key: T_2, filter?: (event: GameEventPromise) => boolean, last?: GameEventPromise): boolean; /** * @template { keyof ActionHistory } T * @overload @@ -1128,14 +1134,14 @@ export class Player extends HTMLDivElement { * @param { GameEventPromise } [last] * @returns { null | ActionHistory[T] | boolean } */ - getLastHistory(key?: T_3 | undefined, filter?: ((event: GameEventPromise) => boolean) | undefined, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): boolean | ActionHistory[T_3] | null; + getLastHistory(key?: T_3, filter?: (event: GameEventPromise) => boolean, last?: GameEventPromise): boolean | ActionHistory[T_3]; /** * @template { keyof ActionHistory } T * @param { T } key * @param { (event: GameEventPromise) => boolean } filter * @param { GameEventPromise } [last] */ - checkAllHistory(key: T_4, filter: (event: GameEventPromise) => boolean, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): void; + checkAllHistory(key: T_4, filter: (event: GameEventPromise) => boolean, last?: GameEventPromise): void; /** * @template { keyof ActionHistory } T * @param { T } [key] @@ -1143,7 +1149,7 @@ export class Player extends HTMLDivElement { * @param { GameEventPromise } [last] * @returns { ActionHistory[T] } */ - getAllHistory(key?: T_5 | undefined, filter?: ((event: GameEventPromise) => boolean) | undefined, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): ActionHistory[T_5]; + getAllHistory(key?: T_5, filter?: (event: GameEventPromise) => boolean, last?: GameEventPromise): ActionHistory[T_5]; /** * @template { keyof ActionHistory } T * @param { T } key @@ -1151,19 +1157,19 @@ export class Player extends HTMLDivElement { * @param { GameEventPromise } [last] * @returns { boolean } */ - hasAllHistory(key: T_6, filter: (event: GameEventPromise) => boolean, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): boolean; - getLastUsed(num: any): import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | null; + hasAllHistory(key: T_6, filter: (event: GameEventPromise) => boolean, last?: GameEventPromise): boolean; + getLastUsed(num: any): import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise; getStat(key: any): any; getLastStat(key: any): any; queue(time: any): void; - queueTimeout: NodeJS.Timeout | undefined; + queueTimeout: NodeJS.Timeout; getCardUsable(card: any, pure: any): number; getAttackRange(raw: any): number; getEquipRange(cards: any): number; getGlobalFrom(): number; getGlobalTo(): number; getHandcardLimit(): number; - getEnemies(func: any): import("noname-typings/nonameModules/noname/library/element/player.js").Player[] | undefined; + getEnemies(func: any): import("noname-typings/nonameModules/noname/library/element/player.js").Player[]; getFriends(func: any): any[]; isEnemyOf(...args: any[]): boolean; isFriendOf(player: any): boolean; @@ -1199,7 +1205,7 @@ export class Player extends HTMLDivElement { * @param { (card?: Card, player?: Player) => boolean } [filter] * @param { boolean } [pure] */ - needsToDiscard(add?: number | import("noname-typings/nonameModules/noname/library/element/card.js").Card | import("noname-typings/nonameModules/noname/library/element/card.js").Card[] | undefined, filter?: ((card?: Card, player?: Player) => boolean) | undefined, pure?: boolean | undefined): number; + needsToDiscard(add?: number | Card[] | Card, filter?: (card?: Card, player?: Player) => boolean, pure?: boolean): number; distanceTo(target: any, method: any): number; distanceFrom(target: any, method: any): number; /** @@ -1225,7 +1231,7 @@ export class Player extends HTMLDivElement { * @param {string} skill * @param {Player} [player] */ - hasZhuSkill(skill: string, player?: Player | undefined): boolean; + hasZhuSkill(skill: string, player?: Player): boolean; hasGlobalTag(tag: any, arg: any): boolean; /** * @param {string} tag @@ -1233,7 +1239,7 @@ export class Player extends HTMLDivElement { * @param {Parameters[2]} arg * @param {boolean} [globalskill] */ - hasSkillTag(tag: string, hidden: Parameters[0], arg: [player: import("noname-typings/nonameModules/noname/library/element/player.js").Player, tag: string, arg: any][2], globalskill?: boolean | undefined): boolean; + hasSkillTag(tag: string, hidden: Parameters[0], arg: [player: import("noname-typings/nonameModules/noname/library/element/player.js").Player, tag: string, arg: any][2], globalskill?: boolean): boolean; hasJudge(name: any): boolean; hasFriend(): boolean; hasUnknown(num: any): boolean; @@ -1244,13 +1250,13 @@ export class Player extends HTMLDivElement { * @param {string|boolean} [respond] * @param {boolean} [noauto] */ - hasSha(respond?: string | boolean | undefined, noauto?: boolean | undefined): boolean; + hasSha(respond?: string | boolean, noauto?: boolean): boolean; hasShan(respond: any): boolean; mayHaveSha(viewer: any, type: any, ignore: any, rvt: any): number | boolean; mayHaveShan(viewer: any, type: any, ignore: any, rvt: any): number | boolean; hasCard(name: any, position: any): boolean; - getEquip(name: any): import("noname-typings/nonameModules/noname/library/element/card.js").Card | null; - getJudge(name: any): ChildNode | null; + getEquip(name: any): import("noname-typings/nonameModules/noname/library/element/card.js").Card; + getJudge(name: any): ChildNode; $drawAuto(cards: any, target: any): void; $draw(num: any, init: any, config: any): void; $compareMultiple(card1: any, targets: any, cards: any): void; @@ -1262,12 +1268,12 @@ export class Player extends HTMLDivElement { $throwxy(card: any, left: any, top: any): any; $throwxy2(card: any, left: any, top: any, trans: any, flipx: any, flipy: any, ...args: any[]): any; throwDice(num: any): void; - $giveAuto(card: any, player: any, ...args: any[]): void; + $giveAuto(card: any, player: any, ...args: any[]): any; $give(card: any, player: any, log: any, init: any): void; $handleEquipChange(): void; $equip(card: any): this; $gain(card: any, log: any, init: any): void; - $gain2(cards: any, log: any): true | undefined; + $gain2(cards: any, log: any): boolean; $skill(name: any, type: any, color: any, avatar: any): void; $fire(): void; $thunder(): void; @@ -1288,7 +1294,7 @@ export class Player extends HTMLDivElement { * @param { boolean } [font] * @param { boolean } [nobroadcast] */ - $damagepop(num: number | string, nature?: string | undefined, font?: boolean | undefined, nobroadcast?: boolean | undefined): void; + $damagepop(num: number | string, nature?: string, font?: boolean, nobroadcast?: boolean): void; $damage(source: any, ...args: any[]): void; $die(): void; $dieflip(type: any): void; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/element/vcard.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/element/vcard.d.ts index 5b04b8a3b..fb220de8c 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/library/element/vcard.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/element/vcard.d.ts @@ -5,7 +5,7 @@ export class VCard { * @param { string } [name] * @param { string } [nature] */ - constructor(suitOrCard?: any, numberOrCards?: number | import("noname-typings/nonameModules/noname/library/element/card.js").Card[] | undefined, name?: string | undefined, nature?: string | undefined); + constructor(suitOrCard?: any, numberOrCards?: number | Card[], name?: string, nature?: string); /** * @type {string} */ @@ -22,7 +22,7 @@ export class VCard { * @type {string} */ nature: string; - color: string | undefined; + color: string; /** * @type { boolean } */ diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/index.d.ts index 38a4c0d53..77f3222c6 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/library/index.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/index.d.ts @@ -230,7 +230,7 @@ export class Library { yingbian: { condition: { color: Map; - complex: Map Element.GameEvent & Element.GameEventPromise>; + complex: Map Element.GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent & import("noname-typings/nonameModules/noname/library/element/gameEventPromise.js").GameEventPromise>; simple: Map any>; }; effect: Map void>; @@ -346,7 +346,7 @@ export class Library { restart: boolean; unfrequent: boolean; intro: string; - onclick(bool: any): false | undefined; + onclick(bool: any): boolean; }; swipe: { name: string; @@ -367,7 +367,7 @@ export class Library { chat: string; off: string; }; - onclick(item: any): false | undefined; + onclick(item: any): boolean; }; swipe_up: { name: string; @@ -382,7 +382,7 @@ export class Library { chat: string; off: string; }; - onclick(item: any): false | undefined; + onclick(item: any): boolean; }; swipe_left: { name: string; @@ -397,7 +397,7 @@ export class Library { chat: string; off: string; }; - onclick(item: any): false | undefined; + onclick(item: any): boolean; }; swipe_right: { name: string; @@ -412,7 +412,7 @@ export class Library { chat: string; off: string; }; - onclick(item: any): false | undefined; + onclick(item: any): boolean; }; round_menu_func: { name: string; @@ -425,7 +425,7 @@ export class Library { pause: string; auto: string; }; - onclick(item: any): false | undefined; + onclick(item: any): boolean; }; show_splash: { name: string; @@ -471,7 +471,7 @@ export class Library { config: string; auto: string; }; - onclick(item: any): false | undefined; + onclick(item: any): boolean; }; longpress_info: { name: string; @@ -533,6 +533,20 @@ export class Library { }; unfrequent: boolean; }; + video_default_play_speed: { + name: string; + init: string; + intro: string; + item: { + "0.25x": string; + "0.5x": string; + "1x": string; + "1.5x": string; + "2x": string; + "4x": string; + }; + unfrequent: boolean; + }; max_loadtime: { name: string; intro: string; @@ -710,7 +724,7 @@ export class Library { phonelayout: { name: string; init: boolean; - onclick(bool: any): false | undefined; + onclick(bool: any): boolean; }; change_skin: { name: string; @@ -1338,7 +1352,7 @@ export class Library { name: string; init: boolean; unfrequent: boolean; - onclick(bool: any): false | undefined; + onclick(bool: any): boolean; }; remember_round_button: { name: string; @@ -3331,7 +3345,7 @@ export class Library { setScroll(node: any): any; setMousewheel(node: any): void; setLongPress(node: any, func: any): any; - updateCanvas(time: any): false | undefined; + updateCanvas(time: any): boolean; run(time: any): void; getUTC(date: any): any; saveVideo(): void; @@ -3353,7 +3367,7 @@ export class Library { typeEquals: (...args: any[]) => boolean; }; creation: { - readonly array: never[]; + readonly array: any[]; readonly object: {}; readonly nullObject: any; readonly string: string; @@ -3438,7 +3452,7 @@ export class Library { * @param { number | true } [i] 指定game.players的第几个元素,不填指定为自己的下家。为true时切换玩家布局 * @param { string } [skin] 皮肤id */ - p(name: string, i?: number | true | undefined, skin?: string | undefined): void; + p(name: string, i?: number | true, skin?: string): void; /** * @overload * @description 不传参数默认装备麒麟弓,八卦阵,的卢,赤兔,木牛 @@ -3495,24 +3509,24 @@ export class Library { * 炉石模式可用,使用'spell_yexinglanghun'卡牌 * @param { boolean } [me] 决定是自己还是对手使用'spell_yexinglanghun'卡牌 */ - uy(me?: boolean | undefined): void; + uy(me?: boolean): void; /** * 炉石模式可用,使用`spell_${name}`卡牌 * @param { string } [name] * @param { boolean } [act] */ - gs(name?: string | undefined, act?: boolean | undefined): void; + gs(name?: string, act?: boolean): void; /** * 炉石模式可用,获得`stone_${name}_stonecharacter`卡牌 * @param { string } [name] * @param { boolean } [act] */ - gc(name?: string | undefined, act?: boolean | undefined): void; + gc(name?: string, act?: boolean): void; /** * 进入/关闭快速自动测试模式(游戏速度最快),只有游戏记录界面 * @param { boolean | string } [bool] */ - a(bool?: string | boolean | undefined): void; + a(bool?: boolean | string): void; /** * 临时去掉“自动测试模式”带来的css效果, * @@ -3541,7 +3555,7 @@ export class Library { * 输出每个强度的武将数量、每个武将包的每个强度的武将数量、每个武将对应的id和翻译 * @param { boolean } [bool] 为false不输出无名杀自带的武将id和翻译 */ - r(bool?: boolean | undefined): void; + r(bool?: boolean): void; /** * 打印目标玩家的手牌 * @param { Player } player @@ -3608,7 +3622,7 @@ export class Library { * 指定的玩家或自己立即获得诸葛连弩,青龙刀,八卦阵,的卢,赤兔,木牛 * @param { Player } [target] */ - ge(target?: Element.Player | undefined): void; + ge(target?: Player): void; /** * 自己立即获得闪电,火山,洪水,乐不思蜀,鬼幽结 */ @@ -3622,7 +3636,7 @@ export class Library { * @param { number } [num] * @param { Player } [target] */ - d(num?: number | undefined, target?: Element.Player | undefined): void; + d(num?: number, target?: Player): void; /** * 给自己立刻添加一个或多个技能 * @param {...string} args 技能名 @@ -3635,7 +3649,7 @@ export class Library { * * @param { number | Player } [num] */ - t(num?: number | Element.Player | undefined): void; + t(num?: number | Player): void; /** * 自己以外的其他玩家弃置所有牌 */ @@ -3689,6 +3703,8 @@ export class Library { none2: string; red: string; black: string; + red2: string; + black2: string; ok: string; ok2: string; cancel: string; @@ -4006,6 +4022,7 @@ export class Library { Control: typeof Element.Control; Client: typeof Element.Client; NodeWS: typeof Element.NodeWS; + Character: typeof Element.Character; ws: { onopen: () => void; onmessage: (messageevent: any) => void; @@ -4044,6 +4061,10 @@ export class Library { * @legacy Use {@link lib.element.NodeWS.prototype} instead. */ readonly nodews: Element.NodeWS; + /** + * @legacy Use {@link lib.element.Character.prototype} instead. + */ + readonly character: Element.Character; }; card: { /** @@ -4185,7 +4206,7 @@ export class Library { * @param { Player } target * @param { boolean } [strict] */ - cardGiftable: (card: Card, player: Player, target: Player, strict?: boolean | undefined) => boolean; + cardGiftable: (card: Card, player: Player, target: Player, strict?: boolean) => boolean; /** * Check if the card is recastable * @@ -4195,7 +4216,7 @@ export class Library { * @param { Player } [source] * @param { boolean } [strict] */ - cardRecastable: (card: Card, player?: Player, source?: Element.Player | undefined, strict?: boolean | undefined) => boolean; + cardRecastable: (card: Card, player?: Player, source?: Player, strict?: boolean) => boolean; /** * @param { Card } card * @param { Player } player @@ -4222,7 +4243,7 @@ export class Library { * @returns {boolean} */ filterEnable: (event: GameEvent, player: Player, skill: string) => boolean; - characterDisabled: (i: any, libCharacter: any) => true | undefined; + characterDisabled: (i: any, libCharacter: any) => boolean; characterDisabled2: (i: any) => boolean; skillDisabled: (skill: any) => boolean; cardEnabled: (card: any, player: any, event: any) => any; @@ -4246,11 +4267,11 @@ export class Library { attackFrom: (card: any, player: any, target: any) => boolean; globalFrom: (card: any, player: any, target: any) => boolean; selectCard: () => number[]; - selectTarget: (card: any, player: any) => number | number[] | (() => number | Select) | undefined; + selectTarget: (card: any, player: any) => number | number[] | (() => number | Select); judge: (card: any, player: any, target: any) => any; autoRespondSha: () => boolean; autoRespondShan: () => boolean; - wuxieSwap: (event: any) => true | undefined; + wuxieSwap: (event: any) => boolean; }; sort: { nature: (a: any, b: any) => number; @@ -4427,7 +4448,7 @@ export class Library { phaseName: string[]; quickVoice: string[]; other: { - ignore: () => undefined; + ignore: () => any; }; InitFilter: { noZhuHp: string; @@ -4437,7 +4458,7 @@ export class Library { configOL: any; } export let lib: Library; -export function setLibrary(instance?: Library | undefined): void; +export function setLibrary(instance?: InstanceType): void; export type Player = InstanceType; export type Card = InstanceType; export type VCard = InstanceType; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/init/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/init/index.d.ts index 8b04c7075..3b626cdda 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/library/init/index.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/init/index.d.ts @@ -12,7 +12,7 @@ export class LibInit { sheet(...args: any[]): HTMLStyleElement; css(path: any, file: any, before: any): HTMLLinkElement; jsForExtension(path: any, file: any, onLoad: any, onError: any): void; - js(path: any, file: any, onLoad: any, onError: any): HTMLScriptElement | undefined; + js(path: any, file: any, onLoad: any, onError: any): HTMLScriptElement; /** * 同步lib.init.js * @returns { void } @@ -22,7 +22,7 @@ export class LibInit { /** * 同步lib.init.req */ - reqSync(str: any, onload: any, onerror: any, master: any): string | undefined; + reqSync(str: any, onload: any, onerror: any, master: any): string; json(url: any, onload: any, onerror: any): void; /** * 同步lib.init.json @@ -37,7 +37,7 @@ export class LibInit { * @param {Function} [scope] 作用域 * @returns */ - parsex(item: any, scope?: Function | undefined): any; + parsex(item: any, scope?: Function): any; eval(func: any): any; encode(strUni: any): string; decode(str: any): string; @@ -48,5 +48,13 @@ export class LibInit { * @param {*} url 传入import.meta.url */ getCurrentFileLocation(url: any): string; + /** + * @param {string | URL} link - 需要解析的路径 + * @param {((item: string) => string) | null} [defaultHandle] - 在给定路径不符合可用情况(或基于无名杀相关默认情况)时,处理路径的函数,返回的路径应是相对于根目录的相对路径,默认为`null`,当且仅当无法解析成`URL`时会调用该回调 + * @param {((item: URL) => unknown) | null} [loadAsDataUrlCallback] - 若存在值,则将资源加载为[Data URL](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Basics_of_HTTP/Data_URLs),然后传入进回调函数 + * @param {boolean} [dbNow] - 此刻是否在解析数据库中的内容,请勿直接使用 + * @returns {URL} + */ + parseResourceAddress(link: string | URL, defaultHandle?: (item: string) => string, loadAsDataUrlCallback?: (item: URL) => unknown, dbNow?: boolean): URL; } import { LibInitPromises } from "./promises.js"; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/init/promises.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/init/promises.d.ts index 385fdfb28..04c945991 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/library/init/promises.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/init/promises.d.ts @@ -6,7 +6,7 @@ export class LibInitPromises { * @param {string | string[]} [file] - 文件名或文件名组,忽略则直接读取`path`的内容 * @returns {Promise} */ - js(path: string, file?: string | string[] | undefined): Promise; + js(path: string, file?: string | string[]): Promise; /** * Promise版的`lib.init.css` * @@ -16,7 +16,7 @@ export class LibInitPromises { * @param {boolean} [noerror = false] - 是否忽略报错 * @returns {Promise} */ - css(path: string, file?: string | string[] | undefined, before?: Element | undefined, noerror?: boolean | undefined): Promise; + css(path: string, file?: string | string[], before?: Element, noerror?: boolean): Promise; /** * Promise版的`lib.init.req` * @@ -24,7 +24,7 @@ export class LibInitPromises { * @param {string} [master] * @returns {Promise} */ - req(str: string, master?: string | undefined): Promise; + req(str: string, master?: string): Promise; /** * Promise版的`lib.init.json` * @@ -38,4 +38,19 @@ export class LibInitPromises { * @returns {Promise} */ sheet(): Promise; + /** + * @async + * @param {string | URL} link - 需要解析的路径 + * @param {((item: string) => string) | null} [defaultHandle] - 在给定路径不符合可用情况(或基于无名杀相关默认情况)时,处理路径的函数,返回的路径应是相对于根目录的相对路径,默认为`null`,当且仅当无法解析成`URL`时会调用该回调 + * @param {boolean} [forceLoadAsDataUrl] - 是否将资源加载为[Data URL](https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Basics_of_HTTP/Data_URLs),默认为`false` + * @returns {Promise} + */ + parseResourceAddress(link: string | URL, defaultHandle?: (item: string) => string, forceLoadAsDataUrl?: boolean): Promise; + /** + * @async + * @param {string | URL} link - 需要解析的路径 + * @param {((item: string) => string) | null} [defaultHandle] - 在给定路径不符合可用情况(或基于无名杀相关默认情况)时,处理路径的函数,返回的路径应是相对于根目录的相对路径,默认为`null`,当且仅当无法解析成`URL`时会调用该回调 + * @returns {Promise<[origin: URL, data: URL]>} + */ + parseResourceAddressExt(link: string | URL, defaultHandle?: (item: string) => string): Promise<[origin: URL, data: URL]>; } diff --git a/node_modules/@types/noname-typings/nonameModules/noname/library/update.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/library/update.d.ts index 20359ec48..a0247cbd8 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/library/update.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/library/update.d.ts @@ -35,9 +35,9 @@ export function checkVersion(ver1: string, ver2: string): -1 | 0 | 1; * ``` */ export function getRepoTags(options?: { - username?: string | undefined; - repository?: string | undefined; - accessToken?: string | undefined; + username?: string; + repository?: string; + accessToken?: string; }): Promise<{ commit: { sha: string; @@ -63,9 +63,9 @@ export function getRepoTags(options?: { * ``` */ export function getRepoTagDescription(tagName: string, options?: { - username?: string | undefined; - repository?: string | undefined; - accessToken?: string | undefined; + username?: string; + repository?: string; + accessToken?: string; }): Promise<{ /** @type { { browser_download_url: string, content_type: string, name: string, size: number }[] } tag额外上传的素材包 */ assets: { @@ -110,10 +110,10 @@ export function getRepoTagDescription(tagName: string, options?: { * .catch(error => console.error('Failed to fetch files:', error)); * ``` */ -export function getRepoFilesList(path?: string | undefined, branch?: string | undefined, options?: { - username?: string | undefined; - repository?: string | undefined; - accessToken?: string | undefined; +export function getRepoFilesList(path?: string, branch?: string, options?: { + username?: string; + repository?: string; + accessToken?: string; }): Promise<({ download_url: string; name: string; @@ -149,10 +149,10 @@ export function getRepoFilesList(path?: string | undefined, branch?: string | un * .catch(error => console.error('Failed to fetch files:', error)); * ``` */ -export function flattenRepositoryFiles(path?: string | undefined, branch?: string | undefined, options?: { - username?: string | undefined; - repository?: string | undefined; - accessToken?: string | undefined; +export function flattenRepositoryFiles(path?: string, branch?: string, options?: { + username?: string; + repository?: string; + accessToken?: string; }): Promise<{ download_url: string; name: string; @@ -171,7 +171,7 @@ export function flattenRepositoryFiles(path?: string | undefined, branch?: strin * await getRepoTagDescription('v1.10.10').then(({ zipball_url }) => request(zipball_url)); * ``` */ -export function request(url: string, onProgress?: ((receivedBytes: number, total?: number, filename?: string) => void) | undefined, options?: RequestInit | undefined): Promise; +export function request(url: string, onProgress?: (receivedBytes: number, total?: number, filename?: string) => void, options?: RequestInit): Promise; /** * * @param { string } [title] @@ -180,7 +180,7 @@ export function request(url: string, onProgress?: ((receivedBytes: number, total * @param { string | number } [value] * @returns { progress } */ -export function createProgress(title?: string | undefined, max?: string | number | undefined, fileName?: string | undefined, value?: string | number | undefined): progress; +export function createProgress(title?: string, max?: string | number, fileName?: string, value?: string | number): progress; /** * 从GitHub存储库检索最新版本(tag),不包括特定tag。 * @@ -207,7 +207,7 @@ export function getLatestVersionFromGitHub(owner?: string, repo?: string): Promi * }[][]>} A promise that resolves with trees from the specified directories. * @throws {Error} Will throw an error if unable to fetch the repository tree from GitHub. */ -export function getTreesFromGithub(directories: string[], version: string, owner?: string | undefined, repo?: string | undefined): Promise<{ +export function getTreesFromGithub(directories: string[], version: string, owner?: string, repo?: string): Promise<{ path: string; mode: string; type: "blob" | "tree"; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/status/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/status/index.d.ts index 4e22b6b21..cde451fea 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/status/index.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/status/index.d.ts @@ -20,11 +20,11 @@ export class status { */ globalHistory: GameHistory[]; cardtag: { - yingbian_zhuzhan: never[]; - yingbian_kongchao: never[]; - yingbian_fujia: never[]; - yingbian_canqu: never[]; - yingbian_force: never[]; + yingbian_zhuzhan: any[]; + yingbian_kongchao: any[]; + yingbian_fujia: any[]; + yingbian_canqu: any[]; + yingbian_force: any[]; }; renku: any[]; prehidden_skills: any[]; @@ -62,11 +62,11 @@ export class status { */ importing: { [key: string]: Promise[]; - } | undefined; + }; /** * @type { Function | boolean | undefined } */ new_tutorial: Function | boolean | undefined; } export let _status: status; -export function setStatus(instance?: status | undefined): void; +export function setStatus(instance?: InstanceType): void; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/ui/click/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/ui/click/index.d.ts index 18a0944c2..94d3137b8 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/ui/click/index.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/ui/click/index.d.ts @@ -20,22 +20,22 @@ export class Click { exit(): void; shortcut(show: any): void; favouriteCharacter(e: any): void; - innerHTML: string | undefined; + innerHTML: string; buttonnameenter(): void; buttonnameleave(): void; dragtouchdialog(e: any): void; _dragorigin: { clientX: any; clientY: any; - } | undefined; - _dragtransform: number[] | undefined; - _dragorigintransform: number[] | undefined; + }; + _dragtransform: number[]; + _dragorigintransform: number[]; identity(e: any): void; - _customintro: ((uiintro: any) => void) | undefined; + _customintro: (uiintro: any) => void; identity2(): void; roundmenu(): void; - pausehistory(): import("../../library/element/dialog.js").Dialog | undefined; - pauseconfig(): import("../../library/element/dialog.js").Dialog | undefined; + pausehistory(): import("../../library/element/dialog.js").Dialog; + pauseconfig(): import("../../library/element/dialog.js").Dialog; cardPileButton(): import("../../library/element/dialog.js").Dialog; chat(): import("../../library/element/dialog.js").Dialog; volumn(): import("../../library/element/dialog.js").Dialog; @@ -44,7 +44,7 @@ export class Click { hoverpopped(): void; _uiintro: any; hoverpopped_leave(): void; - _poppedalready: boolean | undefined; + _poppedalready: boolean; leavehoverpopped(): void; dierevive(): void; dieswap(): void; @@ -62,24 +62,24 @@ export class Click { _waitingfordrag: { clientX: any; clientY: any; - } | undefined; + }; cardtouchmove(e: any): void; windowmouseup(e: any): void; mousemove(): void; mouseenter(): void; mouseleave(): void; - _mouseentercreated: boolean | undefined; + _mouseentercreated: boolean; mousedown(): void; mouseentercancel(): void; - hoverplayer(e: any): import("../../library/element/dialog.js").Dialog | undefined; + hoverplayer(e: any): import("../../library/element/dialog.js").Dialog; longpressdown(e: any): void; - _longpresstimeout: NodeJS.Timeout | undefined; + _longpresstimeout: NodeJS.Timeout; _longpressevent: any; longpresscallback(): void; longpresscancel(): void; window(): void; toggle(): void; - link: boolean | undefined; + link: boolean; editor(): void; switcher(): void; choice(): void; @@ -87,10 +87,10 @@ export class Click { touchintro(): void; card(...args: any[]): void; avatar(): void; - _doubleClicking: boolean | undefined; + _doubleClicking: boolean; avatar2(): void; connectroom(e: any): void; - player(...args: any[]): void; + player(...args: any[]): any; target(e: any): void; control2(): void; control(): void; @@ -102,19 +102,19 @@ export class Click { logvtimeout: any; logvleave(): void; charactercard(name: any, sourcenode: any, noedit: any, resume: any, avatar: any): void; - intro(e: any): import("../../library/element/dialog.js").Dialog | undefined; + intro(e: any): import("../../library/element/dialog.js").Dialog; intro2(): void; auto(...args: any[]): void; wuxie(): void; tempnowuxie(): void; pause(): void; - resume(e: any): false | undefined; + resume(e: any): boolean; config(): void; swap(): void; mousewheel(evt: any): void; touchStart(e: any): void; - startX: number | undefined; - startY: number | undefined; + startX: number; + startY: number; dialogtouchStart(e: any): void; touchScroll(e: any): void; autoskill(bool: any, node: any): void; @@ -122,5 +122,5 @@ export class Click { autoskill2(e: any): void; hiddenskill(e: any): void; rightplayer(e: any): boolean; - right(e: any): false | undefined; + right(e: any): boolean; } diff --git a/node_modules/@types/noname-typings/nonameModules/noname/ui/create/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/ui/create/index.d.ts index bd28a4c5b..566c036fb 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/ui/create/index.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/ui/create/index.d.ts @@ -21,11 +21,17 @@ export class Create { * @param {Function} saveInput */ editor(container: HTMLDivElement, saveInput: Function): HTMLDivElement; + /** + * 弹出提示。 + * @param {string} message 弹出的文字 + */ + toast(message: string): HTMLDivElement; + showNextToast(): HTMLDivElement; cardTempName(card: any, applyNode: any): any; connectRooms(list: any): void; rarity(button: any): void; div(...args: any[]): HTMLDivElement; - filediv(...args: any[]): HTMLDivElement; + filediv(...args: any[]): any; node(...args: any[]): any; iframe(src: any): void; identitycircle(list: any, target: any): void; @@ -48,26 +54,26 @@ export class Create { /** 创建“扩展”菜单 */ extensionMenu: (connectMenu: any) => void; /** 创建“其他”菜单 */ - otherMenu: (connectMenu: boolean | undefined) => void; + otherMenu: (connectMenu: boolean) => void; statictable(...args: any[]): HTMLTableElement; giveup(): void; groupControl(dialog: any): import("../../library/element/control.js").Control; - cardDialog(...args: any[]): import("../../library/element/dialog.js").Dialog; + cardDialog(...args: any[]): any; characterDialog2(filter: any): import("../../library/element/dialog.js").Dialog; characterDialog(...args: any[]): import("../../library/element/dialog.js").Dialog; dialog(...args: any[]): import("../../library/element/dialog.js").Dialog; - line2(...args: any[]): HTMLDivElement; + line2(...args: any[]): any; line(...args: any[]): HTMLDivElement; switcher(name: any, current: any, current2: any, ...args: any[]): HTMLDivElement; caption(str: any, position: any): HTMLDivElement; control(...args: any[]): import("../../library/element/control.js").Control; confirm(str: any, func: any): void; - skills(skills: any): import("noname-typings/nonameModules/noname/library/element/control.js").Control | undefined; - skills2(skills: any): import("noname-typings/nonameModules/noname/library/element/control.js").Control | undefined; - skills3(skills: any): import("noname-typings/nonameModules/noname/library/element/control.js").Control | undefined; + skills(skills: any): import("noname-typings/nonameModules/noname/library/element/control.js").Control; + skills2(skills: any): import("noname-typings/nonameModules/noname/library/element/control.js").Control; + skills3(skills: any): import("noname-typings/nonameModules/noname/library/element/control.js").Control; arena(): void; system(str: any, func: any, right: any, before: any): HTMLDivElement; - pause(): HTMLDivElement | undefined; + pause(): HTMLDivElement; prebutton(item: any, type: any, position: any, noclick: any): HTMLDivElement; buttonPresets: { /** @@ -104,7 +110,7 @@ export class Create { textbuttons(list: any, dialog: any, noclick: any): void; player(position: any, noclick: any): import("../../library/element/player.js").Player; connectPlayers(ip: any): void; - players(numberOfPlayers: any): import("noname-typings/nonameModules/noname/library/element/player.js").Player[] | undefined; + players(numberOfPlayers: any): import("noname-typings/nonameModules/noname/library/element/player.js").Player[]; me(hasme: any): void; card(position: any, info: any, noclick: any): import("../../library/element/card.js").Card; cardsAsync(...args: any[]): void; diff --git a/node_modules/@types/noname-typings/nonameModules/noname/ui/create/menu/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/ui/create/menu/index.d.ts index a4ca5efb3..685a8393e 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/ui/create/menu/index.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/ui/create/menu/index.d.ts @@ -22,7 +22,7 @@ export function setUpdateActiveCard(fun: Function): void; /** * @param { boolean } [connectMenu] */ -export function menu(connectMenu?: boolean | undefined): void; +export function menu(connectMenu?: boolean): void; /** * @type { HTMLDivElement } * diff --git a/node_modules/@types/noname-typings/nonameModules/noname/ui/index.d.ts b/node_modules/@types/noname-typings/nonameModules/noname/ui/index.d.ts index a51c397cf..5abf305ea 100644 --- a/node_modules/@types/noname-typings/nonameModules/noname/ui/index.d.ts +++ b/node_modules/@types/noname-typings/nonameModules/noname/ui/index.d.ts @@ -129,6 +129,10 @@ export class UI { * @type {HTMLDivElement} */ tempnowuxie: HTMLDivElement; + /** + * @type {HTMLDivElement[]} + */ + toastQueue: HTMLDivElement[]; /** * @type {HTMLDivElement} */ @@ -153,16 +157,16 @@ export class UI { * @author Tipx-L * @param {number} [numberOfPlayers] */ - updateConnectPlayerPositions(numberOfPlayers?: number | undefined): void; + updateConnectPlayerPositions(numberOfPlayers?: number): void; /** * @author curpond * @author Tipx-L * @param {number} [numberOfPlayers] */ - updatePlayerPositions(numberOfPlayers?: number | undefined): void; + updatePlayerPositions(numberOfPlayers?: number): void; updateRoundNumber(roundNumber: any, cardPileNumber: any): void; } export let ui: UI; -export function setUI(instance?: UI | undefined): void; +export function setUI(instance?: InstanceType): void; import { Create } from "./create/index.js"; import { Click } from "./click/index.js";