删除character下的extra,gujian,gwent,hearth的function写法,修正部分类型

This commit is contained in:
nonameShijian 2024-01-27 18:49:55 +08:00
parent cbedfddddc
commit 1e5a2fbb61
7 changed files with 1924 additions and 1914 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,7 @@ declare type CardBaseUIData = {
nature?: string; nature?: string;
//用于某些方法,用于过滤卡牌的额外结构 //用于某些方法,用于过滤卡牌的额外结构
type?: string; type?: string | string[];
subtype?: string; subtype?: string;
color?: string; color?: string;

View File

@ -291,6 +291,9 @@ declare interface Mod {
aiValue?(player: Player, card: Card, num: number): number | void; aiValue?(player: Player, card: Card, num: number): number | void;
aiUseful?(player: Player, card: Card, num: number): number | void; aiUseful?(player: Player, card: Card, num: number): number | void;
attackRange?(player: Player, num: number): number | void;
} }
/** 技能 */ /** 技能 */
@ -790,7 +793,7 @@ declare interface Skill {
* *
* *
*/ */
content?: string | ThreeParmFun<GameStorageItem, Player, string, string>; content?: string | ((storage: GameStorageItem, player: Player, skill: string) => string | void);
/** /**
* *
* *
@ -808,7 +811,7 @@ declare interface Skill {
* *
* *
*/ */
onunmark?: TwoParmFun<GameStorageItem, Player, void> | string; onunmark?: TwoParmFun<GameStorageItem, Player, void> | string | boolean;
// id?:string; //id名字需带“subplayer”用于特殊模式显示信息用 // id?:string; //id名字需带“subplayer”用于特殊模式显示信息用
}; };
@ -937,9 +940,9 @@ declare interface Skill {
* *
* *
*/ */
prepare?: string | ThreeParmFun<Card[], Player, Target[], string>; prepare?: string | ((cards: Card[], player: Player, targets: Target[]) => string | void);
/** 在lose事件中使用触发执行“lose_卡牌名”事件的content */ /** 在lose事件中使用触发执行“lose_卡牌名”事件的content */
onLose?: ContentFunc | ContentFunc[]; onLose?: OldContentFuncByAll | OldContentFuncByAll[];
/** /**
* lose事件中使用equipsonLose才生效 * lose事件中使用equipsonLose才生效
* lose_卡牌名onLose * lose_卡牌名onLose
@ -1033,7 +1036,7 @@ declare interface Skill {
* 线 * 线
* fireFF9244thunder8DD8FFgreen8DFFD8 * fireFF9244thunder8DD8FFgreen8DFFD8
*/ */
line?: string | { color: number[] }; line?: string | { color: number[] } | boolean;
/** 是否显示多条指引线 */ /** 是否显示多条指引线 */
multiline?: boolean; multiline?: boolean;
@ -1109,7 +1112,7 @@ declare interface Skill {
* *
* *
*/ */
selectTarget?: number | Select | NoneParmFum<number | Select>; selectTarget?: number | Select | (() => number | Select);
/** /**
* *
* *
@ -1147,11 +1150,8 @@ declare interface Skill {
ignoreMod?: boolean; ignoreMod?: boolean;
/** /**
* *
* @param card
* @param player
* @param target
*/ */
filterTarget?(card: Card, player: Player, target: Player): boolean; filterTarget?: ((card: Card, player: Player, target: Player) => boolean) | boolean;
/** /**
* *
* 'h', 'e', 'j' * 'h', 'e', 'j'
@ -1211,7 +1211,7 @@ declare interface Skill {
* @param player * @param player
* @param name * @param name
*/ */
hiddenCard?(player: Player, name: string): boolean; hiddenCard?(player: Player, name: string): boolean | void;
/** 录像相关game.videoContent.skill中相关 */ /** 录像相关game.videoContent.skill中相关 */
video?(player: Player, data: string | any[]): void; video?(player: Player, data: string | any[]): void;
@ -1282,7 +1282,7 @@ declare interface Skill {
* *
* prompt * prompt
*/ */
logTarget?: string | TwoParmFun<Trigger, Player, string | Player>; logTarget?: string | TwoParmFun<GameEventPromise, Player, string | Player | Player[] | null>;
/** /**
* logTarget显示触发者的目标日志 * logTarget显示触发者的目标日志
* *
@ -1365,9 +1365,9 @@ declare interface Skill {
* *
* *
*/ */
check?: OneParmFun<Card, number | boolean>; check?: (card: Card) => number | boolean | void;
check?: TwoParmFun<GameEventPromise, Player, number | boolean>; check?: (event: GameEventPromise, player: Player) => number | boolean | void;
check?: NoneParmFum<number | boolean>; check?: () => number | boolean | void;
// check?(...any:any):number|boolean; // check?(...any:any):number|boolean;
// /** ai用于检测的方法用于主动使用触发技能 */ // /** ai用于检测的方法用于主动使用触发技能 */
// check?(card:Card):number|boolean; // check?(card:Card):number|boolean;
@ -1593,7 +1593,7 @@ declare interface SkillAI {
* *
* ,1,0~4(threaten值为3) * ,1,0~4(threaten值为3)
*/ */
threaten?: number | TwoParmFun<Player, Target, number>; threaten?: number | ((player: Player, target: Target) => number | void);
/** /**
* *
* identity决定att不同 * identity决定att不同
@ -1669,14 +1669,14 @@ declare interface SkillAI {
* "zeroplayer","zerotarget","zeroplayertarget",指定最终结果的:对使用者的收益值,0 * "zeroplayer","zerotarget","zeroplayertarget",指定最终结果的:对使用者的收益值,0
* @param result1 ai.result.player的结果 * @param result1 ai.result.player的结果
*/ */
player?(card: Card, player: Player, target: Player, result1: number): string | number | number[] | void; player?(card: Card, player: Player, target: Player, result1: number): string | number | number[] | void | boolean;
/** /**
* / * /
* *
* "zeroplayer","zerotarget","zeroplayertarget",指定最终结果的:对使用者的收益值,0 * "zeroplayer","zerotarget","zeroplayertarget",指定最终结果的:对使用者的收益值,0
* @param result2 ai.result.target的结果 * @param result2 ai.result.target的结果
*/ */
target?(card: Card, player: Player, target: Player, result2: number): string | number | number[] | void; target?(card: Card, player: Player, target: Player, result2: number): string | number | number[] | void | boolean;
}; };
/** /**
* *
@ -1694,21 +1694,21 @@ declare interface SkillAI {
* ; * ;
* player(player){}player可以在这里进行判断...... * player(player){}player可以在这里进行判断......
*/ */
target?: ThreeParmFun<Player, Target, Card, number> | number; target?: number | ((player: Player, taregt: Player, card: Card) => number | void | boolean);
/** /**
* get.effect_use中target * get.effect_use中target
*/ */
target_use?: ThreeParmFun<Player, Target, Card, number> | number; target_use?: number | ((player: Player, taregt: Player, card: Card) => number | void) | boolean;
/** /**
* ai是否发动此技能 * ai是否发动此技能
* ; * ;
* *
*/ */
player?: ThreeParmFun<Player, Target, Card, number> | number; player?: number | ((player: Player, taregt: Player, card: Card) => number | void | boolean);
/** /**
* get.effect_use中player * get.effect_use中player
*/ */
player_use?: ThreeParmFun<Player, Target, Card, number> | number; player_use?: number | ((player: Player, taregt: Player, card: Card) => number | void | boolean);
/** /**
* true时equipcard.ai.result.target * true时equipcard.ai.result.target

View File

@ -181,6 +181,11 @@ export class Player extends HTMLDivElement {
*/ */
// @ts-ignore // @ts-ignore
this.hp; this.hp;
/**
* @type { number }
*/
// @ts-ignore
this.hujia;
throw new Error('Do not call this method'); throw new Error('Do not call this method');
} }
build(noclick) { build(noclick) {