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 e6cdf6b10..a8157136f 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 @@ -354,7 +354,7 @@ export class Game { * @param { ...Parameters } args * @returns { void } */ - broadcast(func: T_6, ...args: Parameters<{ + broadcast(func: T_6, ...args: Parameters<{ log: (arr: any) => void; opened: () => void; onconnection: (id: any) => void; @@ -386,7 +386,7 @@ export class Game { * @param { ...T } args * @returns { void } */ - broadcast(func: (...args: T_6) => void, ...args: T_6): void; + broadcast(func: (...args: T_6) => void, ...args: T_6): void; /** * @template { keyof typeof lib.message.client } T * @overload @@ -394,7 +394,7 @@ export class Game { * @param { ...Parameters } args * @returns { void } */ - broadcastAll(func: T_7, ...args: Parameters<{ + broadcastAll(func: T_7, ...args: Parameters<{ log: (arr: any) => void; opened: () => void; onconnection: (id: any) => void; @@ -426,7 +426,7 @@ export class Game { * @param { ...T } args * @returns { void } */ - broadcastAll(func: (...args: T_7) => void, ...args: T_7): void; + broadcastAll(func: (...args: T_7) => void, ...args: T_7): void; syncState(): void; updateWaiting(): void; /** 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 66649b9a0..0edf97202 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 @@ -211,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 | "s" | "x" | "b" | "c" | "d" | "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[]; @@ -408,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 | "h" | "e" | "j" | "s" | "x" | "c" | "d" | "o"; + 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; /** 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 12ec215a0..c5d01baad 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 @@ -164,6 +164,22 @@ export class GameEvent { * @type { string } */ triggername: string; + /** + * @type { ContentFuncByAll | GeneratorContentFuncByAll | OldContentFuncByAll } + */ + content: ContentFuncByAll | GeneratorContentFuncByAll | OldContentFuncByAll; + /** + * @type { boolean } + */ + forceDie: boolean; + /** + * @type { Function | undefined } + */ + _oncancel: Function | undefined; + /** + * @type { boolean } + */ + includeOut: boolean; /** * @param {keyof this} key * @param {number} [value] @@ -234,7 +250,6 @@ export class GameEvent { }) => void)[][]): number; changeToZero(): this; numFixed: boolean; - forceFinish(): this; finish(): this; putStepCache(key: any, value: any): this; _stepCache: {}; @@ -258,7 +273,6 @@ export class GameEvent { * @param {ArrayLike | Function | keyof typeof lib.element.content} item */ setContent(item: ArrayLike | Function | keyof typeof lib.element.content): this; - content: ContentFuncByAll | GeneratorContentFuncByAll | OldContentFuncByAll; /** * * @param {Function | keyof typeof lib.element.contents} contents 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 5029a260b..657da1ab1 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 @@ -202,6 +202,10 @@ export class Player extends HTMLDivElement { * @type { boolean | undefined } */ identityShown: boolean | undefined; + /** + * @type { boolean } + */ + removed: boolean; /** * 怒气 * @param { number } amount @@ -330,7 +334,7 @@ export class Player extends HTMLDivElement { * 检测此牌是否不计入手牌上限 * @param { Card } card */ - canIgnoreHandcard(card: Card): any; + canIgnoreHandcard(card: Card): boolean; /** * Gift * @@ -347,7 +351,7 @@ export class Player extends HTMLDivElement { * @param { Player } target * @param { boolean } [strict] */ - canGift(card: Card, target: Player, strict?: boolean): any; + canGift(card: Card, target: Player, strict?: boolean): boolean; /** * Check if the player refuses gifts * @@ -384,7 +388,7 @@ export class Player extends HTMLDivElement { * @param { Player } [source] * @param { boolean } [strict] */ - canRecast(card: Card, source?: Player, strict?: boolean): any; + canRecast(card: Card, source?: Player, strict?: boolean): boolean; /** * 判断一名角色的某个区域是否被废除 * @@ -826,14 +830,20 @@ export class Player extends HTMLDivElement { * @returns { Card[] } */ getCards(arg1?: string, arg2?: string | Record | ((card: Card) => boolean)): Card[]; + /** + * @param { Player } player + * @param { string } [arg1] + * @param { string } [arg2] + * @returns { Generator } + */ iterableGetDiscardableCards(player: Player, arg1?: string, arg2?: string): Generator; - getDiscardableCards(player: any, arg1: any, arg2: any): any[]; + getDiscardableCards(player: any, arg1: any, arg2: any): import("noname-typings/nonameModules/noname/library/element/card.js").Card[]; /** * @param {Parameters[1]} player * @param {Parameters[0]} arg1 * @param {Parameters[1]} arg2 */ - iterableGetGainableCards(player: Parameters[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 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 d40f15a58..d360f6caa 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 @@ -4185,7 +4185,94 @@ export class Library { fullimage: boolean; }; }; - filter: any; + filter: { + all: () => boolean; + none: () => boolean; + /** + * Check if the card does not count toward the player's hand limit + * + * 检测此牌是否不计入此角色的手牌上限 + * @param { Card } card + * @param { Player } player + * @returns { boolean } + */ + ignoredHandcard: (card: Card, player: Player) => boolean; + /** + * Check if the card is giftable + * + * 检测此牌是否可赠予 + * @param { Card } card + * @param { Player } player + * @param { Player } target + * @param { boolean } [strict] + */ + cardGiftable: (card: Card, player: Player, target: Player, strict?: boolean) => boolean; + /** + * Check if the card is recastable + * + * 检查此牌是否可重铸 + * @param { Card } card + * @param { Player } player + * @param { Player } [source] + * @param { boolean } [strict] + */ + cardRecastable: (card: Card, player?: Player, source?: Player, strict?: boolean) => boolean; + /** + * @param { Card } card + * @param { Player } player + * @returns { boolean } + */ + canBeReplaced: (card: Card, player: Player) => boolean; + buttonIncluded: (button: any) => boolean; + filterButton: (button: any) => boolean; + cardSavable: (card: any, player: any, target: any) => any; + /** + * + * @param {GameEvent} event + * @param {Player} player + * @param {string} triggername + * @param {string} skill + * @returns {boolean} + */ + filterTrigger: (event: GameEvent, player: Player, triggername: string, skill: string, indexedData: any) => boolean; + /** + * + * @param {GameEvent} event + * @param {Player} player + * @param {string} skill + * @returns {boolean} + */ + filterEnable: (event: GameEvent, player: Player, skill: string) => boolean; + characterDisabled: (i: any, libCharacter: any) => boolean; + characterDisabled2: (i: any) => boolean; + skillDisabled: (skill: any) => boolean; + cardEnabled: (card: any, player: any, event: any) => any; + cardRespondable: (card: any, player: any, event: any) => any; + cardUsable2: (card: any, player: any, event: any) => boolean; + cardUsable: (card: any, player: any, event: any) => boolean; + cardDiscardable: (card: any, player: any, event: any) => any; + canBeDiscarded: (card: any, player: any, target: any, event: any) => any; + canBeGained: (card: any, player: any, target: any, event: any) => any; + cardAiIncluded: (card: any) => boolean; + filterCard: (card: any, player: any, event: any) => boolean; + targetEnabledx: (card: any, player: any, target: any, ...args: any[]) => any; + targetEnabled: (card: any, player: any, target: any) => any; + targetEnabled2: (card: any, player: any, target: any) => boolean; + targetEnabled3: (card: any, player: any, target: any) => boolean; + targetInRange: (card: any, player: any, target: any) => any; + filterTarget: (card: any, player: any, target: any) => any; + filterTarget2: (card: any, player: any, target: any) => any; + notMe: (card: any, player: any, target: any) => boolean; + isMe: (card: any, player: any, target: any) => boolean; + 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); + judge: (card: any, player: any, target: any) => any; + autoRespondSha: () => boolean; + autoRespondShan: () => boolean; + wuxieSwap: (event: any) => boolean; + }; sort: { nature: (a: any, b: any) => number; group: (a: any, b: any) => number; 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 2f74dde20..bf45c75b1 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 @@ -67,6 +67,14 @@ export class status { * @type { Function | boolean | undefined } */ new_tutorial: Function | boolean | undefined; + /** + * @type { Player | undefined } + */ + roundStart: Player | undefined; + /** + * @type { boolean } + */ + roundSkipped: boolean; } export let _status: status; export function setStatus(instance?: InstanceType): void; diff --git a/noname/library/element/gameEvent.js b/noname/library/element/gameEvent.js index 5c6d4d24d..689734ed8 100644 --- a/noname/library/element/gameEvent.js +++ b/noname/library/element/gameEvent.js @@ -200,6 +200,18 @@ export class GameEvent { * @type { ContentFuncByAll | GeneratorContentFuncByAll | OldContentFuncByAll } */ content; + /** + * @type { boolean } + */ + forceDie; + /** + * @type { Function | undefined } + */ + _oncancel; + /** + * @type { boolean } + */ + includeOut; /** * @param {keyof this} key * @param {number} [value] diff --git a/noname/library/element/player.js b/noname/library/element/player.js index df4b42595..01d9f7a76 100644 --- a/noname/library/element/player.js +++ b/noname/library/element/player.js @@ -357,6 +357,10 @@ export class Player extends HTMLDivElement { * @type { boolean | undefined } */ identityShown; + /** + * @type { boolean } + */ + removed; //新函数 /** * 怒气 diff --git a/noname/status/index.js b/noname/status/index.js index 4acb7f2f1..760dbe1af 100644 --- a/noname/status/index.js +++ b/noname/status/index.js @@ -76,6 +76,14 @@ export class status { * @type { Function | boolean | undefined } */ new_tutorial = undefined; + /** + * @type { Player | undefined } + */ + roundStart = undefined; + /** + * @type { boolean } + */ + roundSkipped; } export let _status = new status();