处理冲突
This commit is contained in:
commit
097f3183a9
|
@ -673,7 +673,7 @@ game.import("character", function () {
|
|||
return game.hasPlayer((current) => {
|
||||
if (current == player) return false;
|
||||
const total = current.countCards("ej");
|
||||
return total > 0 && num > total;
|
||||
return total > 0 && num >= total;
|
||||
});
|
||||
},
|
||||
filterCard: true,
|
||||
|
@ -682,7 +682,7 @@ game.import("character", function () {
|
|||
1,
|
||||
Math.max(
|
||||
...game.filterPlayer((i) => i != get.player()).map((i) => i.countCards("ej"))
|
||||
) + 1,
|
||||
),
|
||||
];
|
||||
},
|
||||
check(card) {
|
||||
|
@ -691,10 +691,10 @@ game.import("character", function () {
|
|||
filterTarget(card, player, target) {
|
||||
const num = target.countCards("ej");
|
||||
if (!num) return false;
|
||||
return ui.selected.cards.length == num + 1 && player != target;
|
||||
return ui.selected.cards.length == num && player != target;
|
||||
},
|
||||
filterOk() {
|
||||
return ui.selected.cards.length == ui.selected.targets[0].countCards("ej") + 1;
|
||||
return ui.selected.cards.length == ui.selected.targets[0].countCards("ej");
|
||||
},
|
||||
position: "he",
|
||||
lose: false,
|
||||
|
@ -746,8 +746,9 @@ game.import("character", function () {
|
|||
filter(event, player) {
|
||||
return (
|
||||
(event.name != "phase" || game.phaseNumber == 0) &&
|
||||
game.countPlayer((current) => {
|
||||
return !current.isZhu2();
|
||||
game.countPlayer(current => {
|
||||
if (get.mode() != "doudizhu") return !current.isZhu2();
|
||||
return current.getSeatNum() != 3;
|
||||
}) > 1
|
||||
);
|
||||
},
|
||||
|
@ -756,15 +757,13 @@ game.import("character", function () {
|
|||
derivation: "tamo_faq",
|
||||
async content(event, trigger, player) {
|
||||
const toSortPlayers = game.filterPlayer((current) => {
|
||||
return (
|
||||
!current.isZhu2() ||
|
||||
get.mode() == "doudizhu" && current.getSeatNum() == 3
|
||||
);
|
||||
if (get.mode() != "doudizhu") return !current.isZhu2();
|
||||
return current.getSeatNum() != 3;
|
||||
});
|
||||
toSortPlayers.sortBySeat(game.findPlayer2((current) => current.getSeatNum() == 1, true));
|
||||
const next = player.chooseToMove("榻谟:是否分配" +
|
||||
(game.countPlayer() > toSortPlayers.length ?
|
||||
"除主公" + (get.mode() == "doudizhu" ? "和三号位外" : "外") : "") +
|
||||
(get.mode() != "doudizhu" ?
|
||||
(game.hasPlayer(cur => cur.isZhu2()) ? "除主公外" : "") : "除三号位外") +
|
||||
"所有角色的座次?"
|
||||
);
|
||||
next.set("list", [
|
||||
|
@ -1422,8 +1421,7 @@ game.import("character", function () {
|
|||
group: "jxlianpo_show",
|
||||
*content(event, map) {
|
||||
var source = map.trigger.source;
|
||||
source.draw(2);
|
||||
source.recover();
|
||||
source.chooseDrawRecover(2, true);
|
||||
},
|
||||
mark: true,
|
||||
intro: {
|
||||
|
@ -10817,7 +10815,7 @@ game.import("character", function () {
|
|||
le_shen_jiaxu_prefix: "神",
|
||||
jxlianpo: "炼魄",
|
||||
jxlianpo_info:
|
||||
"锁定技。①若场上最大阵营为:反贼,其他角色的手牌上限-1,所有角色使用【杀】的次数上限和攻击范围+1;主忠,其他角色不能对其以外的角色使用【桃】。其他角色死亡后,若有多个最大阵营,来源摸两张牌并回复1点体力。②一轮游戏开始时,你展示一张未加入游戏或已死亡角色的身份牌,本轮视为该身份对应阵营的角色数+1。",
|
||||
"锁定技。①若场上最大阵营为:反贼,其他角色的手牌上限-1,所有角色使用【杀】的次数上限和攻击范围+1;主忠,其他角色不能对其以外的角色使用【桃】。若有多个最大阵营,其他角色死亡后,来源摸两张牌或回复1点体力。②一轮游戏开始时,你展示一张未加入游戏或已死亡角色的身份牌,本轮视为该身份对应阵营的角色数+1。",
|
||||
jxzhaoluan: "兆乱",
|
||||
jxzhaoluan_info:
|
||||
"限定技。一名角色死亡前,若其此次进入过濒死状态,你可以取消之,令其加3点体力上限并失去所有非锁定技,回复体力至3点,摸四张牌。然后你获得如下效果:出牌阶段,你可以令一名成为过你〖兆乱〗目标的角色减1点体力上限,然后对一名此阶段未以此法选择过的角色造成1点伤害。",
|
||||
|
@ -10841,18 +10839,20 @@ game.import("character", function () {
|
|||
shen_lusu_prefix: "神",
|
||||
dingzhou: "定州",
|
||||
dingzhou_info:
|
||||
"出牌阶段限一次。你可以将X张牌交给一名场上有牌的角色,然后你获得其场上的所有牌(X为其场上的牌数+1)。",
|
||||
"出牌阶段限一次。你可以将X张牌交给一名场上有牌的角色,然后你获得其场上的所有牌(X为其场上的牌数)。",
|
||||
tamo: "榻谟",
|
||||
tamo_info:
|
||||
"游戏开始时,你可以重新分配除主公外所有角色的座次。",
|
||||
tamo_info_doudizhu:
|
||||
"游戏开始时,你可以重新分配除主公和三号位外所有角色的座次。",
|
||||
"游戏开始时,你可以重新分配除三号位外所有角色的座次。",
|
||||
tamo_faq: "FAQ",
|
||||
tamo_faq_info:
|
||||
"<br><li>Q:在一号位不为主公的情况下,〖榻谟〗如何结算?</li><li>A:该角色可以正常进行座次交换。若受此技能影响导致一号位角色发生了变化,则以排列后的一号位角色为起始角色开始本局游戏。</li>",
|
||||
zhimeng: "智盟",
|
||||
zhimeng_info_identity: '回合结束后,你可以选择一名其他角色。若如此做,你与其将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。',
|
||||
zhimeng_info: '回合结束后,你可以选择一名手牌数不大于Y的其他角色(Y为你的手牌数+1)。若如此做,你与其将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。',
|
||||
zhimeng_info:
|
||||
"回合结束后,你可以选择一名手牌数不大于Y的其他角色(Y为你的手牌数+1)。若如此做,你与其将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。",
|
||||
zhimeng_info_identity:
|
||||
"回合结束后,你可以选择一名其他角色。若如此做,你与其将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。",
|
||||
shen_xuzhu: "神许褚",
|
||||
shen_xuzhu_prefix: "神",
|
||||
zhengqing: "争擎",
|
||||
|
|
|
@ -9905,7 +9905,7 @@ game.import("character", function () {
|
|||
var delta = player.countCards("h") - player.hp;
|
||||
if (delta > 0) player.chooseToDiscard("h", 4, true);
|
||||
else if (delta == 0) {
|
||||
player.chooseToDiscard("h", true);
|
||||
player.chooseToDiscard("he", true);
|
||||
player.recover();
|
||||
} else {
|
||||
player.damage("fire", "nosource");
|
||||
|
@ -14163,18 +14163,18 @@ game.import("character", function () {
|
|||
check: function (event, player) {
|
||||
var target = event.player;
|
||||
var att = get.attitude(player, target);
|
||||
var num2 = Math.min(5, target.hp - target.countCards("h"));
|
||||
var num2 = Math.min(5, target.hp) - target.countCards("h");
|
||||
if (num2 <= 0) return att <= 0;
|
||||
var num = target.countCards("h", function (card) {
|
||||
return target.hasValueTarget(card, null, true);
|
||||
});
|
||||
if (!num) return att > 0;
|
||||
return num > num2;
|
||||
return (num - num2) * att < 0;
|
||||
},
|
||||
preHidden: true,
|
||||
content: function () {
|
||||
"step 0";
|
||||
var num = Math.min(5, trigger.player.hp - trigger.player.countCards("h"));
|
||||
var num = Math.min(5, trigger.player.hp) - trigger.player.countCards("h");
|
||||
if (num > 0) trigger.player.draw(num);
|
||||
"step 1";
|
||||
trigger.player.addTempSkill("xibing2");
|
||||
|
@ -15731,9 +15731,9 @@ game.import("character", function () {
|
|||
"①当你受到伤害后,你可以摸一张牌,或和一名势力相同的其他角色各摸一张牌;②每回合限一次,当你造成伤害后,你可以对一名与你势力不同的角色造成1点伤害。",
|
||||
xibing: "息兵",
|
||||
xibing_info:
|
||||
"当一名其他角色在其出牌阶段内使用黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至当前体力值(至多摸五张)且本回合不能再使用手牌。",
|
||||
"当一名其他角色在其出牌阶段内使用黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至当前体力值(至多摸至五张)且本回合不能再使用手牌。",
|
||||
xibing_info_guozhan:
|
||||
"当一名其他角色在其出牌阶段内使用第一张黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至当前体力(至多摸五张)值且本回合不能再使用手牌。若你与其均明置了所有武将牌,则你可以暗置你与其各一张武将牌且本回合不能再明置此武将牌。",
|
||||
"当一名其他角色在其出牌阶段内使用第一张黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至当前体力(至多摸至五张)值且本回合不能再使用手牌。若你与其均明置了所有武将牌,则你可以暗置你与其各一张武将牌且本回合不能再明置此武将牌。",
|
||||
luyusheng: "陆郁生",
|
||||
zhente: "贞特",
|
||||
zhente2: "贞特",
|
||||
|
@ -15868,7 +15868,7 @@ game.import("character", function () {
|
|||
lianzhou_info: "锁定技。准备阶段,你横置你的武将牌。然后你可横置任意名体力值等于你的角色。",
|
||||
jinglan: "惊澜",
|
||||
jinglan_info:
|
||||
"锁定技。当你造成伤害后,若你的手牌数:大于体力值,你弃置四张手牌;等于体力值,你弃置一张手牌并回复1点体力;小于体力值,你受到1点无来源火焰伤害并摸五张牌。",
|
||||
"锁定技。当你造成伤害后,若你的手牌数:大于体力值,你弃置四张手牌;等于体力值,你弃置一张牌并回复1点体力;小于体力值,你受到1点无来源火焰伤害并摸五张牌。",
|
||||
dc_yanghu: "羊祜",
|
||||
dcdeshao: "德劭",
|
||||
dcdeshao_info:
|
||||
|
|
|
@ -2442,9 +2442,9 @@ game.import("character", function () {
|
|||
mbyilie3: {
|
||||
audio: "mbyilie",
|
||||
trigger: { player: "phaseEnd" },
|
||||
//filter:function(event,player){
|
||||
// return player.countMark('mbyilie');
|
||||
//},
|
||||
filter: function (event, player) {
|
||||
return player.hasMark('mbyilie');
|
||||
},
|
||||
forced: true,
|
||||
content: function () {
|
||||
"step 0";
|
||||
|
@ -20080,8 +20080,8 @@ game.import("character", function () {
|
|||
mbzuoyou(player) {
|
||||
const mbzuoyou = player.storage.mbzuoyou;
|
||||
if (mbzuoyou)
|
||||
return '转换技。出牌阶段限一次,阴:你可以令一名角色摸三张牌,然后其弃置两张牌;<span class="bluetext">阳:你可以令一名角色弃置一张手牌,然后其获得1点护甲。</span>';
|
||||
return '转换技。出牌阶段限一次,<span class="bluetext">阴:你可以令一名角色摸三张牌,然后其弃置两张牌;</span>阳:你可以令一名角色弃置一张手牌,然后其获得1点护甲。';
|
||||
return '转换技。出牌阶段限一次,阴:你可以令一名角色摸两张牌,然后其弃置一张牌;<span class="bluetext">阳:你可以令一名手牌数不少于二的角色弃置两张手牌,然后其获得1点护甲。</span>';
|
||||
return '转换技。出牌阶段限一次,<span class="bluetext">阴:你可以令一名角色摸两张牌,然后其弃置一张牌;</span>阳:你可以令一名手牌数不少于二的角色弃置两张手牌,然后其获得1点护甲。';
|
||||
},
|
||||
},
|
||||
perfectPair: {
|
||||
|
@ -21154,7 +21154,7 @@ game.import("character", function () {
|
|||
mbyilie2: "义烈",
|
||||
mbyilie3: "义烈",
|
||||
mbyilie_info:
|
||||
"锁定技。①游戏开始时,你选择一名其他角色,然后你获得以下效果:其受到伤害时,若你没有“烈”,则你获得等同于伤害值的“烈”标记,然后防止此伤害;其对其他角色造成伤害后,你回复1点体力。②结束阶段,你摸一张牌并失去X点体力,然后移去所有“烈”(X为你拥有的“烈”标记数)。",
|
||||
"锁定技。①游戏开始时,你选择一名其他角色,然后你获得以下效果:其受到伤害时,若你没有“烈”,则你获得等同于伤害值的“烈”标记,然后防止此伤害;其对其他角色造成伤害后,你回复1点体力。②结束阶段,若你拥有“烈”标记,你摸一张牌并失去X点体力,然后移去所有“烈”(X为你拥有的“烈”标记数)。",
|
||||
muludawang: "木鹿大王",
|
||||
shoufa: "兽法",
|
||||
shoufa_info:
|
||||
|
|
|
@ -703,7 +703,10 @@ game.import("character", function () {
|
|||
dragjuwu: {
|
||||
trigger: { target: "shaBefore" },
|
||||
filter(event, player) {
|
||||
return game.countPlayer((target) => event.player.inRange(target)) >= 3;
|
||||
return (
|
||||
!game.hasNature(event.card) &&
|
||||
game.countPlayer((target) => event.player.inRange(target)) >= 3
|
||||
);
|
||||
},
|
||||
forced: true,
|
||||
content() {
|
||||
|
@ -714,6 +717,7 @@ game.import("character", function () {
|
|||
target(card, player, target) {
|
||||
if (
|
||||
card.name == "sha" &&
|
||||
!game.hasNature(card) &&
|
||||
game.countPlayer((targetx) => player.inRange(targetx)) >= 3
|
||||
)
|
||||
return "zerotarget";
|
||||
|
|
|
@ -8241,7 +8241,7 @@ game.import("character", function () {
|
|||
cardUsable: function (card, player) {
|
||||
if (card.name == "sha") {
|
||||
const suit = get.suit(card);
|
||||
return suit === "unsure" || player.storage.xingongji2.includes(suit);
|
||||
if (suit === "unsure" || player.storage.xingongji2.includes(suit)) return Infinity;
|
||||
}
|
||||
},
|
||||
aiOrder: function (player, card, num) {
|
||||
|
@ -18102,9 +18102,9 @@ game.import("character", function () {
|
|||
reluoyi_info:
|
||||
"你可以跳过摸牌阶段,然后亮出牌堆顶的三张牌,获得其中的基本牌、武器牌和【决斗】,若如此做,直到你的下回合开始,你为伤害来源的【杀】或【决斗】造成的伤害+1。",
|
||||
reganglie_info:
|
||||
"当你受到1点伤害后,你可进行判定,若结果为:红色,你对伤害来源造成1点伤害,;黑色,你弃置伤害来源一张牌。",
|
||||
"当你受到1点伤害后,你可进行判定,若结果为:红色,你对伤害来源造成1点伤害;黑色,你弃置伤害来源一张牌。",
|
||||
reganglie_info_guozhan:
|
||||
"当你受到伤害后,你可进行判定,若结果为:红色,你对伤害来源造成1点伤害,;黑色,你弃置伤害来源一张牌。",
|
||||
"当你受到伤害后,你可进行判定,若结果为:红色,你对伤害来源造成1点伤害;黑色,你弃置伤害来源一张牌。",
|
||||
botu: "博图",
|
||||
botu_info: "回合结束时,若你本回合出牌阶段内使用的牌包含四种花色,则你可以进行一个额外回合。",
|
||||
rebotu: "博图",
|
||||
|
|
1200
character/shenhua.js
1200
character/shenhua.js
File diff suppressed because it is too large
Load Diff
|
@ -129,6 +129,7 @@ game.import("character", function () {
|
|||
ganning: ["lingtong", "xf_sufei"],
|
||||
guanyu: ["zhangfei", "liaohua"],
|
||||
},
|
||||
/** @type { importCharacterConfig['skill'] } */
|
||||
skill: {
|
||||
//标准版甘夫人
|
||||
stdshushen: {
|
||||
|
@ -578,7 +579,7 @@ game.import("character", function () {
|
|||
async cost(event, trigger, player) {
|
||||
let num = game.countPlayer(
|
||||
(current) =>
|
||||
current != player && current.countCards("h") && get.attitude(player, current) <= 0
|
||||
current != player && current.countCards("h") > 0 && get.attitude(player, current) <= 0
|
||||
);
|
||||
let check = num >= 2;
|
||||
const { result } = await player
|
||||
|
@ -2611,7 +2612,7 @@ game.import("character", function () {
|
|||
global: ["dying", "gainAfter", "loseAsyncAfter"],
|
||||
},
|
||||
audio: 2,
|
||||
getIndex: function (event, player) {
|
||||
getIndex(event, player) {
|
||||
if (event.name !== "loseAsync") return [event.player];
|
||||
else
|
||||
return game
|
||||
|
|
|
@ -37,7 +37,12 @@ declare interface Result {
|
|||
* 当前有“视为”操作,该card参数特供给视为牌,不需要cards[0]获取视为牌 ;
|
||||
* 判断是否为视为牌:card.isCard,false为视为牌
|
||||
*/
|
||||
card: Card;
|
||||
card: Card | CardBaseUIData;
|
||||
|
||||
|
||||
cost_data: {
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
[key: string]: any;
|
||||
}
|
|
@ -442,7 +442,7 @@ declare interface Skill {
|
|||
*
|
||||
* 若该属性值是“check”,则调用当前技能得check方法检测
|
||||
*/
|
||||
frequent?: boolean | string | TwoParmFun<SkillTrigger, Player, number | boolean>;
|
||||
frequent?: boolean | string | TwoParmFun<GameEventPromise, Player, number | boolean>;
|
||||
/**
|
||||
* 此技能是否可以被设置为自动发动2
|
||||
*
|
||||
|
@ -1285,7 +1285,7 @@ declare interface Skill {
|
|||
*
|
||||
* @param target v1.10.11 触发的目标
|
||||
*/
|
||||
logTarget?: string | ((event?: GameEventPromise, player?: Player, triggername?: string, target?: Player) => string | Player | Player[] | null);
|
||||
logTarget?: string | ((event?: GameEventPromise, player?: Player, triggername?: string, target?: Player) => string | Player | Player[] | null | undefined);
|
||||
/**
|
||||
* 是否通过logTarget显示触发者的目标日志;
|
||||
*
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
export { GNC, gnc, setGNC } from './noname/gnc/index.js';
|
||||
export { AI, ai, setAI } from './noname/ai/index.js';
|
||||
export { Game, game, setGame } from './noname/game/index.js';
|
||||
export { Get, get, setGet } from './noname/get/index.js';
|
||||
export { Library, lib, setLibrary } from './noname/library/index.js';
|
||||
export { status, _status, setStatus } from './noname/status/index.js';
|
||||
export { UI, ui, setUI } from './noname/ui/index.js';
|
||||
export { boot } from './noname/init/index.js';
|
||||
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";
|
||||
export { Game, game, setGame } from "./noname/game/index.js";
|
||||
export { Get, get, setGet } from "./noname/get/index.js";
|
||||
export { Library, lib, setLibrary } from "./noname/library/index.js";
|
||||
export { status, _status, setStatus } from "./noname/status/index.js";
|
||||
export { UI, ui, setUI } from "./noname/ui/index.js";
|
||||
|
|
|
@ -5,7 +5,7 @@ export class Basic {
|
|||
* buttons?: Button[]
|
||||
* ) => number } check
|
||||
*/
|
||||
chooseButton(check: (button: any, buttons?: Button[]) => number): boolean | undefined;
|
||||
chooseButton(check: (button: Button, buttons?: Button[]) => number): boolean | undefined;
|
||||
/**
|
||||
* @param { (
|
||||
* card?: Card,
|
||||
|
@ -13,12 +13,12 @@ export class Basic {
|
|||
* ) => number } check
|
||||
* @returns { boolean | undefined }
|
||||
*/
|
||||
chooseCard(check: (card?: any, cards?: Card[]) => number): boolean | undefined;
|
||||
chooseCard(check: (card?: Card, cards?: Card[]) => number): boolean | undefined;
|
||||
/**
|
||||
* @param { (
|
||||
* target?: Player,
|
||||
* targets?: Player[]
|
||||
* ) => number } check
|
||||
*/
|
||||
chooseTarget(check: (target?: any, targets?: Player[]) => number): boolean | undefined;
|
||||
chooseTarget(check: (target?: Player, targets?: Player[]) => number): boolean | undefined;
|
||||
}
|
||||
|
|
|
@ -5,4 +5,4 @@ export class AI {
|
|||
export let ai: AI;
|
||||
export function setAI(instance?: AI | undefined): void;
|
||||
export { Basic };
|
||||
import { Basic } from './basic.js';
|
||||
import { Basic } from "./basic.js";
|
||||
|
|
|
@ -15,7 +15,7 @@ export class Game {
|
|||
* @type { { [key: string]: Player } }
|
||||
*/
|
||||
playerMap: {
|
||||
[key: string]: any;
|
||||
[key: string]: import("noname-typings/nonameModules/noname/library/element/player.js").Player;
|
||||
};
|
||||
phaseNumber: number;
|
||||
roundNumber: number;
|
||||
|
@ -28,11 +28,15 @@ export class Game {
|
|||
/**
|
||||
* @type { Player }
|
||||
*/
|
||||
me: any;
|
||||
me: Player;
|
||||
/**
|
||||
* @type { boolean }
|
||||
*/
|
||||
chess: boolean;
|
||||
/**
|
||||
* @type { Player }
|
||||
*/
|
||||
zhu: Player;
|
||||
globalEventHandlers: {
|
||||
_handlers: {};
|
||||
getHandler(name: any, type: any): any;
|
||||
|
@ -173,19 +177,19 @@ export class Game {
|
|||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasGlobalHistory<T extends keyof GameHistory>(key: T, filter: (event: import('../library/index.js').GameEventPromise) => boolean, last?: import("../library/index.js").GameEventPromise | undefined): boolean;
|
||||
hasGlobalHistory<T extends keyof GameHistory>(key: T, filter: (event: GameEventPromise) => boolean, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): boolean;
|
||||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { void }
|
||||
*/
|
||||
checkGlobalHistory<T_1 extends keyof GameHistory>(key: T_1, filter: (event: import('../library/index.js').GameEventPromise) => boolean, last?: import("../library/index.js").GameEventPromise | undefined): void;
|
||||
checkGlobalHistory<T_1 extends keyof GameHistory>(key: T_1, filter: (event: GameEventPromise) => boolean, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): void;
|
||||
/**
|
||||
* @overload
|
||||
* @returns { GameHistory }
|
||||
|
@ -195,27 +199,27 @@ export class Game {
|
|||
* @template { keyof GameHistory } T
|
||||
* @overload
|
||||
* @param { T } key
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } [filter]
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { GameHistory[T] }
|
||||
*/
|
||||
getGlobalHistory<T_2 extends keyof GameHistory>(key: T_2, filter?: ((event: import('../library/index.js').GameEventPromise) => boolean) | undefined, last?: import("../library/index.js").GameEventPromise | undefined): GameHistory[T_2];
|
||||
getGlobalHistory<T_2 extends keyof GameHistory>(key: T_2, filter?: ((event: GameEventPromise) => boolean) | undefined, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): GameHistory[T_2];
|
||||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasAllGlobalHistory<T_3 extends keyof GameHistory>(key: T_3, filter: (event: import('../library/index.js').GameEventPromise) => boolean, last?: import("../library/index.js").GameEventPromise | undefined): boolean;
|
||||
hasAllGlobalHistory<T_3 extends keyof GameHistory>(key: T_3, filter: (event: GameEventPromise) => boolean, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): boolean;
|
||||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { void }
|
||||
*/
|
||||
checkAllGlobalHistory<T_4 extends keyof GameHistory>(key: T_4, filter: (event: import('../library/index.js').GameEventPromise) => boolean, last?: import("../library/index.js").GameEventPromise | undefined): void;
|
||||
checkAllGlobalHistory<T_4 extends keyof GameHistory>(key: T_4, filter: (event: GameEventPromise) => boolean, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): void;
|
||||
/**
|
||||
* @overload
|
||||
* @returns { GameHistory[] }
|
||||
|
@ -225,11 +229,11 @@ export class Game {
|
|||
* @template { keyof GameHistory } T
|
||||
* @overload
|
||||
* @param { T } key
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } [filter]
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { GameHistory[T] }
|
||||
*/
|
||||
getAllGlobalHistory<T_5 extends keyof GameHistory>(key: T_5, filter?: ((event: import('../library/index.js').GameEventPromise) => boolean) | undefined, last?: import("../library/index.js").GameEventPromise | undefined): GameHistory[T_5];
|
||||
getAllGlobalHistory<T_5 extends keyof GameHistory>(key: T_5, filter?: ((event: GameEventPromise) => boolean) | undefined, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): GameHistory[T_5];
|
||||
/**
|
||||
* @overload
|
||||
* @returns { void }
|
||||
|
@ -238,15 +242,15 @@ export class Game {
|
|||
/**
|
||||
* @overload
|
||||
* @param { Card } cards
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
cardsDiscard(cards: any): import('../library/index.js').GameEventPromise;
|
||||
cardsDiscard(cards: Card): GameEventPromise;
|
||||
/**
|
||||
* @overload
|
||||
* @param {Card[]} cards
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
cardsDiscard(cards: Card[]): import('../library/index.js').GameEventPromise;
|
||||
cardsDiscard(cards: Card[]): GameEventPromise;
|
||||
/**
|
||||
* @overload
|
||||
* @returns { void }
|
||||
|
@ -255,15 +259,15 @@ export class Game {
|
|||
/**
|
||||
* @overload
|
||||
* @param { Card } cards
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
cardsGotoOrdering(cards: any): import('../library/index.js').GameEventPromise;
|
||||
cardsGotoOrdering(cards: Card): GameEventPromise;
|
||||
/**
|
||||
* @overload
|
||||
* @param {Card[]} cards
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
cardsGotoOrdering(cards: Card[]): import('../library/index.js').GameEventPromise;
|
||||
cardsGotoOrdering(cards: Card[]): GameEventPromise;
|
||||
/**
|
||||
* @overload
|
||||
* @returns { void }
|
||||
|
@ -273,16 +277,16 @@ export class Game {
|
|||
* @overload
|
||||
* @param { Card } cards
|
||||
* @param { 'toRenku' | false } [bool] 为false时不触发trigger,为'toRenku'时牌放到仁库
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
cardsGotoSpecial(cards: any, bool?: false | "toRenku" | undefined): import('../library/index.js').GameEventPromise;
|
||||
cardsGotoSpecial(cards: Card, bool?: false | "toRenku" | undefined): GameEventPromise;
|
||||
/**
|
||||
* @overload
|
||||
* @param {Card[]} cards
|
||||
* @param { 'toRenku' | false } [bool] 为false时不触发trigger,为'toRenku'时牌放到仁库
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
cardsGotoSpecial(cards: Card[], bool?: false | "toRenku" | undefined): import('../library/index.js').GameEventPromise;
|
||||
cardsGotoSpecial(cards: Card[], bool?: false | "toRenku" | undefined): GameEventPromise;
|
||||
/**
|
||||
*
|
||||
* @param {...(
|
||||
|
@ -299,9 +303,9 @@ export class Game {
|
|||
any
|
||||
])[]): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* @param { import('../library/index.js').GameEventPromise } event
|
||||
* @param { GameEventPromise } event
|
||||
*/
|
||||
$cardsGotoPile(event: import('../library/index.js').GameEventPromise): void;
|
||||
$cardsGotoPile(event: GameEventPromise): void;
|
||||
/**
|
||||
* @param { false } [pause]
|
||||
*/
|
||||
|
@ -316,16 +320,22 @@ export class Game {
|
|||
* @param { string } url
|
||||
* @param { Player } [player]
|
||||
*/
|
||||
changeLand(url: string, player?: any): void;
|
||||
changeLand(url: string, player?: import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): void;
|
||||
/**
|
||||
* @param { string[] } updates
|
||||
* @param { Function } proceed
|
||||
*/
|
||||
checkFileList(updates: string[], proceed: Function): void;
|
||||
/**
|
||||
* @param {...(Player[] | Player)} args
|
||||
* @overload
|
||||
* @param {[Player[]]} args
|
||||
*/
|
||||
replaceHandcards(...args: (Player[] | Player)[]): void;
|
||||
replaceHandcards(args: [Player[]]): any;
|
||||
/**
|
||||
* @overload
|
||||
* @param {Player[]} args
|
||||
*/
|
||||
replaceHandcards(args: Player[]): any;
|
||||
/**
|
||||
* @param { string } name
|
||||
*/
|
||||
|
@ -344,7 +354,7 @@ export class Game {
|
|||
* @param { ...Parameters<typeof lib.message.client[T]> } args
|
||||
* @returns { void }
|
||||
*/
|
||||
broadcast<T_6 extends "cancel" | "onclose" | "init" | "log" | "opened" | "onconnection" | "onmessage" | "selfclose" | "reloadroom" | "createroom" | "enterroomfailed" | "roomlist" | "updaterooms" | "updateclients" | "updateevents" | "eventsdenied" | "reinit" | "exec" | "denied" | "closeDialog" | "createDialog" | "gameStart" | "updateWaiting">(func: T_6, ...args: Parameters<{
|
||||
broadcast<T_6 extends "cancel" | "onclose" | "init" | "reinit" | "log" | "opened" | "onconnection" | "onmessage" | "selfclose" | "reloadroom" | "createroom" | "enterroomfailed" | "roomlist" | "updaterooms" | "updateclients" | "updateevents" | "eventsdenied" | "exec" | "denied" | "closeDialog" | "createDialog" | "gameStart" | "updateWaiting">(func: T_6, ...args: Parameters<{
|
||||
log: (arr: any) => void;
|
||||
opened: () => void;
|
||||
onconnection: (id: any) => void;
|
||||
|
@ -376,7 +386,7 @@ export class Game {
|
|||
* @param { ...T } args
|
||||
* @returns { void }
|
||||
*/
|
||||
broadcast<T_6 extends "cancel" | "onclose" | "init" | "log" | "opened" | "onconnection" | "onmessage" | "selfclose" | "reloadroom" | "createroom" | "enterroomfailed" | "roomlist" | "updaterooms" | "updateclients" | "updateevents" | "eventsdenied" | "reinit" | "exec" | "denied" | "closeDialog" | "createDialog" | "gameStart" | "updateWaiting">(func: (...args: T_6) => void, ...args: T_6 | undefined): void;
|
||||
broadcast<T_6 extends "cancel" | "onclose" | "init" | "reinit" | "log" | "opened" | "onconnection" | "onmessage" | "selfclose" | "reloadroom" | "createroom" | "enterroomfailed" | "roomlist" | "updaterooms" | "updateclients" | "updateevents" | "eventsdenied" | "exec" | "denied" | "closeDialog" | "createDialog" | "gameStart" | "updateWaiting">(func: (...args: T_6) => void, ...args: T_6 | undefined): void;
|
||||
/**
|
||||
* @template { keyof typeof lib.message.client } T
|
||||
* @overload
|
||||
|
@ -384,7 +394,7 @@ export class Game {
|
|||
* @param { ...Parameters<typeof lib.message.client[T]> } args
|
||||
* @returns { void }
|
||||
*/
|
||||
broadcastAll<T_7 extends "cancel" | "onclose" | "init" | "log" | "opened" | "onconnection" | "onmessage" | "selfclose" | "reloadroom" | "createroom" | "enterroomfailed" | "roomlist" | "updaterooms" | "updateclients" | "updateevents" | "eventsdenied" | "reinit" | "exec" | "denied" | "closeDialog" | "createDialog" | "gameStart" | "updateWaiting">(func: T_7, ...args: Parameters<{
|
||||
broadcastAll<T_7 extends "cancel" | "onclose" | "init" | "reinit" | "log" | "opened" | "onconnection" | "onmessage" | "selfclose" | "reloadroom" | "createroom" | "enterroomfailed" | "roomlist" | "updaterooms" | "updateclients" | "updateevents" | "eventsdenied" | "exec" | "denied" | "closeDialog" | "createDialog" | "gameStart" | "updateWaiting">(func: T_7, ...args: Parameters<{
|
||||
log: (arr: any) => void;
|
||||
opened: () => void;
|
||||
onconnection: (id: any) => void;
|
||||
|
@ -416,7 +426,7 @@ export class Game {
|
|||
* @param { ...T } args
|
||||
* @returns { void }
|
||||
*/
|
||||
broadcastAll<T_7 extends "cancel" | "onclose" | "init" | "log" | "opened" | "onconnection" | "onmessage" | "selfclose" | "reloadroom" | "createroom" | "enterroomfailed" | "roomlist" | "updaterooms" | "updateclients" | "updateevents" | "eventsdenied" | "reinit" | "exec" | "denied" | "closeDialog" | "createDialog" | "gameStart" | "updateWaiting">(func: (...args: T_7) => void, ...args: T_7 | undefined): void;
|
||||
broadcastAll<T_7 extends "cancel" | "onclose" | "init" | "reinit" | "log" | "opened" | "onconnection" | "onmessage" | "selfclose" | "reloadroom" | "createroom" | "enterroomfailed" | "roomlist" | "updaterooms" | "updateclients" | "updateevents" | "eventsdenied" | "exec" | "denied" | "closeDialog" | "createDialog" | "gameStart" | "updateWaiting">(func: (...args: T_7) => void, ...args: T_7 | undefined): void;
|
||||
syncState(): void;
|
||||
updateWaiting(): void;
|
||||
/**
|
||||
|
@ -484,7 +494,7 @@ export class Game {
|
|||
* //如果key中包含发动技能的角色名player,则直接改用info.audioname2[player]来播放语音
|
||||
* ```
|
||||
*/
|
||||
parseSkillAudio(skill: string, player?: Player | string, skillInfo?: {
|
||||
parseSkillAudio(skill: string, player?: string | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined, skillInfo?: {
|
||||
audio: string | number | boolean | [string, number];
|
||||
audioname?: string[] | undefined;
|
||||
audioname2?: {
|
||||
|
@ -838,7 +848,7 @@ export class Game {
|
|||
* @param { any } [content]
|
||||
* @returns
|
||||
*/
|
||||
addVideo(type: string, player: any, content?: any): void;
|
||||
addVideo(type: string, player: Player, content?: any): void;
|
||||
/**
|
||||
* @param { Function } func
|
||||
*/
|
||||
|
@ -876,18 +886,18 @@ export class Game {
|
|||
* @param { string } name
|
||||
* @param { string } skill
|
||||
* @param { Player } player
|
||||
* @param { import('../library/index.js').GameEventPromise } event
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
* @param { GameEventPromise } event
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
createTrigger(name: string, skill: string, player: any, event: import('../library/index.js').GameEventPromise, indexedData: any): import('../library/index.js').GameEventPromise;
|
||||
createTrigger(name: string, skill: string, player: Player, event: GameEventPromise, indexedData: any): GameEventPromise;
|
||||
/**
|
||||
* @legacy Use {@link lib.element.GameEvent.constructor} instead.
|
||||
*
|
||||
* @param { string } name
|
||||
* @param { false } [trigger]
|
||||
* @param { import('../library/index.js').GameEventPromise } [triggerEvent]
|
||||
* @param { GameEventPromise } [triggerEvent]
|
||||
*/
|
||||
createEvent(name: string, trigger?: false | undefined, triggerEvent?: import("../library/index.js").GameEventPromise | undefined): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise;
|
||||
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;
|
||||
/**
|
||||
* @param { string } name
|
||||
* @param { { extension: string, sex: Sex, group: string, hp: string | number, skills?: string[], tags?: any[], translate: string } } information
|
||||
|
@ -921,7 +931,7 @@ export class Game {
|
|||
* @param { Card } info
|
||||
* @param { { extension: string, translate: string, description: string, number?: number, color?: string } } info2
|
||||
*/
|
||||
addCard(name: string, info: any, info2: {
|
||||
addCard(name: string, info: Card, info2: {
|
||||
extension: string;
|
||||
translate: string;
|
||||
description: string;
|
||||
|
@ -938,7 +948,7 @@ export class Game {
|
|||
forbid?: string[] | undefined;
|
||||
list: any[];
|
||||
card: {
|
||||
[key: string]: any;
|
||||
[key: string]: import("noname-typings/nonameModules/noname/library/element/card.js").Card;
|
||||
};
|
||||
skill: {
|
||||
[key: string]: any;
|
||||
|
@ -970,7 +980,7 @@ export class Game {
|
|||
* @param { string } skill
|
||||
* @param { Player } [player]
|
||||
*/
|
||||
addGlobalSkill(skill: string, player?: any): boolean;
|
||||
addGlobalSkill(skill: string, player?: import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): boolean;
|
||||
/**
|
||||
* @param { string } skill
|
||||
* @param { lib.element.Player } player
|
||||
|
@ -980,7 +990,7 @@ export class Game {
|
|||
/**
|
||||
* @param { string } extensionName
|
||||
*/
|
||||
hasExtension(extensionName: string): any;
|
||||
hasExtension(extensionName: string): boolean;
|
||||
/**
|
||||
* @param { string } extensionName
|
||||
*/
|
||||
|
@ -988,7 +998,7 @@ export class Game {
|
|||
/**
|
||||
* @param { string } extensionName
|
||||
*/
|
||||
hasExtensionLoaded(extensionName: string): any;
|
||||
hasExtensionLoaded(extensionName: string): boolean;
|
||||
/**
|
||||
* @param { string } extensionName
|
||||
* @param { Function } runnable
|
||||
|
@ -1004,7 +1014,7 @@ export class Game {
|
|||
* @overload
|
||||
* @returns { Card }
|
||||
*/
|
||||
createCard(): any;
|
||||
createCard(): Card;
|
||||
/**
|
||||
* @overload
|
||||
* @param { Card | string } name
|
||||
|
@ -1017,7 +1027,7 @@ export class Game {
|
|||
* @overload
|
||||
* @returns { Card }
|
||||
*/
|
||||
createCard2(): any;
|
||||
createCard2(): Card;
|
||||
/**
|
||||
* @overload
|
||||
* @param { Card | string } name
|
||||
|
@ -1046,17 +1056,17 @@ export class Game {
|
|||
*/
|
||||
executingAsyncEventMap: Map<GameEvent, Promise<any>>;
|
||||
/**
|
||||
* @type { import('../library/index.js').GameEventPromise[] }
|
||||
* @type { GameEventPromise[] }
|
||||
*/
|
||||
belongAsyncEventList: import('../library/index.js').GameEventPromise[];
|
||||
belongAsyncEventList: GameEventPromise[];
|
||||
/**
|
||||
* @param { import('../library/index.js').GameEventPromise } [belongAsyncEvent]
|
||||
* @param { GameEventPromise } [belongAsyncEvent]
|
||||
*/
|
||||
loop(belongAsyncEvent?: import("../library/index.js").GameEventPromise | undefined): Promise<void>;
|
||||
loop(belongAsyncEvent?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): Promise<void>;
|
||||
/**
|
||||
* @param { import('../library/index.js').GameEventPromise } [belongAsyncEvent]
|
||||
* @param { GameEventPromise } [belongAsyncEvent]
|
||||
*/
|
||||
runContent(belongAsyncEvent?: import("../library/index.js").GameEventPromise | undefined): Promise<any>;
|
||||
runContent(belongAsyncEvent?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): Promise<any>;
|
||||
pause(): void;
|
||||
pause2(): void;
|
||||
resume(): void;
|
||||
|
@ -1092,9 +1102,9 @@ export class Game {
|
|||
*/
|
||||
asyncDelayx(time?: number | undefined, time2?: number | undefined): Promise<void>;
|
||||
/**
|
||||
* @param { import('../library/index.js').GameEventPromise } [event]
|
||||
* @param { GameEventPromise } [event]
|
||||
*/
|
||||
check(event?: import("../library/index.js").GameEventPromise | undefined): boolean;
|
||||
check(event?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): boolean;
|
||||
Check: Check;
|
||||
uncheck(...args: any[]): void;
|
||||
/**
|
||||
|
@ -1104,21 +1114,21 @@ export class Game {
|
|||
* @param { boolean } [behind]
|
||||
* @param { boolean } [noanimate]
|
||||
*/
|
||||
swapSeat(player1: any, player2: any, prompt?: boolean | undefined, behind?: boolean | undefined, noanimate?: boolean | undefined): void;
|
||||
swapSeat(player1: Player, player2: Player, prompt?: boolean | undefined, behind?: boolean | undefined, noanimate?: boolean | undefined): void;
|
||||
/**
|
||||
* @param { Player } player1
|
||||
* @param { Player } [player2]
|
||||
*/
|
||||
swapPlayer(player: any, player2?: any): void;
|
||||
swapPlayer(player: any, player2?: import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): void;
|
||||
/**
|
||||
* @param { Player } player
|
||||
*/
|
||||
swapControl(player: any): void;
|
||||
swapControl(player: Player): void;
|
||||
swapPlayerAuto(player: any): void;
|
||||
/**
|
||||
* @param { Player } player
|
||||
*/
|
||||
findNext(player: any): any;
|
||||
findNext(player: Player): import("noname-typings/nonameModules/noname/library/element/player.js").Player;
|
||||
/**
|
||||
* @param { string } name
|
||||
* @param { Function } callback
|
||||
|
@ -1140,20 +1150,20 @@ export class Game {
|
|||
/**
|
||||
* @param { Player } player
|
||||
*/
|
||||
phaseLoop(player: any): void;
|
||||
phaseLoop(player: Player): void;
|
||||
/**
|
||||
* @param { Player } [player]
|
||||
*/
|
||||
gameDraw(player?: any, num?: number): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise;
|
||||
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;
|
||||
chooseCharacterDouble(...args: any[]): void;
|
||||
updateRoundNumber(): void;
|
||||
/**
|
||||
* @param { Player[] } players
|
||||
* @param { number | number[] | (player: Player) => number } num
|
||||
* @param { number | number[] | (player: Player) => number } [num]
|
||||
* @param { { drawDeck: boolean } } [drawDeck]
|
||||
* @param { boolean } [bottom]
|
||||
*/
|
||||
asyncDraw(players: Player[], num: number | number[] | ((player: any) => number), drawDeck?: {
|
||||
asyncDraw(players: Player[], num?: number | number[] | ((player: Player) => number) | undefined, drawDeck?: {
|
||||
drawDeck: boolean;
|
||||
} | undefined, bottom?: boolean | undefined): void;
|
||||
/**
|
||||
|
@ -1161,7 +1171,7 @@ export class Game {
|
|||
* @param { number | number[] | (player: Player) => number } num
|
||||
* @param { { drawDeck: boolean } } [drawDeck]
|
||||
*/
|
||||
asyncDrawAuto(players: Player[], num: number | number[] | ((player: any) => number), drawDeck?: {
|
||||
asyncDrawAuto(players: Player[], num: number | number[] | ((player: Player) => number), drawDeck?: {
|
||||
drawDeck: boolean;
|
||||
} | undefined, ...args: any[]): void;
|
||||
finishSkill(i: any, sub: any): void;
|
||||
|
@ -1181,11 +1191,11 @@ export class Game {
|
|||
* @param { Player } player
|
||||
* @param { string | Card[] } card
|
||||
* @param { Player[] } [targets]
|
||||
* @param { import('../library/index.js').GameEventPromise } [event]
|
||||
* @param { GameEventPromise } [event]
|
||||
* @param { boolean } [forced]
|
||||
* @param { string } [logvid]
|
||||
*/
|
||||
logv(player: any, card: string | Card[], targets?: any[] | undefined, event?: import("../library/index.js").GameEventPromise | undefined, forced?: boolean | undefined, logvid?: string | undefined): HTMLDivElement | undefined;
|
||||
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;
|
||||
/**
|
||||
* @param { string } storeName
|
||||
* @param { string } idbValidKey
|
||||
|
@ -1267,28 +1277,28 @@ export class Game {
|
|||
/**
|
||||
* @param { Player } player
|
||||
*/
|
||||
triggerEnter(player: any): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise;
|
||||
triggerEnter(player: Player): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
* @param { Player } player
|
||||
*/
|
||||
restorePlayer(player: any): any;
|
||||
restorePlayer(player: Player): import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined;
|
||||
/**
|
||||
* @param { Player } player
|
||||
*/
|
||||
removePlayer(player: any): any;
|
||||
removePlayer(player: Player): import("noname-typings/nonameModules/noname/library/element/player.js").Player;
|
||||
/**
|
||||
* @param { Player } player
|
||||
* @param { string } [character]
|
||||
* @param { string } [character2]
|
||||
*/
|
||||
replacePlayer(player: any, character?: string | undefined, character2?: string | undefined): import("../library/element/player.js").Player;
|
||||
replacePlayer(player: Player, character?: string | undefined, character2?: string | undefined): import("../library/element/player.js").Player;
|
||||
arrangePlayers(): void;
|
||||
/**
|
||||
* @param { string[] } skills
|
||||
* @param { Player } player
|
||||
* @param { string[] } exclude
|
||||
*/
|
||||
filterSkills(skills: string[], player: any, exclude: string[]): string[];
|
||||
filterSkills(skills: string[], player: Player, exclude: string[]): string[];
|
||||
/**
|
||||
* @param { string[] } skills
|
||||
*/
|
||||
|
@ -1303,22 +1313,22 @@ export class Game {
|
|||
* @param { (player: Player) => boolean } func
|
||||
* @param { boolean } [includeOut]
|
||||
*/
|
||||
hasPlayer(func: (player: any) => boolean, includeOut?: boolean | undefined): boolean;
|
||||
hasPlayer(func: (player: Player) => boolean, includeOut?: boolean | undefined): boolean;
|
||||
/**
|
||||
* @param { (player: Player) => boolean } func
|
||||
* @param { boolean } [includeOut]
|
||||
*/
|
||||
hasPlayer2(func: (player: any) => boolean, includeOut?: boolean | undefined): boolean;
|
||||
hasPlayer2(func: (player: Player) => boolean, includeOut?: boolean | undefined): boolean;
|
||||
/**
|
||||
* @param { (player: Player) => boolean } func
|
||||
* @param { boolean } [includeOut]
|
||||
*/
|
||||
countPlayer(func: (player: any) => boolean, includeOut?: boolean | undefined): any;
|
||||
countPlayer(func: (player: Player) => boolean, includeOut?: boolean | undefined): number;
|
||||
/**
|
||||
* @param { (player: Player) => boolean } func
|
||||
* @param { boolean } [includeOut]
|
||||
*/
|
||||
countPlayer2(func: (player: any) => boolean, includeOut?: boolean | undefined): any;
|
||||
countPlayer2(func: (player: Player) => boolean, includeOut?: boolean | undefined): number;
|
||||
/**
|
||||
* @overload
|
||||
* @returns { Player[] }
|
||||
|
@ -1331,7 +1341,7 @@ export class Game {
|
|||
* @param { boolean } [includeOut]
|
||||
* @returns { Player[] }
|
||||
*/
|
||||
filterPlayer(func: (player: any) => boolean, list?: any[] | undefined, includeOut?: boolean | undefined): Player[];
|
||||
filterPlayer(func: (player: Player) => boolean, list?: import("noname-typings/nonameModules/noname/library/element/player.js").Player[] | undefined, includeOut?: boolean | undefined): Player[];
|
||||
/**
|
||||
* @overload
|
||||
* @returns { Player[] }
|
||||
|
@ -1344,23 +1354,23 @@ export class Game {
|
|||
* @param { boolean } [includeOut]
|
||||
* @returns { Player[] }
|
||||
*/
|
||||
filterPlayer2(func: (player: any) => boolean, list?: any[] | undefined, includeOut?: boolean | undefined): Player[];
|
||||
filterPlayer2(func: (player: Player) => boolean, list?: import("noname-typings/nonameModules/noname/library/element/player.js").Player[] | undefined, includeOut?: boolean | undefined): Player[];
|
||||
/**
|
||||
* @param { (player: Player) => boolean } func
|
||||
* @param { boolean } [includeOut]
|
||||
*/
|
||||
findPlayer(func: (player: any) => boolean, includeOut?: boolean | undefined): any;
|
||||
findPlayer(func: (player: Player) => boolean, includeOut?: boolean | undefined): import("noname-typings/nonameModules/noname/library/element/player.js").Player | null;
|
||||
/**
|
||||
* @param { (player: Player) => boolean } func
|
||||
* @param { boolean } [includeOut]
|
||||
*/
|
||||
findPlayer2(func: (player: any) => boolean, includeOut?: boolean | undefined): any;
|
||||
findPlayer2(func: (player: Player) => boolean, includeOut?: boolean | undefined): import("noname-typings/nonameModules/noname/library/element/player.js").Player | null;
|
||||
/**
|
||||
* @param { (player: Player) => boolean } func
|
||||
* @param { boolean } [all]
|
||||
*/
|
||||
findCards(func: (player: any) => boolean, all?: boolean | undefined): string[];
|
||||
countGroup(): any;
|
||||
findCards(func: (player: Player) => boolean, all?: boolean | undefined): string[];
|
||||
countGroup(): number;
|
||||
/**
|
||||
* 此函数用于计算函数的时间消耗。
|
||||
* @param {function} 测试的函数
|
||||
|
@ -1374,7 +1384,7 @@ export class Game {
|
|||
* @param { (player: Player, i: number) => Promise<any | void> } asyncFunc 需要执行的async方法
|
||||
* @param { (a: Player, b: Player) => number } sort 排序器,默认为lib.sort.seat
|
||||
*/
|
||||
doAsyncInOrder(targets: Player[], asyncFunc: (player: any, i: number) => Promise<any | void>, sort: (a: any, b: any) => number): Promise<void>;
|
||||
doAsyncInOrder(targets: Player[], asyncFunc: (player: Player, i: number) => Promise<any | void>, sort: (a: Player, b: Player) => number): Promise<void>;
|
||||
}
|
||||
export let game: Game;
|
||||
export function setGame(instance?: Game | undefined): void;
|
||||
|
@ -1403,6 +1413,6 @@ export type Videos = {
|
|||
};
|
||||
import { GamePromises } from "./promises.js";
|
||||
import { DynamicStyle } from "./dynamic-style/index.js";
|
||||
import { lib } from '../library/index.js';
|
||||
import { lib } from "../library/index.js";
|
||||
import { Check } from "./check.js";
|
||||
import { delay } from "../util/index.js";
|
||||
|
|
|
@ -25,7 +25,11 @@ export class GamePromises {
|
|||
*/
|
||||
alert(title: string): Promise<true>;
|
||||
download(url: any, folder: any, dev: any, onprogress: any): Promise<any>;
|
||||
readFile(filename: any): Promise<any>;
|
||||
/**
|
||||
* @param {string} filename
|
||||
* @returns {Promise<ArrayBuffer | Buffer>}
|
||||
*/
|
||||
readFile(filename: string): Promise<ArrayBuffer | Buffer>;
|
||||
readFileAsText(filename: any): Promise<any>;
|
||||
writeFile(data: any, path: any, name: any): Promise<any>;
|
||||
ensureDirectory(list: any, callback: any, file: any): Promise<any>;
|
||||
|
|
|
@ -74,7 +74,7 @@ export class Get {
|
|||
* @param { false | Player } [player]
|
||||
* @returns { string[] }
|
||||
*/
|
||||
subtypes(obj: string | Card | VCard | CardBaseUIData, player?: false | Player): string[];
|
||||
subtypes(obj: string | Card | VCard | CardBaseUIData, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): string[];
|
||||
/**
|
||||
* @returns { string[] }
|
||||
*/
|
||||
|
@ -90,7 +90,7 @@ export class Get {
|
|||
* @param { Player } player
|
||||
* @returns { string[] }
|
||||
*/
|
||||
skillCategoriesOf(skill: string, player: any): string[];
|
||||
skillCategoriesOf(skill: string, player: Player): string[];
|
||||
numOf(obj: any, item: any): any;
|
||||
connectNickname(): any;
|
||||
zhinangs(filter: any): any;
|
||||
|
@ -99,7 +99,7 @@ export class Get {
|
|||
infoHp(hp: any): number;
|
||||
infoMaxHp(hp: any): number;
|
||||
infoHujia(hp: any): number;
|
||||
bottomCards(num: any, putBack: any): any;
|
||||
bottomCards(num: any, putBack: any): Node | Node[];
|
||||
discarded(): any;
|
||||
cardOffset(): number;
|
||||
colorspan(str: any): any;
|
||||
|
@ -175,7 +175,7 @@ export class Get {
|
|||
charactersOL(func: any): number[];
|
||||
trimip(str: any): any;
|
||||
mode(): any;
|
||||
idDialog(id: any): any;
|
||||
idDialog(id: any): import("noname-typings/nonameModules/noname/library/element/dialog.js").Dialog | null;
|
||||
arenaState(): {
|
||||
number: string | undefined;
|
||||
players: {};
|
||||
|
@ -198,7 +198,7 @@ export class Get {
|
|||
rank(name: any, num: any): number | "x" | "s" | "c" | "d" | "b" | "a" | "ap" | "am" | "bp" | "bm" | "sp";
|
||||
skillRank(skill: any, type: any, grouped: any): number;
|
||||
targetsInfo(targets: any): any[];
|
||||
infoTargets(infos: any): any[];
|
||||
infoTargets(infos: any): import("noname-typings/nonameModules/noname/library/element/player.js").Player[];
|
||||
cardInfo(card: any): any[];
|
||||
cardsInfo(cards?: any[]): any[][];
|
||||
infoCard(info: any): import("../library/element/card.js").Card;
|
||||
|
@ -279,25 +279,25 @@ export class Get {
|
|||
* @param { Button } obj
|
||||
* @returns { 'button' }
|
||||
*/
|
||||
itemtype(obj: any): 'button';
|
||||
itemtype(obj: Button): 'button';
|
||||
/**
|
||||
* @overload
|
||||
* @param { Card } obj
|
||||
* @returns { 'card' }
|
||||
*/
|
||||
itemtype(obj: any): 'card';
|
||||
itemtype(obj: Card): 'card';
|
||||
/**
|
||||
* @overload
|
||||
* @param { Player } obj
|
||||
* @returns { 'player' }
|
||||
*/
|
||||
itemtype(obj: any): 'player';
|
||||
itemtype(obj: Player): 'player';
|
||||
/**
|
||||
* @overload
|
||||
* @param { Dialog } obj
|
||||
* @returns { 'dialog' }
|
||||
*/
|
||||
itemtype(obj: any): 'dialog';
|
||||
itemtype(obj: Dialog): 'dialog';
|
||||
/**
|
||||
* @overload
|
||||
* @param { GameEvent | GameEventPromise } obj
|
||||
|
@ -314,7 +314,7 @@ export class Get {
|
|||
* @param { false | Player } [player]
|
||||
* @returns { string }
|
||||
*/
|
||||
subtype(obj: string | Card | VCard | CardBaseUIData, player?: false | Player): string;
|
||||
subtype(obj: string | Card | VCard | CardBaseUIData, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): string;
|
||||
equiptype(card: any, player: any): number;
|
||||
/**
|
||||
*
|
||||
|
@ -322,40 +322,40 @@ export class Get {
|
|||
* @param { false | Player } [player]
|
||||
* @returns { string }
|
||||
*/
|
||||
name(card: Card | VCard | CardBaseUIData, player?: false | Player): string;
|
||||
name(card: Card | VCard | CardBaseUIData, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): string;
|
||||
/**
|
||||
* @param {Card | VCard | Card[] | VCard[]} card
|
||||
* @param {false | Player} [player]
|
||||
* @returns {string}
|
||||
*/
|
||||
suit(card: Card | VCard | Card[] | VCard[], player?: false | Player): string;
|
||||
suit(card: Card | VCard | Card[] | VCard[], player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): string;
|
||||
/**
|
||||
* @param {Card | VCard | Card[] | VCard[]} card
|
||||
* @param {false | Player} [player]
|
||||
* @returns {string}
|
||||
*/
|
||||
color(card: Card | VCard | Card[] | VCard[], player?: false | Player): string;
|
||||
color(card: Card | VCard | Card[] | VCard[], player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): string;
|
||||
/**
|
||||
* @param {Card | VCard} card
|
||||
* @param {false | Player} [player]
|
||||
* @returns {number}
|
||||
*/
|
||||
number(card: Card | VCard, player?: false | Player): number;
|
||||
number(card: Card | VCard, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): 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 | Player): string;
|
||||
nature(card: string | string[] | Card | VCard, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): string;
|
||||
/**
|
||||
* 返回包含所有属性的数组
|
||||
* @param {string[] | string} card
|
||||
* @param {false | Player} [player]
|
||||
* @returns {string[]}
|
||||
*/
|
||||
natureList(card: string[] | string, player?: false | Player): string[];
|
||||
cards(num: any, putBack: any): any;
|
||||
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[];
|
||||
judge(card: any): any;
|
||||
judge2(card: any): any;
|
||||
distance(from: any, to: any, method: any): number;
|
||||
|
@ -371,7 +371,7 @@ export class Get {
|
|||
* @param { Player | false } [player]
|
||||
* @returns { any }
|
||||
*/
|
||||
info(item: Card | VCard | CardBaseUIData, player?: Player | false): any;
|
||||
info(item: Card | VCard | CardBaseUIData, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): any;
|
||||
/**
|
||||
* @param { number | Select | (()=>Select) } [select]
|
||||
* @returns { Select }
|
||||
|
@ -382,16 +382,16 @@ export class Get {
|
|||
* @overload
|
||||
* @returns {GameEvent}
|
||||
*/
|
||||
event(): any;
|
||||
event(): GameEvent;
|
||||
/**
|
||||
* @template { keyof GameEvent } T
|
||||
* @overload
|
||||
* @param {T} key
|
||||
* @returns {GameEvent[T]}
|
||||
*/
|
||||
event<T_2 extends string | number | symbol>(key: T_2): any;
|
||||
player(): any;
|
||||
players(sort: any, dead: any, out: any): any[];
|
||||
event<T_2 extends keyof import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent>(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;
|
||||
skillTranslation(str: any, player: any): string;
|
||||
skillInfoTranslation(name: any, player: any): any;
|
||||
|
@ -412,12 +412,12 @@ export class Get {
|
|||
* @param {((a: Button, b: Button) => number)} [sort] 排序函数
|
||||
* @returns { Button[] }
|
||||
*/
|
||||
selectableButtons(sort?: ((a: any, b: any) => number) | undefined): Button[];
|
||||
selectableButtons(sort?: ((a: Button, b: Button) => number) | undefined): Button[];
|
||||
/**
|
||||
* @param {((a: Card, b: Card) => number)} [sort] 排序函数
|
||||
* @returns { Card[] }
|
||||
*/
|
||||
selectableCards(sort?: ((a: any, b: any) => number) | undefined): Card[];
|
||||
selectableCards(sort?: ((a: Card, b: Card) => number) | undefined): Card[];
|
||||
/**
|
||||
* @returns { string[] } 技能名数组
|
||||
*/
|
||||
|
@ -429,11 +429,11 @@ export class Get {
|
|||
* @param {((a: Player, b: Player) => number)} [sort] 排序函数
|
||||
* @returns { Player[] }
|
||||
*/
|
||||
selectableTargets(sort?: ((a: any, b: any) => number) | undefined): Player[];
|
||||
selectableTargets(sort?: ((a: Player, b: Player) => number) | undefined): Player[];
|
||||
filter(filter: any, i: any): any;
|
||||
cardCount(card: any, player: any): any;
|
||||
skillCount(skill: any, player: any): any;
|
||||
owner(card: any, method: any): any;
|
||||
owner(card: any, method: any): import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined;
|
||||
noSelected(): boolean;
|
||||
population(identity: any): number;
|
||||
totalPopulation(identity: any): number;
|
||||
|
@ -467,8 +467,8 @@ export class Get {
|
|||
unuseful3(card: any): number;
|
||||
value(card: any, player: any, method: any): any;
|
||||
equipResult(player: any, target: any, name: any): number;
|
||||
equipValue(card: any, player: any): any;
|
||||
equipValueNumber(card: any): any;
|
||||
equipValue(card: any, player: any): number;
|
||||
equipValueNumber(card: any): number;
|
||||
disvalue(card: any, player: any): number;
|
||||
disvalue2(card: any, player: any): number;
|
||||
skillthreaten(skill: any, player: any, target: any): number | void;
|
||||
|
@ -476,7 +476,7 @@ export class Get {
|
|||
/**
|
||||
* @returns { number }
|
||||
*/
|
||||
order(item: any, player?: any): number;
|
||||
order(item: any, player?: import("noname-typings/nonameModules/noname/library/element/player.js").Player): number;
|
||||
result(item: any, skill: any): any;
|
||||
cacheEffectUse(target: any, card: any, player: any, player2: any, isLink: any): number;
|
||||
effect_use(target: any, card: any, player: any, player2: any, isLink: any): number;
|
||||
|
|
|
@ -5,14 +5,14 @@ export class Is {
|
|||
* @param { false | Player } [player]
|
||||
* @returns { boolean }
|
||||
*/
|
||||
attackingMount(card: Card | VCard, player?: false | Player): boolean;
|
||||
attackingMount(card: Card | VCard, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): boolean;
|
||||
/**
|
||||
* 判断是否为防御坐骑
|
||||
* @param { Card | VCard } card
|
||||
* @param { false | Player } [player]
|
||||
* @returns { boolean }
|
||||
*/
|
||||
defendingMount(card: Card | VCard, player?: false | Player): boolean;
|
||||
defendingMount(card: Card | VCard, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): boolean;
|
||||
/**
|
||||
* 判断坐骑栏是否被合并
|
||||
* @returns { boolean }
|
||||
|
@ -34,7 +34,7 @@ export class Is {
|
|||
* 判断一张牌是否为明置手牌
|
||||
* @param { Card } card
|
||||
*/
|
||||
shownCard(card: any): boolean;
|
||||
shownCard(card: Card): boolean;
|
||||
/**
|
||||
* 是否是虚拟牌
|
||||
* @param { Card | VCard } card
|
||||
|
@ -49,7 +49,7 @@ export class Is {
|
|||
* 是否是实体牌
|
||||
* @param { Card | VCard } card
|
||||
*/
|
||||
ordinaryCard(card: Card | VCard): any;
|
||||
ordinaryCard(card: Card | VCard): boolean;
|
||||
/**
|
||||
* 押韵判断
|
||||
* @param { string } str1
|
||||
|
@ -61,7 +61,7 @@ export class Is {
|
|||
* @param { Player } player 玩家
|
||||
* @returns
|
||||
*/
|
||||
blocked(skill: string, player: any): boolean;
|
||||
blocked(skill: string, player: Player): boolean;
|
||||
/**
|
||||
* 是否是双势力武将
|
||||
* @param { string } name
|
||||
|
@ -107,7 +107,7 @@ export class Is {
|
|||
/**
|
||||
* @param { GameEventPromise } event
|
||||
*/
|
||||
converted(event: any): boolean;
|
||||
converted(event: GameEventPromise): boolean;
|
||||
safari(): boolean;
|
||||
/**
|
||||
* @param { (Card | VCard)[]} cards
|
||||
|
@ -162,14 +162,14 @@ export class Is {
|
|||
/**
|
||||
* @param { Player } [player]
|
||||
*/
|
||||
mobileMe(player?: any): any;
|
||||
mobileMe(player?: import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): boolean | undefined;
|
||||
newLayout(): boolean;
|
||||
phoneLayout(): boolean;
|
||||
singleHandcard(): any;
|
||||
/**
|
||||
* @param { Player } player
|
||||
*/
|
||||
linked2(player: any): boolean;
|
||||
linked2(player: Player): boolean;
|
||||
/**
|
||||
* @param { {} } obj
|
||||
*/
|
||||
|
@ -183,11 +183,11 @@ export class Is {
|
|||
* @param { Player } player
|
||||
* @returns
|
||||
*/
|
||||
locked(skill: string, player: any): any;
|
||||
locked(skill: string, player: Player): any;
|
||||
/**
|
||||
* @param { string } skill
|
||||
* @param { Player } player
|
||||
* @returns
|
||||
*/
|
||||
zhuanhuanji(skill: string, player: any): boolean;
|
||||
zhuanhuanji(skill: string, player: Player): boolean;
|
||||
}
|
||||
|
|
2
node_modules/@types/noname-typings/nonameModules/noname/library/element/button.d.ts
generated
vendored
2
node_modules/@types/noname-typings/nonameModules/noname/library/element/button.d.ts
generated
vendored
|
@ -14,4 +14,4 @@ export class Button extends HTMLDivElement {
|
|||
exclude(): void;
|
||||
get updateTransform(): (bool: any, delay: any) => void;
|
||||
}
|
||||
import { ui } from '../../ui/index.js';
|
||||
import { ui } from "../../ui/index.js";
|
||||
|
|
4
node_modules/@types/noname-typings/nonameModules/noname/library/element/card.d.ts
generated
vendored
4
node_modules/@types/noname-typings/nonameModules/noname/library/element/card.d.ts
generated
vendored
|
@ -34,6 +34,10 @@ export class Card extends HTMLDivElement {
|
|||
* @type { string }
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* @type { boolean }
|
||||
*/
|
||||
isCard: boolean;
|
||||
selfDestroy(event: any): void;
|
||||
willBeDestroyed(targetPosition: any, player: any, event: any): any;
|
||||
hasNature(nature: any, player: any): boolean;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/**
|
||||
* @type { SMap<((event: GameEventPromise, trigger: GameEventPromise, player: Player) => Promise<any>)[]> }
|
||||
*/
|
||||
export const Contents: SMap<((event: any, trigger: any, player: any) => Promise<any>)[]>;
|
||||
export const Contents: SMap<((event: GameEventPromise, trigger: GameEventPromise, player: Player) => Promise<any>)[]>;
|
||||
|
|
4
node_modules/@types/noname-typings/nonameModules/noname/library/element/dialog.d.ts
generated
vendored
4
node_modules/@types/noname-typings/nonameModules/noname/library/element/dialog.d.ts
generated
vendored
|
@ -22,14 +22,14 @@ export class Dialog extends HTMLDivElement {
|
|||
* @param {*} [noclick]
|
||||
* @param { boolean } [zoom]
|
||||
*/
|
||||
add(item: string | HTMLDivElement | Card[] | Player[], noclick?: any, zoom?: boolean | undefined): string | any[] | HTMLDivElement;
|
||||
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;
|
||||
/**
|
||||
* @param { string } str
|
||||
* @param { boolean } [center]
|
||||
*/
|
||||
addText(str: string, center?: boolean | undefined): this;
|
||||
addSmall(item: any, noclick: any): string | any[] | HTMLDivElement;
|
||||
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;
|
||||
_dragtransform: any;
|
||||
|
|
54
node_modules/@types/noname-typings/nonameModules/noname/library/element/gameEvent.d.ts
generated
vendored
54
node_modules/@types/noname-typings/nonameModules/noname/library/element/gameEvent.d.ts
generated
vendored
|
@ -43,15 +43,19 @@ export class GameEvent {
|
|||
/**
|
||||
* @type { Player }
|
||||
*/
|
||||
source: any;
|
||||
source: Player;
|
||||
/**
|
||||
* @type { Player }
|
||||
*/
|
||||
player: any;
|
||||
player: Player;
|
||||
/**
|
||||
* @type { Player[] }
|
||||
*/
|
||||
players: Player[];
|
||||
/**
|
||||
* @type { Player }
|
||||
*/
|
||||
target: any;
|
||||
target: Player;
|
||||
/**
|
||||
* @type { Player[] }
|
||||
*/
|
||||
|
@ -59,7 +63,7 @@ export class GameEvent {
|
|||
/**
|
||||
* @type { Card }
|
||||
*/
|
||||
card: any;
|
||||
card: Card;
|
||||
/**
|
||||
* @type { Card[] }
|
||||
*/
|
||||
|
@ -87,7 +91,7 @@ export class GameEvent {
|
|||
/**
|
||||
* @type { Player }
|
||||
*/
|
||||
customSource: any;
|
||||
customSource: Player;
|
||||
/**
|
||||
* @type { number }
|
||||
*/
|
||||
|
@ -121,9 +125,37 @@ export class GameEvent {
|
|||
*/
|
||||
parent: GameEventPromise | void | null;
|
||||
/**
|
||||
* @type { Function | void | null }
|
||||
* @type { (this: GameEventPromise) => any | undefined | void | null }
|
||||
*/
|
||||
filterStop: Function | void | null;
|
||||
filterStop: (this: GameEventPromise) => any | undefined | void | null;
|
||||
/**
|
||||
* @type { Result['cost_data'] }
|
||||
*/
|
||||
cost_data: Result['cost_data'];
|
||||
/**
|
||||
* @type { boolean }
|
||||
*/
|
||||
responded: boolean;
|
||||
/**
|
||||
* @type { string | undefined }
|
||||
*/
|
||||
judgestr: string | undefined;
|
||||
/**
|
||||
* @type { boolean }
|
||||
*/
|
||||
judging: boolean;
|
||||
/**
|
||||
* @type { Function | undefined }
|
||||
*/
|
||||
judge2: Function | undefined;
|
||||
/**
|
||||
* @type { Card[] }
|
||||
*/
|
||||
orderingCards: Card[];
|
||||
/**
|
||||
* @type { Function | undefined }
|
||||
*/
|
||||
ai: Function | undefined;
|
||||
/**
|
||||
* @param {keyof this} key
|
||||
* @param {number} [value]
|
||||
|
@ -232,12 +264,12 @@ export class GameEvent {
|
|||
* 获取事件的父节点。
|
||||
* 获取事件链上的指定事件。
|
||||
* 默认获取上一个父节点(核心)。
|
||||
* @param {number|string|(evt:gameEvent)=>boolean} [level=1] 获取深度(number)/指定名字(string)/指定特征(function)
|
||||
* @param {number|string|((evt:GameEvent)=>boolean)} [level=1] 获取深度(number)/指定名字(string)/指定特征(function)
|
||||
* @param {boolean} [forced] 若获取不到节点,默认返回{},若forced为true则返回null
|
||||
* @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) | undefined, forced?: boolean | undefined, includeSelf?: boolean | undefined): GameEvent | {} | null;
|
||||
getTrigger(): any;
|
||||
getRand(name: any): any;
|
||||
_rand_map: {} | undefined;
|
||||
|
@ -267,8 +299,8 @@ export class GameEvent {
|
|||
_cardChoice: any;
|
||||
_targetChoice: any;
|
||||
_skillChoice: any;
|
||||
isMine(): any;
|
||||
isOnline(): any;
|
||||
isMine(): boolean;
|
||||
isOnline(): boolean;
|
||||
notLink(): boolean;
|
||||
isPhaseUsing(player: any): boolean;
|
||||
addTrigger(skills: any, player: any): this;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* game.log('等待', player, '摸牌完成执行log');
|
||||
* ```
|
||||
*/
|
||||
export class GameEventPromise extends Promise<any> {
|
||||
export class GameEventPromise extends Promise<import("noname-typings/nonameModules/noname/library/element/gameEvent.js").GameEvent> {
|
||||
/**
|
||||
* @param { import('./gameEvent.js').GameEvent } arg
|
||||
*/
|
||||
|
@ -140,10 +140,6 @@ export class GameEventPromise extends Promise<any> {
|
|||
* @returns { Promise<Exclude<Result[T], undefined>[]> }
|
||||
*/
|
||||
forResult<T extends keyof Result>(params: T[]): Promise<Exclude<Result[T], undefined>[]>;
|
||||
/**
|
||||
* 返回result中的bool项
|
||||
*/
|
||||
forResultTest(): Promise<(boolean | any[])[]>;
|
||||
/**
|
||||
* 返回result中的bool项
|
||||
*/
|
||||
|
@ -151,11 +147,11 @@ export class GameEventPromise extends Promise<any> {
|
|||
/**
|
||||
* 返回result中的targets项。
|
||||
*/
|
||||
forResultTargets(): Promise<any[]>;
|
||||
forResultTargets(): Promise<import("noname-typings/nonameModules/noname/library/element/player.js").Player[]>;
|
||||
/**
|
||||
* 返回result中的cards项
|
||||
*/
|
||||
forResultCards(): Promise<any[]>;
|
||||
forResultCards(): Promise<import("noname-typings/nonameModules/noname/library/element/card.js").Card[]>;
|
||||
/**
|
||||
* 返回result中的card项
|
||||
*
|
||||
|
|
352
node_modules/@types/noname-typings/nonameModules/noname/library/element/player.d.ts
generated
vendored
352
node_modules/@types/noname-typings/nonameModules/noname/library/element/player.d.ts
generated
vendored
|
@ -69,29 +69,9 @@ export class Player extends HTMLDivElement {
|
|||
skill: {};
|
||||
}[];
|
||||
/**
|
||||
* @type { {
|
||||
* useCard: GameEventPromise[],
|
||||
* respond: GameEventPromise[],
|
||||
* skipped: GameEventPromise[],
|
||||
* lose: GameEventPromise[],
|
||||
* gain: GameEventPromise[],
|
||||
* sourceDamage: GameEventPromise[],
|
||||
* damage: GameEventPromise[],
|
||||
* custom: GameEventPromise[],
|
||||
* useSkill: GameEventPromise[],
|
||||
* }[] }
|
||||
* @type { ActionHistory[] }
|
||||
*/
|
||||
actionHistory: {
|
||||
useCard: GameEventPromise[];
|
||||
respond: GameEventPromise[];
|
||||
skipped: GameEventPromise[];
|
||||
lose: GameEventPromise[];
|
||||
gain: GameEventPromise[];
|
||||
sourceDamage: GameEventPromise[];
|
||||
damage: GameEventPromise[];
|
||||
custom: GameEventPromise[];
|
||||
useSkill: GameEventPromise[];
|
||||
}[];
|
||||
actionHistory: ActionHistory[];
|
||||
/**
|
||||
* @type { SMap<string[]> }
|
||||
*/
|
||||
|
@ -117,7 +97,8 @@ export class Player extends HTMLDivElement {
|
|||
* friend: [],
|
||||
* enemy: [],
|
||||
* neutral: [],
|
||||
* handcards: {
|
||||
* shown?: number,
|
||||
* handcards?: {
|
||||
* global: [],
|
||||
* source: [],
|
||||
* viewed: []
|
||||
|
@ -128,7 +109,8 @@ export class Player extends HTMLDivElement {
|
|||
friend: [];
|
||||
enemy: [];
|
||||
neutral: [];
|
||||
handcards: {
|
||||
shown?: number;
|
||||
handcards?: {
|
||||
global: [];
|
||||
source: [];
|
||||
viewed: [];
|
||||
|
@ -208,6 +190,18 @@ export class Player extends HTMLDivElement {
|
|||
* @type { ((player: this) => any)[] }
|
||||
*/
|
||||
_inits: ((player: this) => any)[];
|
||||
/**
|
||||
* @type { boolean }
|
||||
*/
|
||||
isZhu: boolean;
|
||||
/**
|
||||
* @type { string }
|
||||
*/
|
||||
identity: string;
|
||||
/**
|
||||
* @type { boolean | undefined }
|
||||
*/
|
||||
identityShown: boolean | undefined;
|
||||
/**
|
||||
* 怒气
|
||||
* @param { number } amount
|
||||
|
@ -295,13 +289,13 @@ export class Player extends HTMLDivElement {
|
|||
/**
|
||||
* 获取角色所有的明置手牌
|
||||
*/
|
||||
getShownCards(): any[];
|
||||
getShownCards(): import("noname-typings/nonameModules/noname/library/element/card.js").Card[];
|
||||
/**
|
||||
* 获取该角色被other所知的牌
|
||||
* @param { Player } [other]
|
||||
* @param { (card: Card) => boolean } [filter]
|
||||
*/
|
||||
getKnownCards(other?: Player | undefined, filter?: ((card: any) => boolean) | undefined): any[];
|
||||
getKnownCards(other?: Player | undefined, filter?: ((card: Card) => boolean) | undefined): import("noname-typings/nonameModules/noname/library/element/card.js").Card[];
|
||||
/**
|
||||
* 判断此角色的手牌是否已经被看光了
|
||||
* @param { Player } [other]
|
||||
|
@ -312,13 +306,13 @@ export class Player extends HTMLDivElement {
|
|||
* @param { Player } [other]
|
||||
* @param { (card: Card) => boolean } [filter]
|
||||
*/
|
||||
hasKnownCards(other?: Player | undefined, filter?: ((card: any) => boolean) | undefined): boolean;
|
||||
hasKnownCards(other?: Player | undefined, filter?: ((card: Card) => boolean) | undefined): boolean;
|
||||
/**
|
||||
* 数此角色被知道的牌
|
||||
* @param { Player } [other]
|
||||
* @param { (card: Card) => boolean } [filter]
|
||||
*/
|
||||
countKnownCards(other?: Player | undefined, filter?: ((card: any) => boolean) | undefined): number;
|
||||
countKnownCards(other?: Player | undefined, filter?: ((card: Card) => boolean) | undefined): number;
|
||||
/**
|
||||
* Execute the delay card effect
|
||||
*
|
||||
|
@ -336,7 +330,7 @@ export class Player extends HTMLDivElement {
|
|||
* 检测此牌是否不计入手牌上限
|
||||
* @param { Card } card
|
||||
*/
|
||||
canIgnoreHandcard(card: any): boolean;
|
||||
canIgnoreHandcard(card: Card): boolean;
|
||||
/**
|
||||
* Gift
|
||||
*
|
||||
|
@ -353,7 +347,7 @@ export class Player extends HTMLDivElement {
|
|||
* @param { Player } target
|
||||
* @param { boolean } [strict]
|
||||
*/
|
||||
canGift(card: any, target: Player, strict?: boolean | undefined): boolean;
|
||||
canGift(card: Card, target: Player, strict?: boolean | undefined): boolean;
|
||||
/**
|
||||
* Check if the player refuses gifts
|
||||
*
|
||||
|
@ -361,7 +355,7 @@ export class Player extends HTMLDivElement {
|
|||
* @param { Card } card
|
||||
* @param { Player } player
|
||||
*/
|
||||
refuseGifts(card: any, player: Player): boolean;
|
||||
refuseGifts(card: Card, player: Player): boolean;
|
||||
/**
|
||||
* Gift AI related
|
||||
*
|
||||
|
@ -369,12 +363,12 @@ export class Player extends HTMLDivElement {
|
|||
* @param { Card } card
|
||||
* @param { Player } target
|
||||
*/
|
||||
getGiftAIResultTarget(card: any, target: Player): number;
|
||||
getGiftAIResultTarget(card: Card, target: Player): number;
|
||||
/**
|
||||
* @param { Card } card
|
||||
* @param { Player } target
|
||||
*/
|
||||
getGiftEffect(card: any, target: Player): number;
|
||||
getGiftEffect(card: Card, target: Player): number;
|
||||
/**
|
||||
* 重铸
|
||||
* @param { Card | Card[] } cards
|
||||
|
@ -390,7 +384,7 @@ export class Player extends HTMLDivElement {
|
|||
* @param { Player } [source]
|
||||
* @param { boolean } [strict]
|
||||
*/
|
||||
canRecast(card: any, source?: Player | undefined, strict?: boolean | undefined): boolean;
|
||||
canRecast(card: Card, source?: Player | undefined, strict?: boolean | undefined): boolean;
|
||||
/**
|
||||
* 判断一名角色的某个区域是否被废除
|
||||
*
|
||||
|
@ -516,10 +510,10 @@ export class Player extends HTMLDivElement {
|
|||
/**
|
||||
* 向target发起协力
|
||||
* @param { Player } target
|
||||
* @param {*} type
|
||||
* @param { string } type
|
||||
* @param {*} reason
|
||||
*/
|
||||
cooperationWith(target: Player, type: any, reason: any): void;
|
||||
cooperationWith(target: Player, type: string, reason: any): void;
|
||||
chooseCooperationFor(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
checkCooperationStatus(target: any, reason: any): boolean;
|
||||
removeCooperation(info: any): void;
|
||||
|
@ -574,7 +568,7 @@ export class Player extends HTMLDivElement {
|
|||
* @param { string } tag
|
||||
* @param { Card[] } [cards]
|
||||
*/
|
||||
removeGaintag(tag: string, cards?: any[] | undefined): void;
|
||||
removeGaintag(tag: string, cards?: import("noname-typings/nonameModules/noname/library/element/card.js").Card[] | undefined): void;
|
||||
/**
|
||||
* @param { Player } target
|
||||
*/
|
||||
|
@ -583,18 +577,18 @@ export class Player extends HTMLDivElement {
|
|||
* @param { Card } card
|
||||
* @param { Player } target
|
||||
*/
|
||||
canSaveCard(card: any, target: Player): any;
|
||||
canSaveCard(card: Card, target: Player): any;
|
||||
/**
|
||||
* @param { String } from
|
||||
* @param { String } to
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
reinitCharacter(from: string, to: string, log?: boolean): any;
|
||||
reinitCharacter(from: string, to: string, log?: boolean): GameEventPromise;
|
||||
/**
|
||||
* @param { String[] } newPairs
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
changeCharacter(newPairs: string[], log?: boolean): any;
|
||||
changeCharacter(newPairs: string[], log?: boolean): GameEventPromise;
|
||||
/**
|
||||
* @param { 0 | 1 | 2 } num
|
||||
* @param { false } [log]
|
||||
|
@ -630,12 +624,13 @@ export class Player extends HTMLDivElement {
|
|||
* @param { string } [nature]
|
||||
* @param { string } [popname]
|
||||
*/
|
||||
tryCardAnimate(card: any, name: string, nature?: string | undefined, popname?: string | undefined, ...args: any[]): void;
|
||||
tryCardAnimate(card: Card, name: string, nature?: string | undefined, popname?: string | undefined, ...args: any[]): void;
|
||||
/**
|
||||
* @param { string } name
|
||||
* @param { string } type
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasUsableCard(name: string, type: string): true | undefined;
|
||||
hasUsableCard(name: string, type: string): boolean;
|
||||
/**
|
||||
* @param { Player } to
|
||||
* @returns { boolean }
|
||||
|
@ -754,12 +749,12 @@ export class Player extends HTMLDivElement {
|
|||
name: string;
|
||||
name1: string;
|
||||
name2: string;
|
||||
handcards: any[];
|
||||
handcards: import("noname-typings/nonameModules/noname/library/element/card.js").Card[];
|
||||
gaintag: never[];
|
||||
equips: any[];
|
||||
judges: any[];
|
||||
specials: any[];
|
||||
expansions: 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[];
|
||||
disableJudge: boolean;
|
||||
disabledSlots: SMap<number>;
|
||||
|
@ -768,9 +763,9 @@ export class Player extends HTMLDivElement {
|
|||
position: number;
|
||||
hujia: number;
|
||||
side: any;
|
||||
identityShown: any;
|
||||
identityShown: boolean | undefined;
|
||||
identityNode: (string | undefined)[];
|
||||
identity: any;
|
||||
identity: string;
|
||||
dead: boolean;
|
||||
linked: boolean;
|
||||
turnedover: boolean;
|
||||
|
@ -806,31 +801,62 @@ export class Player extends HTMLDivElement {
|
|||
countUsed(card: any, type: any): number;
|
||||
getCacheKey(): string;
|
||||
countSkill(skill: any): any;
|
||||
getStockSkills(unowned: any, unique: any, hidden: any): any[];
|
||||
/**
|
||||
* @param {*} [unowned]
|
||||
* @param {*} [unique]
|
||||
* @param {*} [hidden]
|
||||
* @returns { string[] }
|
||||
*/
|
||||
getStockSkills(unowned?: any, unique?: any, hidden?: any): string[];
|
||||
/**
|
||||
* @param { string } [arg1='h']
|
||||
* @param { string | Record<string, any> | ((card: Card) => boolean) } [arg2]
|
||||
* @returns { Iterable<Card> }
|
||||
*/
|
||||
iterableGetCards(arg1?: string | undefined, arg2?: string | Record<string, any> | ((card: any) => boolean) | undefined): Iterable<Card>;
|
||||
iterableGetCards(arg1?: string | undefined, arg2?: string | Record<string, any> | ((card: Card) => boolean) | undefined): Iterable<Card>;
|
||||
/**
|
||||
* @param { string } [arg1='h']
|
||||
* @param { string | Record<string, any> | ((card: Card) => boolean) } [arg2]
|
||||
* @returns { Card[] }
|
||||
*/
|
||||
getCards(arg1?: string | undefined, arg2?: string | Record<string, any> | ((card: any) => boolean) | undefined): Card[];
|
||||
iterableGetDiscardableCards(player: any, arg1: any, arg2: any): Generator<any, void, unknown>;
|
||||
getDiscardableCards(player: any, arg1: any, arg2: any): any[];
|
||||
iterableGetGainableCards(player: any, arg1: any, arg2: any): Generator<any, void, unknown>;
|
||||
getGainableCards(player: any, arg1: any, arg2: any): any[];
|
||||
getCards(arg1?: string | undefined, arg2?: string | Record<string, any> | ((card: Card) => boolean) | undefined): Card[];
|
||||
iterableGetDiscardableCards(player: any, arg1: any, arg2: any): Generator<import("noname-typings/nonameModules/noname/library/element/card.js").Card, void, unknown>;
|
||||
getDiscardableCards(player: any, arg1: any, arg2: any): import("noname-typings/nonameModules/noname/library/element/card.js").Card[];
|
||||
/**
|
||||
* @param {Parameters<lib['filter']['canBeGained']>[1]} player
|
||||
* @param {Parameters<this['iterableGetCards']>[0]} arg1
|
||||
* @param {Parameters<this['iterableGetCards']>[1]} arg2
|
||||
*/
|
||||
iterableGetGainableCards(player: [card?: any, player?: any, target?: any, event?: any][1], arg1: Parameters<this['iterableGetCards']>[0], arg2: Parameters<this['iterableGetCards']>[1]): Generator<import("noname-typings/nonameModules/noname/library/element/card.js").Card, void, unknown>;
|
||||
/**
|
||||
*
|
||||
* @param {Parameters<this['iterableGetGainableCards']>[0]} player
|
||||
* @param {Parameters<this['iterableGetGainableCards']>[1]} [arg1]
|
||||
* @param {Parameters<this['iterableGetGainableCards']>[2]} [arg2]
|
||||
*/
|
||||
getGainableCards(player: Parameters<this['iterableGetGainableCards']>[0], arg1?: Parameters<this["iterableGetGainableCards"]>[1] | undefined, arg2?: Parameters<this["iterableGetGainableCards"]>[2] | undefined): import("noname-typings/nonameModules/noname/library/element/card.js").Card[];
|
||||
getGainableSkills(func: any): any[];
|
||||
countCards(arg1: any, arg2: any): number;
|
||||
/**
|
||||
* @param { Parameters<typeof this['iterableGetCards']>[0] } [arg1]
|
||||
* @param { Parameters<typeof this['iterableGetCards']>[1] } [arg2]
|
||||
*/
|
||||
countCards(arg1?: Parameters<this["iterableGetCards"]>[0] | undefined, arg2?: Parameters<this["iterableGetCards"]>[1] | undefined): number;
|
||||
getCardIndex(arg1: any, name: any, card: any, max: any): number;
|
||||
countDiscardableCards(player: any, arg1: any, arg2: any): number;
|
||||
countGainableCards(player: any, arg1: any, arg2: any): number;
|
||||
/**
|
||||
* @param {Parameters<this['getGainableCards']>[0]} player
|
||||
* @param {Parameters<this['getGainableCards']>[1]} [arg1]
|
||||
* @param {Parameters<this['getGainableCards']>[2]} [arg2]
|
||||
*/
|
||||
countGainableCards(player: Parameters<this['getGainableCards']>[0], arg1?: Parameters<this["getGainableCards"]>[1] | undefined, arg2?: Parameters<this["getGainableCards"]>[2] | undefined): number;
|
||||
getOriginalSkills(): any[];
|
||||
getModableSkills(): any[];
|
||||
getSkills(arg2: any, arg3: any, arg4: any): any[];
|
||||
/**
|
||||
* @param { string | boolean | null } [arg2]
|
||||
* @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;
|
||||
syncStorage(skill: any): void;
|
||||
syncSkills(): void;
|
||||
|
@ -879,7 +905,7 @@ export class Player extends HTMLDivElement {
|
|||
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;
|
||||
randomDiscard(...args: any[]): any[];
|
||||
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;
|
||||
|
@ -889,16 +915,30 @@ export class Player extends HTMLDivElement {
|
|||
$addToExpansion(cards: any, broadcast: any, gaintag: any): this;
|
||||
directgain(cards: any, broadcast: any, gaintag: any): this;
|
||||
directgains(cards: any, broadcast: any, gaintag: any): this;
|
||||
gainMultiple(targets: any, position: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
|
||||
/**
|
||||
*
|
||||
* @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;
|
||||
give(cards: any, target: any, visible: any): any;
|
||||
/**
|
||||
*
|
||||
* @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;
|
||||
loseHp(num: any): import("./gameEvent.js").GameEvent & import("./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;
|
||||
|
@ -930,18 +970,30 @@ export class Player extends HTMLDivElement {
|
|||
wait(callback: any): void;
|
||||
unwait(result: any): void;
|
||||
tempUnwait(result: any): void;
|
||||
logSkill(name: any, targets: any, nature: any, logv: any): void;
|
||||
/**
|
||||
* @param { string | string[] } name
|
||||
* @param { Player | Player[] } [targets]
|
||||
* @param { boolean | string } [nature]
|
||||
* @param { boolean } [logv]
|
||||
*/
|
||||
logSkill(name: string | string[], targets?: Player | Player[] | undefined, nature?: string | boolean | undefined, logv?: boolean | undefined): void;
|
||||
unprompt(): void;
|
||||
prompt(str: any, nature: any): void;
|
||||
prompt_old(name2: any, className: any): void;
|
||||
popup(name: any, className: any, nobroadcast: any): void;
|
||||
/**
|
||||
*
|
||||
* @param { string } name
|
||||
* @param { string } className
|
||||
* @param { Parameters<this["damagepop"]>[3] } [nobroadcast]
|
||||
*/
|
||||
popup(name: string, className?: string, nobroadcast?: Parameters<this["damagepop"]>[3] | undefined): void;
|
||||
popup_old(name: any, className: any): HTMLDivElement;
|
||||
_popup(): void;
|
||||
showTimer(time: any): void;
|
||||
hideTimer(): void;
|
||||
markAuto(name: any, info: any): void;
|
||||
unmarkAuto(name: any, info: any): void;
|
||||
getExpansions(tag: any): any[];
|
||||
getExpansions(tag: any): import("noname-typings/nonameModules/noname/library/element/card.js").Card[];
|
||||
countExpansions(tag: any): number;
|
||||
hasExpansions(tag: any): boolean;
|
||||
setStorage(name: any, value: any, mark: any): any;
|
||||
|
@ -961,7 +1013,14 @@ export class Player extends HTMLDivElement {
|
|||
unmark(name: any, info: any): void;
|
||||
addLink(): void;
|
||||
removeLink(): void;
|
||||
canUse(card: any, target: any, distance: any, includecard: any): any;
|
||||
/**
|
||||
* @param { string | Card | VCard } card
|
||||
* @param { Player } target
|
||||
* @param { boolean } [distance]
|
||||
* @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;
|
||||
hasUseTarget(card: any, distance: any, includecard: any): boolean;
|
||||
hasValueTarget(card: any, distance: any, includecard: any): boolean;
|
||||
getUseValue(card: any, distance: any, includecard: any): number;
|
||||
|
@ -997,7 +1056,20 @@ export class Player extends HTMLDivElement {
|
|||
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;
|
||||
addTempSkill(skill: any, expire: any, checkConflict: any): any;
|
||||
/**
|
||||
* @overload
|
||||
* @param { string } skill
|
||||
* @param { SkillTrigger | string } [expire]
|
||||
* @param { boolean } [checkConflict]
|
||||
*/
|
||||
addTempSkill(skill: string, expire?: string | SkillTrigger | undefined, checkConflict?: boolean | undefined): any;
|
||||
/**
|
||||
* @overload
|
||||
* @param { string[] } skill
|
||||
* @param { SkillTrigger } [expire]
|
||||
* @param { boolean } [checkConflict]
|
||||
*/
|
||||
addTempSkill(skill: string[], expire?: SkillTrigger | undefined, checkConflict?: boolean | undefined): any;
|
||||
tempBanSkill(skill: any, expire: any, log: any): any;
|
||||
isTempBanned(skill: any): boolean;
|
||||
attitudeTo(target: any): any;
|
||||
|
@ -1019,14 +1091,68 @@ export class Player extends HTMLDivElement {
|
|||
* @param { string | function | number | boolean | object } map
|
||||
*/
|
||||
getRoundHistory(key: any, filter: any, num: any, keep: any, last: any): any[];
|
||||
getHistory(key: any, filter: any, last: any): any;
|
||||
checkHistory(key: any, filter: any, last: any): void;
|
||||
hasHistory(key: any, filter: any, last: any): any;
|
||||
getLastHistory(key: any, filter: any, last: any): any;
|
||||
checkAllHistory(key: any, filter: any, last: any): void;
|
||||
getAllHistory(key: any, filter: any, last: any): any[];
|
||||
hasAllHistory(key: any, filter: any, last: any): boolean;
|
||||
getLastUsed(num: any): any;
|
||||
/**
|
||||
* @overload
|
||||
* @returns { ActionHistory }
|
||||
*/
|
||||
getHistory(): ActionHistory;
|
||||
/**
|
||||
* @template { keyof ActionHistory } T
|
||||
* @overload
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { ActionHistory[T] }
|
||||
*/
|
||||
getHistory<T extends keyof ActionHistory>(key: T, filter?: ((event: GameEventPromise) => boolean) | undefined, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): ActionHistory[T];
|
||||
/**
|
||||
* @template { keyof ActionHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
*/
|
||||
checkHistory<T_1 extends keyof ActionHistory>(key: T_1, filter: (event: GameEventPromise) => boolean, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): void;
|
||||
/**
|
||||
* @template { keyof ActionHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasHistory<T_2 extends keyof ActionHistory>(key: T_2, filter?: ((event: GameEventPromise) => boolean) | undefined, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): boolean;
|
||||
/**
|
||||
* @template { keyof ActionHistory } T
|
||||
* @overload
|
||||
* @param { T } [key]
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { null | ActionHistory[T] | boolean }
|
||||
*/
|
||||
getLastHistory<T_3 extends keyof ActionHistory>(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;
|
||||
/**
|
||||
* @template { keyof ActionHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
*/
|
||||
checkAllHistory<T_4 extends keyof ActionHistory>(key: T_4, filter: (event: GameEventPromise) => boolean, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): void;
|
||||
/**
|
||||
* @template { keyof ActionHistory } T
|
||||
* @param { T } [key]
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { ActionHistory[T] }
|
||||
*/
|
||||
getAllHistory<T_5 extends keyof ActionHistory>(key?: T_5 | undefined, filter?: ((event: GameEventPromise) => boolean) | undefined, last?: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise | undefined): ActionHistory[T_5];
|
||||
/**
|
||||
* @template { keyof ActionHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasAllHistory<T_6 extends keyof ActionHistory>(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;
|
||||
getStat(key: any): any;
|
||||
getLastStat(key: any): any;
|
||||
queue(time: any): void;
|
||||
|
@ -1037,7 +1163,7 @@ export class Player extends HTMLDivElement {
|
|||
getGlobalFrom(): number;
|
||||
getGlobalTo(): number;
|
||||
getHandcardLimit(): number;
|
||||
getEnemies(func: any): any[] | undefined;
|
||||
getEnemies(func: any): import("noname-typings/nonameModules/noname/library/element/player.js").Player[] | undefined;
|
||||
getFriends(func: any): any[];
|
||||
isEnemyOf(...args: any[]): boolean;
|
||||
isFriendOf(player: any): boolean;
|
||||
|
@ -1067,27 +1193,63 @@ export class Player extends HTMLDivElement {
|
|||
isOnline2(): boolean;
|
||||
isOffline(): boolean;
|
||||
checkShow(skill: any, showonly: any): false | "main" | "vice";
|
||||
needsToDiscard(add: any, filter: any, pure: any): number;
|
||||
/**
|
||||
*
|
||||
* @param { number | Card[] | Card } [add]
|
||||
* @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;
|
||||
distanceTo(target: any, method: any): number;
|
||||
distanceFrom(target: any, method: any): number;
|
||||
hasSkill(skill: any, arg2: any, arg3: any, arg4: any): boolean;
|
||||
hasStockSkill(skill: any, arg1: any, arg2: any, arg3: any): boolean;
|
||||
/**
|
||||
* @param { string } skill
|
||||
* @param { Parameters<this['getSkills']>[0] } arg2
|
||||
* @param { Parameters<this['getSkills']>[1] } arg3
|
||||
* @param { Parameters<this['getSkills']>[2] } arg4
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasSkill(skill: string, arg2: Parameters<this['getSkills']>[0], arg3: Parameters<this['getSkills']>[1], arg4: Parameters<this['getSkills']>[2]): boolean;
|
||||
/**
|
||||
* @param { string } skill
|
||||
* @param { Parameters<this['getStockSkills']>[0] } arg1
|
||||
* @param { Parameters<this['getStockSkills']>[1] } arg2
|
||||
* @param { Parameters<this['getStockSkills']>[2] } arg3
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasStockSkill(skill: string, arg1: Parameters<this['getStockSkills']>[0], arg2: Parameters<this['getStockSkills']>[1], arg3: Parameters<this['getStockSkills']>[2]): boolean;
|
||||
isZhu2(): boolean;
|
||||
isInitFilter(tag: any): boolean;
|
||||
hasZhuSkill(skill: any, player: any): boolean;
|
||||
/**
|
||||
*
|
||||
* @param {string} skill
|
||||
* @param {Player} [player]
|
||||
*/
|
||||
hasZhuSkill(skill: string, player?: Player | undefined): boolean;
|
||||
hasGlobalTag(tag: any, arg: any): boolean;
|
||||
hasSkillTag(tag: any, hidden: any, arg: any, globalskill: any): boolean;
|
||||
/**
|
||||
* @param {string} tag
|
||||
* @param {Parameters<this['getSkills']>[0]} hidden
|
||||
* @param {Parameters<SkillAI['skillTagFilter']>[2]} arg
|
||||
* @param {boolean} [globalskill]
|
||||
*/
|
||||
hasSkillTag(tag: string, hidden: Parameters<this['getSkills']>[0], arg: [player: import("noname-typings/nonameModules/noname/library/element/player.js").Player, tag: string, arg: any][2], globalskill?: boolean | undefined): boolean;
|
||||
hasJudge(name: any): boolean;
|
||||
hasFriend(): boolean;
|
||||
hasUnknown(num: any): boolean;
|
||||
isUnknown(player: any): boolean;
|
||||
hasWuxie(info: any): boolean;
|
||||
hasSha(respond: any, noauto: any): true | undefined;
|
||||
hasShan(respond: any): true | undefined;
|
||||
/**
|
||||
*
|
||||
* @param {string|boolean} [respond]
|
||||
* @param {boolean} [noauto]
|
||||
*/
|
||||
hasSha(respond?: string | boolean | undefined, noauto?: boolean | undefined): 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): any;
|
||||
getEquip(name: any): import("noname-typings/nonameModules/noname/library/element/card.js").Card | null;
|
||||
getJudge(name: any): ChildNode | null;
|
||||
$drawAuto(cards: any, target: any): void;
|
||||
$draw(num: any, init: any, config: any): void;
|
||||
|
@ -1119,9 +1281,27 @@ export class Player extends HTMLDivElement {
|
|||
$dust(): void;
|
||||
$recover(): void;
|
||||
$fullscreenpop(str: any, nature: any, avatar: any, broadcast: any): void;
|
||||
$damagepop(num: any, nature: any, font: any, nobroadcast: any): void;
|
||||
/**
|
||||
*
|
||||
* @param { number | string } num
|
||||
* @param { string } [nature]
|
||||
* @param { boolean } [font]
|
||||
* @param { boolean } [nobroadcast]
|
||||
*/
|
||||
$damagepop(num: number | string, nature?: string | undefined, font?: boolean | undefined, nobroadcast?: boolean | undefined): void;
|
||||
$damage(source: any, ...args: any[]): void;
|
||||
$die(): void;
|
||||
$dieflip(type: any): void;
|
||||
$phaseJudge(card: any): void;
|
||||
}
|
||||
export type ActionHistory = {
|
||||
useCard: GameEventPromise[];
|
||||
respond: GameEventPromise[];
|
||||
skipped: GameEventPromise[];
|
||||
lose: GameEventPromise[];
|
||||
gain: GameEventPromise[];
|
||||
sourceDamage: GameEventPromise[];
|
||||
damage: GameEventPromise[];
|
||||
custom: GameEventPromise[];
|
||||
useSkill: GameEventPromise[];
|
||||
};
|
||||
|
|
4
node_modules/@types/noname-typings/nonameModules/noname/library/element/vcard.d.ts
generated
vendored
4
node_modules/@types/noname-typings/nonameModules/noname/library/element/vcard.d.ts
generated
vendored
|
@ -5,7 +5,7 @@ export class VCard {
|
|||
* @param { string } [name]
|
||||
* @param { string } [nature]
|
||||
*/
|
||||
constructor(suitOrCard?: any, numberOrCards?: number | any[] | undefined, name?: string | undefined, nature?: string | undefined);
|
||||
constructor(suitOrCard?: any, numberOrCards?: number | import("noname-typings/nonameModules/noname/library/element/card.js").Card[] | undefined, name?: string | undefined, nature?: string | undefined);
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
|
@ -43,7 +43,7 @@ export class VCard {
|
|||
/**
|
||||
* @param { Player } player
|
||||
*/
|
||||
hasNature(nature: any, player: any): boolean;
|
||||
hasNature(nature: any, player: Player): boolean;
|
||||
getCacheKey(): string;
|
||||
hasGaintag(tag: any): any;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,10 @@ export class Library {
|
|||
onload: any[];
|
||||
onload2: any[];
|
||||
onprepare: any[];
|
||||
arenaReady: any[];
|
||||
/**
|
||||
* @type { Function[] | undefined }
|
||||
*/
|
||||
arenaReady: Function[] | undefined;
|
||||
onfree: any[];
|
||||
inpile: any[];
|
||||
inpile_nature: any[];
|
||||
|
@ -503,11 +506,11 @@ export class Library {
|
|||
intro: string;
|
||||
init: string;
|
||||
item: {
|
||||
'500': string;
|
||||
'700': string;
|
||||
'1000': string;
|
||||
'1500': string;
|
||||
'2500': string;
|
||||
500: string;
|
||||
700: string;
|
||||
1000: string;
|
||||
1500: string;
|
||||
2500: string;
|
||||
};
|
||||
};
|
||||
doubleclick_intro: {
|
||||
|
@ -521,12 +524,12 @@ export class Library {
|
|||
init: string;
|
||||
intro: string;
|
||||
item: {
|
||||
'0': string;
|
||||
'5': string;
|
||||
'10': string;
|
||||
'20': string;
|
||||
'50': string;
|
||||
'10000': string;
|
||||
0: string;
|
||||
5: string;
|
||||
10: string;
|
||||
20: string;
|
||||
50: string;
|
||||
10000: string;
|
||||
};
|
||||
unfrequent: boolean;
|
||||
};
|
||||
|
@ -719,10 +722,10 @@ export class Library {
|
|||
init: string;
|
||||
item: {
|
||||
off: string;
|
||||
'30000': string;
|
||||
'60000': string;
|
||||
'120000': string;
|
||||
'300000': string;
|
||||
30000: string;
|
||||
60000: string;
|
||||
120000: string;
|
||||
300000: string;
|
||||
};
|
||||
intro: string;
|
||||
onclick(item: any): void;
|
||||
|
@ -889,17 +892,17 @@ export class Library {
|
|||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'-5x': string;
|
||||
'-4x': string;
|
||||
'-3x': string;
|
||||
'-2x': string;
|
||||
'-1x': string;
|
||||
'0x': string;
|
||||
'1x': string;
|
||||
'2x': string;
|
||||
'3x': string;
|
||||
'4x': string;
|
||||
'5x': string;
|
||||
"-5x": string;
|
||||
"-4x": string;
|
||||
"-3x": string;
|
||||
"-2x": string;
|
||||
"-1x": string;
|
||||
"0x": string;
|
||||
"1x": string;
|
||||
"2x": string;
|
||||
"3x": string;
|
||||
"4x": string;
|
||||
"5x": string;
|
||||
};
|
||||
unfrequent: boolean;
|
||||
onclick(item: any): void;
|
||||
|
@ -908,17 +911,17 @@ export class Library {
|
|||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'-5x': string;
|
||||
'-4x': string;
|
||||
'-3x': string;
|
||||
'-2x': string;
|
||||
'-1x': string;
|
||||
'0x': string;
|
||||
'1x': string;
|
||||
'2x': string;
|
||||
'3x': string;
|
||||
'4x': string;
|
||||
'5x': string;
|
||||
"-5x": string;
|
||||
"-4x": string;
|
||||
"-3x": string;
|
||||
"-2x": string;
|
||||
"-1x": string;
|
||||
"0x": string;
|
||||
"1x": string;
|
||||
"2x": string;
|
||||
"3x": string;
|
||||
"4x": string;
|
||||
"5x": string;
|
||||
};
|
||||
unfrequent: boolean;
|
||||
onclick(item: any): void;
|
||||
|
@ -927,17 +930,17 @@ export class Library {
|
|||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'-5x': string;
|
||||
'-4x': string;
|
||||
'-3x': string;
|
||||
'-2x': string;
|
||||
'-1x': string;
|
||||
'0x': string;
|
||||
'1x': string;
|
||||
'2x': string;
|
||||
'3x': string;
|
||||
'4x': string;
|
||||
'5x': string;
|
||||
"-5x": string;
|
||||
"-4x": string;
|
||||
"-3x": string;
|
||||
"-2x": string;
|
||||
"-1x": string;
|
||||
"0x": string;
|
||||
"1x": string;
|
||||
"2x": string;
|
||||
"3x": string;
|
||||
"4x": string;
|
||||
"5x": string;
|
||||
};
|
||||
unfrequent: boolean;
|
||||
onclick(item: any): void;
|
||||
|
@ -946,17 +949,17 @@ export class Library {
|
|||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'-5x': string;
|
||||
'-4x': string;
|
||||
'-3x': string;
|
||||
'-2x': string;
|
||||
'-1x': string;
|
||||
'0x': string;
|
||||
'1x': string;
|
||||
'2x': string;
|
||||
'3x': string;
|
||||
'4x': string;
|
||||
'5x': string;
|
||||
"-5x": string;
|
||||
"-4x": string;
|
||||
"-3x": string;
|
||||
"-2x": string;
|
||||
"-1x": string;
|
||||
"0x": string;
|
||||
"1x": string;
|
||||
"2x": string;
|
||||
"3x": string;
|
||||
"4x": string;
|
||||
"5x": string;
|
||||
};
|
||||
unfrequent: boolean;
|
||||
onclick(item: any): void;
|
||||
|
@ -1390,10 +1393,10 @@ export class Library {
|
|||
intro: string;
|
||||
init: string;
|
||||
item: {
|
||||
'6': string;
|
||||
'12': string;
|
||||
'20': string;
|
||||
'30': string;
|
||||
6: string;
|
||||
12: string;
|
||||
20: string;
|
||||
30: string;
|
||||
};
|
||||
unfrequent: boolean;
|
||||
};
|
||||
|
@ -1624,15 +1627,15 @@ export class Library {
|
|||
name: string;
|
||||
init: number;
|
||||
item: {
|
||||
'0': string;
|
||||
'1': string;
|
||||
'2': string;
|
||||
'3': string;
|
||||
'4': string;
|
||||
'5': string;
|
||||
'6': string;
|
||||
'7': string;
|
||||
'8': string;
|
||||
0: string;
|
||||
1: string;
|
||||
2: string;
|
||||
3: string;
|
||||
4: string;
|
||||
5: string;
|
||||
6: string;
|
||||
7: string;
|
||||
8: string;
|
||||
};
|
||||
onclick(volume: any): void;
|
||||
};
|
||||
|
@ -1640,15 +1643,15 @@ export class Library {
|
|||
name: string;
|
||||
init: number;
|
||||
item: {
|
||||
'0': string;
|
||||
'1': string;
|
||||
'2': string;
|
||||
'3': string;
|
||||
'4': string;
|
||||
'5': string;
|
||||
'6': string;
|
||||
'7': string;
|
||||
'8': string;
|
||||
0: string;
|
||||
1: string;
|
||||
2: string;
|
||||
3: string;
|
||||
4: string;
|
||||
5: string;
|
||||
6: string;
|
||||
7: string;
|
||||
8: string;
|
||||
};
|
||||
onclick(volume: any): void;
|
||||
};
|
||||
|
@ -1722,108 +1725,108 @@ export class Library {
|
|||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'1': string;
|
||||
'0.5': string;
|
||||
'0': string;
|
||||
1: string;
|
||||
0.5: string;
|
||||
0: string;
|
||||
};
|
||||
};
|
||||
huosha: {
|
||||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'1': string;
|
||||
'0.5': string;
|
||||
'0': string;
|
||||
1: string;
|
||||
0.5: string;
|
||||
0: string;
|
||||
};
|
||||
};
|
||||
leisha: {
|
||||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'1': string;
|
||||
'0.5': string;
|
||||
'0': string;
|
||||
1: string;
|
||||
0.5: string;
|
||||
0: string;
|
||||
};
|
||||
};
|
||||
shan: {
|
||||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'1': string;
|
||||
'0.5': string;
|
||||
'0': string;
|
||||
1: string;
|
||||
0.5: string;
|
||||
0: string;
|
||||
};
|
||||
};
|
||||
tao: {
|
||||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'1': string;
|
||||
'0.5': string;
|
||||
'0': string;
|
||||
1: string;
|
||||
0.5: string;
|
||||
0: string;
|
||||
};
|
||||
};
|
||||
jiu: {
|
||||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'1': string;
|
||||
'0.5': string;
|
||||
'0': string;
|
||||
1: string;
|
||||
0.5: string;
|
||||
0: string;
|
||||
};
|
||||
};
|
||||
wuxie: {
|
||||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'1': string;
|
||||
'0.5': string;
|
||||
'0': string;
|
||||
1: string;
|
||||
0.5: string;
|
||||
0: string;
|
||||
};
|
||||
};
|
||||
nanman: {
|
||||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'1': string;
|
||||
'0.5': string;
|
||||
'0': string;
|
||||
1: string;
|
||||
0.5: string;
|
||||
0: string;
|
||||
};
|
||||
};
|
||||
wanjian: {
|
||||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'1': string;
|
||||
'0.5': string;
|
||||
'0': string;
|
||||
1: string;
|
||||
0.5: string;
|
||||
0: string;
|
||||
};
|
||||
};
|
||||
guohe: {
|
||||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'1': string;
|
||||
'0.5': string;
|
||||
'0': string;
|
||||
1: string;
|
||||
0.5: string;
|
||||
0: string;
|
||||
};
|
||||
};
|
||||
shunshou: {
|
||||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'1': string;
|
||||
'0.5': string;
|
||||
'0': string;
|
||||
1: string;
|
||||
0.5: string;
|
||||
0: string;
|
||||
};
|
||||
};
|
||||
tiesuo: {
|
||||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'1': string;
|
||||
'0.5': string;
|
||||
'0': string;
|
||||
1: string;
|
||||
0.5: string;
|
||||
0: string;
|
||||
};
|
||||
};
|
||||
hide: {
|
||||
|
@ -1869,10 +1872,10 @@ export class Library {
|
|||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'0.1': string;
|
||||
'0.2': string;
|
||||
'0.3': string;
|
||||
'0.5': string;
|
||||
0.1: string;
|
||||
0.2: string;
|
||||
0.3: string;
|
||||
0.5: string;
|
||||
};
|
||||
};
|
||||
hide: {
|
||||
|
@ -1946,9 +1949,9 @@ export class Library {
|
|||
item: {
|
||||
off: string;
|
||||
group: string;
|
||||
'4': string;
|
||||
'6': string;
|
||||
'8': string;
|
||||
4: string;
|
||||
6: string;
|
||||
8: string;
|
||||
};
|
||||
};
|
||||
connect_zhong_card: {
|
||||
|
@ -2221,12 +2224,12 @@ export class Library {
|
|||
init: string;
|
||||
restart: boolean;
|
||||
item: {
|
||||
'3': string;
|
||||
'4': string;
|
||||
'5': string;
|
||||
'6': string;
|
||||
'8': string;
|
||||
'10': string;
|
||||
3: string;
|
||||
4: string;
|
||||
5: string;
|
||||
6: string;
|
||||
8: string;
|
||||
10: string;
|
||||
};
|
||||
};
|
||||
limit_zhu: {
|
||||
|
@ -2236,9 +2239,9 @@ export class Library {
|
|||
item: {
|
||||
off: string;
|
||||
group: string;
|
||||
'4': string;
|
||||
'6': string;
|
||||
'8': string;
|
||||
4: string;
|
||||
6: string;
|
||||
8: string;
|
||||
};
|
||||
};
|
||||
choice_zhong: {
|
||||
|
@ -2246,12 +2249,12 @@ export class Library {
|
|||
init: string;
|
||||
restart: boolean;
|
||||
item: {
|
||||
'3': string;
|
||||
'4': string;
|
||||
'5': string;
|
||||
'6': string;
|
||||
'8': string;
|
||||
'10': string;
|
||||
3: string;
|
||||
4: string;
|
||||
5: string;
|
||||
6: string;
|
||||
8: string;
|
||||
10: string;
|
||||
};
|
||||
};
|
||||
choice_nei: {
|
||||
|
@ -2259,12 +2262,12 @@ export class Library {
|
|||
init: string;
|
||||
restart: boolean;
|
||||
item: {
|
||||
'3': string;
|
||||
'4': string;
|
||||
'5': string;
|
||||
'6': string;
|
||||
'8': string;
|
||||
'10': string;
|
||||
3: string;
|
||||
4: string;
|
||||
5: string;
|
||||
6: string;
|
||||
8: string;
|
||||
10: string;
|
||||
};
|
||||
};
|
||||
choice_fan: {
|
||||
|
@ -2272,12 +2275,12 @@ export class Library {
|
|||
init: string;
|
||||
restart: boolean;
|
||||
item: {
|
||||
'3': string;
|
||||
'4': string;
|
||||
'5': string;
|
||||
'6': string;
|
||||
'8': string;
|
||||
'10': string;
|
||||
3: string;
|
||||
4: string;
|
||||
5: string;
|
||||
6: string;
|
||||
8: string;
|
||||
10: string;
|
||||
};
|
||||
};
|
||||
enable_commoner: {
|
||||
|
@ -2292,12 +2295,12 @@ export class Library {
|
|||
init: string;
|
||||
restart: boolean;
|
||||
item: {
|
||||
'3': string;
|
||||
'4': string;
|
||||
'5': string;
|
||||
'6': string;
|
||||
'8': string;
|
||||
'10': string;
|
||||
3: string;
|
||||
4: string;
|
||||
5: string;
|
||||
6: string;
|
||||
8: string;
|
||||
10: string;
|
||||
};
|
||||
};
|
||||
enable_year_limit: {
|
||||
|
@ -2552,12 +2555,12 @@ export class Library {
|
|||
init: string;
|
||||
restart: boolean;
|
||||
item: {
|
||||
'5': string;
|
||||
'6': string;
|
||||
'7': string;
|
||||
'8': string;
|
||||
'9': string;
|
||||
'10': string;
|
||||
5: string;
|
||||
6: string;
|
||||
7: string;
|
||||
8: string;
|
||||
9: string;
|
||||
10: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -2570,10 +2573,10 @@ export class Library {
|
|||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'1v1': string;
|
||||
'2v2': string;
|
||||
'3v3': string;
|
||||
'4v4': string;
|
||||
"1v1": string;
|
||||
"2v2": string;
|
||||
"3v3": string;
|
||||
"4v4": string;
|
||||
guandu: string;
|
||||
};
|
||||
frequent: boolean;
|
||||
|
@ -2595,11 +2598,11 @@ export class Library {
|
|||
init: string;
|
||||
frequent: boolean;
|
||||
item: {
|
||||
'12': string;
|
||||
'16': string;
|
||||
'20': string;
|
||||
'24': string;
|
||||
'40': string;
|
||||
12: string;
|
||||
16: string;
|
||||
20: string;
|
||||
24: string;
|
||||
40: string;
|
||||
};
|
||||
};
|
||||
connect_replace_number: {
|
||||
|
@ -2607,12 +2610,12 @@ export class Library {
|
|||
init: string;
|
||||
frequent: boolean;
|
||||
item: {
|
||||
'0': string;
|
||||
'1': string;
|
||||
'2': string;
|
||||
'3': string;
|
||||
'4': string;
|
||||
'5': string;
|
||||
0: string;
|
||||
1: string;
|
||||
2: string;
|
||||
3: string;
|
||||
4: string;
|
||||
5: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -2949,12 +2952,12 @@ export class Library {
|
|||
init: string;
|
||||
restart: boolean;
|
||||
item: {
|
||||
'3': string;
|
||||
'4': string;
|
||||
'5': string;
|
||||
'6': string;
|
||||
'8': string;
|
||||
'10': string;
|
||||
3: string;
|
||||
4: string;
|
||||
5: string;
|
||||
6: string;
|
||||
8: string;
|
||||
10: string;
|
||||
};
|
||||
};
|
||||
choice_fan: {
|
||||
|
@ -2962,12 +2965,12 @@ export class Library {
|
|||
init: string;
|
||||
restart: boolean;
|
||||
item: {
|
||||
'3': string;
|
||||
'4': string;
|
||||
'5': string;
|
||||
'6': string;
|
||||
'8': string;
|
||||
'10': string;
|
||||
3: string;
|
||||
4: string;
|
||||
5: string;
|
||||
6: string;
|
||||
8: string;
|
||||
10: string;
|
||||
};
|
||||
};
|
||||
edit_character: {
|
||||
|
@ -3089,10 +3092,10 @@ export class Library {
|
|||
name: string;
|
||||
init: string;
|
||||
item: {
|
||||
'0': string;
|
||||
'0.2': string;
|
||||
'0.333': string;
|
||||
'0.5': string;
|
||||
0: string;
|
||||
0.2: string;
|
||||
0.333: string;
|
||||
0.5: string;
|
||||
};
|
||||
frequent: boolean;
|
||||
};
|
||||
|
@ -3129,10 +3132,10 @@ export class Library {
|
|||
init: string;
|
||||
intro: string;
|
||||
item: {
|
||||
'0': string;
|
||||
'10': string;
|
||||
'20': string;
|
||||
'30': string;
|
||||
0: string;
|
||||
10: string;
|
||||
20: string;
|
||||
30: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -3145,10 +3148,10 @@ export class Library {
|
|||
init: string;
|
||||
frequent: boolean;
|
||||
item: {
|
||||
'10': string;
|
||||
'20': string;
|
||||
'30': string;
|
||||
'1000': string;
|
||||
10: string;
|
||||
20: string;
|
||||
30: string;
|
||||
1000: string;
|
||||
};
|
||||
};
|
||||
tafang_difficulty: {
|
||||
|
@ -3156,9 +3159,9 @@ export class Library {
|
|||
init: string;
|
||||
frequent: boolean;
|
||||
item: {
|
||||
'1': string;
|
||||
'2': string;
|
||||
'3': string;
|
||||
1: string;
|
||||
2: string;
|
||||
3: string;
|
||||
};
|
||||
};
|
||||
show_range: {
|
||||
|
@ -3174,10 +3177,10 @@ export class Library {
|
|||
intro: string;
|
||||
init: string;
|
||||
item: {
|
||||
'0': string;
|
||||
'10': string;
|
||||
'20': string;
|
||||
'30': string;
|
||||
0: string;
|
||||
10: string;
|
||||
20: string;
|
||||
30: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -3255,13 +3258,13 @@ export class Library {
|
|||
init: string;
|
||||
frequent: boolean;
|
||||
item: {
|
||||
'1': string;
|
||||
'2': string;
|
||||
'3': string;
|
||||
'4': string;
|
||||
'6': string;
|
||||
'8': string;
|
||||
'10': string;
|
||||
1: string;
|
||||
2: string;
|
||||
3: string;
|
||||
4: string;
|
||||
6: string;
|
||||
8: string;
|
||||
10: string;
|
||||
};
|
||||
onclick(num: any): void;
|
||||
};
|
||||
|
@ -3992,7 +3995,7 @@ export class Library {
|
|||
link: () => void;
|
||||
chooseToGuanxing: () => void;
|
||||
};
|
||||
contents: SMap<((event: any, trigger: any, player: any) => Promise<any>)[]>;
|
||||
contents: SMap<((event: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise, trigger: import("noname-typings/nonameModules/noname/library/index.js").GameEventPromise, player: import("noname-typings/nonameModules/noname/library/element/player.js").Player) => Promise<any>)[]>;
|
||||
Player: typeof Element.Player;
|
||||
Card: typeof Element.Card;
|
||||
VCard: typeof Element.VCard;
|
||||
|
@ -4243,7 +4246,7 @@ 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) => any;
|
||||
selectTarget: (card: any, player: any) => number | number[] | (() => number | Select) | undefined;
|
||||
judge: (card: any, player: any, target: any) => any;
|
||||
autoRespondSha: () => boolean;
|
||||
autoRespondShan: () => boolean;
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
/**
|
||||
* 获取github授权的token
|
||||
*/
|
||||
export function gainAuthorization(): Promise<void>;
|
||||
/**
|
||||
* 字节转换
|
||||
|
@ -6,9 +9,10 @@ export function gainAuthorization(): Promise<void>;
|
|||
export function parseSize(limit: number): string;
|
||||
/**
|
||||
* 对比版本号
|
||||
* @param { string } ver1
|
||||
* @param { string } ver2
|
||||
* @returns { -1 | 0 | 1 }
|
||||
* @param { string } ver1 版本号1
|
||||
* @param { string } ver2 版本号2
|
||||
* @returns { -1 | 0 | 1 } -1为ver1 < ver2, 0为ver1 == ver2, 1为ver1 > ver2
|
||||
* @throws {Error}
|
||||
*/
|
||||
export function checkVersion(ver1: string, ver2: string): -1 | 0 | 1;
|
||||
/**
|
||||
|
@ -91,7 +95,7 @@ export function getRepoTagDescription(tagName: string, options?: {
|
|||
}>;
|
||||
/**
|
||||
*
|
||||
* 获取仓库指定分支和指定目录内的所有文件和目录
|
||||
* 获取仓库指定分支和指定(单个)目录内的所有文件和目录
|
||||
* @param { string } [path = ''] 路径名称(可放参数)
|
||||
* @param { string } [branch = ''] 仓库分支名称
|
||||
* @param { Object } options
|
||||
|
@ -128,6 +132,9 @@ export function getRepoFilesList(path?: string | undefined, branch?: string | un
|
|||
/**
|
||||
*
|
||||
* 获取仓库指定分支和指定目录内的所有文件(包含子目录的文件)
|
||||
*
|
||||
* **注意: 此api可能会大幅度消耗请求次数,请谨慎使用**
|
||||
*
|
||||
* @param { string } [path = ''] 路径名称(可放参数)
|
||||
* @param { string } [branch = ''] 仓库分支名称
|
||||
* @param { Object } options
|
||||
|
@ -155,7 +162,7 @@ export function flattenRepositoryFiles(path?: string | undefined, branch?: strin
|
|||
type: 'file';
|
||||
}[]>;
|
||||
/**
|
||||
* 请求一个文件而不是直接储存为文件
|
||||
* 请求一个文件而不是直接储存为文件,这样可以省内存空间
|
||||
* @param { string } url
|
||||
* @param { (receivedBytes: number, total?:number, filename?: string) => void } [onProgress]
|
||||
* @param { RequestInit } [options={}]
|
||||
|
@ -174,3 +181,37 @@ export function request(url: string, onProgress?: ((receivedBytes: number, total
|
|||
* @returns { progress }
|
||||
*/
|
||||
export function createProgress(title?: string | undefined, max?: string | number | undefined, fileName?: string | undefined, value?: string | number | undefined): progress;
|
||||
/**
|
||||
* 从GitHub存储库检索最新版本(tag),不包括特定tag。
|
||||
*
|
||||
* 此函数从GitHub存储库中获取由所有者和存储库名称指定的tags列表,然后返回不是“v1998”的最新tag名称。
|
||||
* @param {string} owner GitHub上拥有存储库的用户名或组织名称。
|
||||
* @param {string} repo 要从中提取tag的存储库的名称。
|
||||
* @returns {Promise<string>} 以最新版本tag的名称解析的promise,或者如果操作失败则以错误拒绝。
|
||||
* @throws {Error} 如果获取操作失败或找不到有效tag,将抛出错误。
|
||||
*/
|
||||
export function getLatestVersionFromGitHub(owner?: string, repo?: string): Promise<string>;
|
||||
/**
|
||||
* 从指定目录中的GitHub存储库中获取树
|
||||
* @param {string[]} directories 要从中获取树的目录列表
|
||||
* @param {string} version 从中获取树的版本或分支。
|
||||
* @param {string} [owner = 'libccy'] GitHub上拥有存储库的用户名或组织名称。
|
||||
* @param {string} [repo = 'noname'] GitHub存储库的名称
|
||||
* @returns {Promise<{
|
||||
* path: string;
|
||||
* mode: string;
|
||||
* type: "blob" | "tree";
|
||||
* sha: string;
|
||||
* size: number;
|
||||
* url: string;
|
||||
* }[][]>} 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<{
|
||||
path: string;
|
||||
mode: string;
|
||||
type: "blob" | "tree";
|
||||
sha: string;
|
||||
size: number;
|
||||
url: string;
|
||||
}[][]>;
|
||||
|
|
|
@ -8,7 +8,7 @@ export class status {
|
|||
/**
|
||||
* @type { GameEventPromise }
|
||||
*/
|
||||
event: any;
|
||||
event: GameEventPromise;
|
||||
ai: {};
|
||||
lastdragchange: any[];
|
||||
skillaudio: any[];
|
||||
|
@ -30,39 +30,43 @@ export class status {
|
|||
prehidden_skills: any[];
|
||||
postReconnect: {};
|
||||
/**
|
||||
* @type { string | void }
|
||||
* @type { string | undefined }
|
||||
*/
|
||||
extension: string | void;
|
||||
extension: string | undefined;
|
||||
/**
|
||||
* @type { boolean | void }
|
||||
* @type { boolean | undefined }
|
||||
*/
|
||||
dragged: boolean | void;
|
||||
dragged: boolean | undefined;
|
||||
/**
|
||||
* @type { boolean | void }
|
||||
* @type { boolean | undefined }
|
||||
*/
|
||||
touchconfirmed: boolean | void;
|
||||
touchconfirmed: boolean | undefined;
|
||||
/**
|
||||
* @type { boolean | void }
|
||||
* @type { boolean | undefined }
|
||||
*/
|
||||
connectMode: boolean | void;
|
||||
connectMode: boolean | undefined;
|
||||
/**
|
||||
* @type { boolean | void }
|
||||
* @type { boolean | undefined }
|
||||
*/
|
||||
importingExtension: boolean | void;
|
||||
importingExtension: boolean | undefined;
|
||||
/**
|
||||
* @type { Promise<any>[] | void }
|
||||
* @type { Promise<any>[] | undefined }
|
||||
*/
|
||||
extensionLoaded: Promise<any>[] | void;
|
||||
extensionLoaded: Promise<any>[] | undefined;
|
||||
/**
|
||||
* @type { Promise<any>[] | void }
|
||||
* @type { Promise<any>[] | undefined }
|
||||
*/
|
||||
extensionLoading: Promise<any>[] | void;
|
||||
extensionLoading: Promise<any>[] | undefined;
|
||||
/**
|
||||
* @type { { [key: string]: Promise<any>[] } | void }
|
||||
* @type { { [key: string]: Promise<any>[] } | undefined }
|
||||
*/
|
||||
importing: void | {
|
||||
importing: {
|
||||
[key: string]: Promise<any>[];
|
||||
};
|
||||
} | undefined;
|
||||
/**
|
||||
* @type { Function | boolean | undefined }
|
||||
*/
|
||||
new_tutorial: Function | boolean | undefined;
|
||||
}
|
||||
export let _status: status;
|
||||
export function setStatus(instance?: status | undefined): void;
|
||||
|
|
|
@ -7,6 +7,10 @@ export class Click {
|
|||
* @type {(arg0: string) => void}
|
||||
*/
|
||||
menuTab: (arg0: string) => void;
|
||||
/**
|
||||
* @type {() => void}
|
||||
*/
|
||||
configMenu: () => void;
|
||||
identitycircle(): void;
|
||||
connectEvents(): void;
|
||||
connectClients(): void;
|
||||
|
|
|
@ -2,7 +2,7 @@ export class Create {
|
|||
/**
|
||||
* @type {(video: Videos, before: boolean) => void}
|
||||
*/
|
||||
videoNode: (video: any, before: boolean) => void;
|
||||
videoNode: (video: Videos, before: boolean) => void;
|
||||
/**
|
||||
* 创建身份牌实例
|
||||
*/
|
||||
|
@ -62,9 +62,9 @@ export class Create {
|
|||
caption(str: any, position: any): HTMLDivElement;
|
||||
control(...args: any[]): import("../../library/element/control.js").Control;
|
||||
confirm(str: any, func: any): void;
|
||||
skills(skills: any): any;
|
||||
skills2(skills: any): any;
|
||||
skills3(skills: any): any;
|
||||
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;
|
||||
arena(): void;
|
||||
system(str: any, func: any, right: any, before: any): HTMLDivElement;
|
||||
pause(): HTMLDivElement | undefined;
|
||||
|
@ -104,7 +104,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): any[] | undefined;
|
||||
players(numberOfPlayers: any): import("noname-typings/nonameModules/noname/library/element/player.js").Player[] | undefined;
|
||||
me(hasme: any): void;
|
||||
card(position: any, info: any, noclick: any): import("../../library/element/card.js").Card;
|
||||
cardsAsync(...args: any[]): void;
|
||||
|
|
|
@ -30,7 +30,7 @@ export class UI {
|
|||
/**
|
||||
* @type { Dialog }
|
||||
*/
|
||||
dialog: any;
|
||||
dialog: Dialog;
|
||||
/**
|
||||
* @type { HTMLDivElement }
|
||||
*/
|
||||
|
@ -42,7 +42,7 @@ export class UI {
|
|||
/**
|
||||
* @type { Control }
|
||||
*/
|
||||
control: any;
|
||||
control: Control;
|
||||
/**
|
||||
* @type { Control | undefined }
|
||||
*/
|
||||
|
@ -129,6 +129,10 @@ export class UI {
|
|||
* @type {HTMLDivElement}
|
||||
*/
|
||||
tempnowuxie: HTMLDivElement;
|
||||
/**
|
||||
* @type {HTMLDivElement}
|
||||
*/
|
||||
cardPile: HTMLDivElement;
|
||||
refresh(node: any): void;
|
||||
clear(): void;
|
||||
updatec(): void;
|
||||
|
|
|
@ -7,4 +7,4 @@
|
|||
*/
|
||||
export const promiseErrorHandlerMap: Record<"firefox" | "chrome" | "safari" | "other", new () => PromiseErrorHandler>;
|
||||
export type PromiseErrorHandler = import('./struct/interface/promise-error-handler.js').PromiseErrorHandler;
|
||||
import { PromiseErrorHandler } from './struct/index.js';
|
||||
import { PromiseErrorHandler } from "./struct/index.js";
|
||||
|
|
Binary file not shown.
|
@ -53,18 +53,19 @@ export class Game {
|
|||
/**
|
||||
* @type { string }
|
||||
*/
|
||||
// @ts-ignore
|
||||
layout;
|
||||
/**
|
||||
* @type { Player }
|
||||
*/
|
||||
// @ts-ignore
|
||||
me;
|
||||
/**
|
||||
* @type { boolean }
|
||||
*/
|
||||
// @ts-ignore
|
||||
chess;
|
||||
/**
|
||||
* @type { Player }
|
||||
*/
|
||||
zhu;
|
||||
globalEventHandlers = new (class {
|
||||
constructor() {
|
||||
this._handlers = {};
|
||||
|
@ -557,8 +558,8 @@ export class Game {
|
|||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasGlobalHistory(key, filter, last) {
|
||||
|
@ -580,8 +581,8 @@ export class Game {
|
|||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { void }
|
||||
*/
|
||||
checkGlobalHistory(key, filter, last) {
|
||||
|
@ -608,8 +609,8 @@ export class Game {
|
|||
* @template { keyof GameHistory } T
|
||||
* @overload
|
||||
* @param { T } key
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } [filter]
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { GameHistory[T] }
|
||||
*/
|
||||
getGlobalHistory(key, filter, last) {
|
||||
|
@ -630,8 +631,8 @@ export class Game {
|
|||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasAllGlobalHistory(key, filter, last) {
|
||||
|
@ -656,8 +657,8 @@ export class Game {
|
|||
/**
|
||||
* @template { keyof GameHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { void }
|
||||
*/
|
||||
checkAllGlobalHistory(key, filter, last) {
|
||||
|
@ -686,8 +687,8 @@ export class Game {
|
|||
* @template { keyof GameHistory } T
|
||||
* @overload
|
||||
* @param { T } key
|
||||
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } [filter]
|
||||
* @param { import('../library/index.js').GameEventPromise } [last]
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { GameHistory[T] }
|
||||
*/
|
||||
getAllGlobalHistory(key, filter, last) {
|
||||
|
@ -718,12 +719,12 @@ export class Game {
|
|||
/**
|
||||
* @overload
|
||||
* @param { Card } cards
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
/**
|
||||
* @overload
|
||||
* @param {Card[]} cards
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
cardsDiscard(cards) {
|
||||
/** @type { 'cards' | 'card' | void } */
|
||||
|
@ -746,12 +747,12 @@ export class Game {
|
|||
/**
|
||||
* @overload
|
||||
* @param { Card } cards
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
/**
|
||||
* @overload
|
||||
* @param {Card[]} cards
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
cardsGotoOrdering(cards) {
|
||||
/** @type { 'cards' | 'card' | void } */
|
||||
|
@ -771,13 +772,13 @@ export class Game {
|
|||
* @overload
|
||||
* @param { Card } cards
|
||||
* @param { 'toRenku' | false } [bool] 为false时不触发trigger,为'toRenku'时牌放到仁库
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
/**
|
||||
* @overload
|
||||
* @param {Card[]} cards
|
||||
* @param { 'toRenku' | false } [bool] 为false时不触发trigger,为'toRenku'时牌放到仁库
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
cardsGotoSpecial(cards, bool) {
|
||||
/** @type { 'cards' | 'card' | void } */
|
||||
|
@ -836,7 +837,7 @@ export class Game {
|
|||
return next;
|
||||
}
|
||||
/**
|
||||
* @param { import('../library/index.js').GameEventPromise } event
|
||||
* @param { GameEventPromise } event
|
||||
*/
|
||||
$cardsGotoPile(event) {
|
||||
const cards = event.cards;
|
||||
|
@ -4651,8 +4652,8 @@ export class Game {
|
|||
* @param { string } name
|
||||
* @param { string } skill
|
||||
* @param { Player } player
|
||||
* @param { import('../library/index.js').GameEventPromise } event
|
||||
* @returns { import('../library/index.js').GameEventPromise }
|
||||
* @param { GameEventPromise } event
|
||||
* @returns { GameEventPromise }
|
||||
*/
|
||||
createTrigger(name, skill, player, event, indexedData) {
|
||||
let info = get.info(skill);
|
||||
|
@ -4675,7 +4676,7 @@ export class Game {
|
|||
*
|
||||
* @param { string } name
|
||||
* @param { false } [trigger]
|
||||
* @param { import('../library/index.js').GameEventPromise } [triggerEvent]
|
||||
* @param { GameEventPromise } [triggerEvent]
|
||||
*/
|
||||
createEvent(name, trigger, triggerEvent) {
|
||||
const next = new lib.element.GameEvent(name, trigger).toPromise();
|
||||
|
@ -5832,11 +5833,11 @@ export class Game {
|
|||
*/
|
||||
executingAsyncEventMap = new Map();
|
||||
/**
|
||||
* @type { import('../library/index.js').GameEventPromise[] }
|
||||
* @type { GameEventPromise[] }
|
||||
*/
|
||||
belongAsyncEventList = [];
|
||||
/**
|
||||
* @param { import('../library/index.js').GameEventPromise } [belongAsyncEvent]
|
||||
* @param { GameEventPromise } [belongAsyncEvent]
|
||||
*/
|
||||
async loop(belongAsyncEvent) {
|
||||
if (belongAsyncEvent) {
|
||||
|
@ -6017,7 +6018,7 @@ export class Game {
|
|||
}
|
||||
}
|
||||
/**
|
||||
* @param { import('../library/index.js').GameEventPromise } [belongAsyncEvent]
|
||||
* @param { GameEventPromise } [belongAsyncEvent]
|
||||
*/
|
||||
runContent(belongAsyncEvent) {
|
||||
return new Promise((resolve) => {
|
||||
|
@ -6331,7 +6332,7 @@ export class Game {
|
|||
return game.asyncDelay(time, time2);
|
||||
}
|
||||
/**
|
||||
* @param { import('../library/index.js').GameEventPromise } [event]
|
||||
* @param { GameEventPromise } [event]
|
||||
*/
|
||||
check(event = _status.event) {
|
||||
game.callHook("checkBegin", [event]);
|
||||
|
@ -7486,20 +7487,21 @@ export class Game {
|
|||
}
|
||||
/**
|
||||
* @param { Player[] } players
|
||||
* @param { number | number[] | (player: Player) => number } num
|
||||
* @param { number | number[] | (player: Player) => number } [num]
|
||||
* @param { { drawDeck: boolean } } [drawDeck]
|
||||
* @param { boolean } [bottom]
|
||||
*/
|
||||
asyncDraw(players, num, drawDeck, bottom) {
|
||||
return players.forEach((value, index) => {
|
||||
async asyncDraw(players, num, drawDeck, bottom) {
|
||||
for (let index = 0; index < players.length; index++) {
|
||||
const value = players[index];
|
||||
let num2 = 1;
|
||||
if (typeof num == "number") num2 = num;
|
||||
else if (Array.isArray(num)) num2 = num[index];
|
||||
else if (typeof num == "function") num2 = num(value);
|
||||
if (drawDeck && drawDeck.drawDeck) value.draw(num2, false, drawDeck);
|
||||
else if (bottom) value.draw(num2, "nodelay", "bottom");
|
||||
else value.draw(num2, "nodelay");
|
||||
});
|
||||
if (drawDeck && drawDeck.drawDeck) await value.draw(num2, false, drawDeck);
|
||||
else if (bottom) await value.draw(num2, "nodelay", "bottom");
|
||||
else await value.draw(num2, "nodelay");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param { Player[] } players
|
||||
|
@ -7936,7 +7938,7 @@ export class Game {
|
|||
* @param { Player } player
|
||||
* @param { string | Card[] } card
|
||||
* @param { Player[] } [targets]
|
||||
* @param { import('../library/index.js').GameEventPromise } [event]
|
||||
* @param { GameEventPromise } [event]
|
||||
* @param { boolean } [forced]
|
||||
* @param { string } [logvid]
|
||||
*/
|
||||
|
|
|
@ -916,21 +916,30 @@ export class Get {
|
|||
"[object Date]": true,
|
||||
};
|
||||
|
||||
if (typeof obj !== "object" || obj === null || !canTranverse[getType(obj)]) return obj;
|
||||
if (
|
||||
typeof obj !== "object" ||
|
||||
obj === null ||
|
||||
!canTranverse[getType(obj)]
|
||||
)
|
||||
return obj;
|
||||
|
||||
// @ts-ignore
|
||||
if (map.has(obj)) return map.get(obj);
|
||||
|
||||
const constructor = obj.constructor;
|
||||
// @ts-ignore
|
||||
const target = constructor
|
||||
? // 这四类数据处理单独处理
|
||||
// 这四类数据处理单独处理
|
||||
// (实际上需要处理的只有Map和Set)
|
||||
// 除此之外的就只能祝愿有拷贝构造函数了
|
||||
Array.isArray(obj) || obj instanceof Map || obj instanceof Set || constructor === Object
|
||||
const target = constructor
|
||||
? Array.isArray(obj) ||
|
||||
obj instanceof Map ||
|
||||
obj instanceof Set ||
|
||||
constructor === Object
|
||||
? // @ts-ignore
|
||||
new constructor()
|
||||
: constructor.name in window && /\[native code\]/.test(constructor.toString())
|
||||
: constructor.name in window &&
|
||||
/\[native code\]/.test(constructor.toString())
|
||||
? // @ts-ignore
|
||||
new constructor(obj)
|
||||
: obj
|
||||
|
@ -959,7 +968,11 @@ export class Get {
|
|||
if (obj.hasOwnProperty(key)) {
|
||||
const result = { enumerable, configurable };
|
||||
if (descriptor.hasOwnProperty("value")) {
|
||||
result.value = get.copy(descriptor.value, copyKeyDeep, map);
|
||||
result.value = get.copy(
|
||||
descriptor.value,
|
||||
copyKeyDeep,
|
||||
map
|
||||
);
|
||||
result.writable = descriptor.writable;
|
||||
} else {
|
||||
const { get, set } = descriptor;
|
||||
|
|
|
@ -6,6 +6,7 @@ export class Button extends HTMLDivElement {
|
|||
/**
|
||||
* @type { string | undefined }
|
||||
*/
|
||||
// eslint-disable-next-line no-unreachable
|
||||
buttonid;
|
||||
/**
|
||||
* @param {{}} item
|
||||
|
@ -21,13 +22,26 @@ export class Button extends HTMLDivElement {
|
|||
// @ts-ignore
|
||||
[item, type, position, noClick, button] = other._args;
|
||||
}
|
||||
if (typeof type == "function") button = type(item, type, position, noClick, button);
|
||||
if (typeof type == "function")
|
||||
button = type(item, type, position, noClick, button);
|
||||
else if (ui.create.buttonPresets[type])
|
||||
button = ui.create.buttonPresets[type](item, type, position, noClick, button);
|
||||
button = ui.create.buttonPresets[type](
|
||||
item,
|
||||
type,
|
||||
position,
|
||||
noClick,
|
||||
button
|
||||
);
|
||||
if (button) {
|
||||
Object.setPrototypeOf(button, (lib.element.Button || Button).prototype);
|
||||
Object.setPrototypeOf(
|
||||
button,
|
||||
(lib.element.Button || Button).prototype
|
||||
);
|
||||
if (!noClick)
|
||||
button.addEventListener(lib.config.touchscreen ? "touchend" : "click", ui.click.button);
|
||||
button.addEventListener(
|
||||
lib.config.touchscreen ? "touchend" : "click",
|
||||
ui.click.button
|
||||
);
|
||||
else {
|
||||
button.classList.add("noclick");
|
||||
const intro = button.querySelector(".intro");
|
||||
|
|
|
@ -40,7 +40,10 @@ export class Card extends HTMLDivElement {
|
|||
buildEventListener(info) {
|
||||
let card = this;
|
||||
if (info != "noclick") {
|
||||
card.addEventListener(lib.config.touchscreen ? "touchend" : "click", ui.click.card);
|
||||
card.addEventListener(
|
||||
lib.config.touchscreen ? "touchend" : "click",
|
||||
ui.click.card
|
||||
);
|
||||
if (lib.config.touchscreen) {
|
||||
card.addEventListener("touchstart", ui.click.cardtouchstart);
|
||||
card.addEventListener("touchmove", ui.click.cardtouchmove);
|
||||
|
@ -75,6 +78,7 @@ export class Card extends HTMLDivElement {
|
|||
if (!noclick) lib.setIntro(this);
|
||||
}
|
||||
/** @type { SMap<HTMLDivElement> } */
|
||||
// eslint-disable-next-line no-unreachable
|
||||
node;
|
||||
/**
|
||||
* @type { string }
|
||||
|
@ -96,6 +100,10 @@ export class Card extends HTMLDivElement {
|
|||
* @type { any[] }
|
||||
*/
|
||||
_uncheck;
|
||||
/**
|
||||
* @type { boolean }
|
||||
*/
|
||||
isCard;
|
||||
//执行销毁一张牌的钩子函数
|
||||
selfDestroy(event) {
|
||||
if (this._selfDestroyed) return;
|
||||
|
@ -192,7 +200,10 @@ export class Card extends HTMLDivElement {
|
|||
}
|
||||
removeGaintag(tag) {
|
||||
if (tag === true) {
|
||||
if ((this.gaintag && this.gaintag.length) || this.node.gaintag.innerHTML.length)
|
||||
if (
|
||||
(this.gaintag && this.gaintag.length) ||
|
||||
this.node.gaintag.innerHTML.length
|
||||
)
|
||||
this.addGaintag([]);
|
||||
} else if (this.hasGaintag(tag)) {
|
||||
this.gaintag.remove(tag);
|
||||
|
@ -260,7 +271,11 @@ export class Card extends HTMLDivElement {
|
|||
this.number = parseInt(card[1]) || 0;
|
||||
this.name = card[2];
|
||||
|
||||
if (info.destroy && typeof info.destroy != "boolean" && !lib.skill[info.destroy]) {
|
||||
if (
|
||||
info.destroy &&
|
||||
typeof info.destroy != "boolean" &&
|
||||
!lib.skill[info.destroy]
|
||||
) {
|
||||
this.destroyed = info.destroy;
|
||||
}
|
||||
|
||||
|
@ -291,7 +306,21 @@ export class Card extends HTMLDivElement {
|
|||
var cardnum = card[1] || "";
|
||||
if (parseInt(cardnum) == cardnum) cardnum = parseInt(cardnum);
|
||||
if (cardnum > 0 && cardnum < 14) {
|
||||
cardnum = ["A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"][cardnum - 1];
|
||||
cardnum = [
|
||||
"A",
|
||||
"2",
|
||||
"3",
|
||||
"4",
|
||||
"5",
|
||||
"6",
|
||||
"7",
|
||||
"8",
|
||||
"9",
|
||||
"10",
|
||||
"J",
|
||||
"Q",
|
||||
"K",
|
||||
][cardnum - 1];
|
||||
}
|
||||
if (this.name) {
|
||||
this.classList.remove("epic");
|
||||
|
@ -338,14 +367,20 @@ export class Card extends HTMLDivElement {
|
|||
this.classList.add("fullskin");
|
||||
if (img) {
|
||||
if (img.startsWith("ext:")) {
|
||||
this.node.image.setBackgroundImage(img.replace(/^ext:/, "extension/"));
|
||||
this.node.image.setBackgroundImage(
|
||||
img.replace(/^ext:/, "extension/")
|
||||
);
|
||||
} else {
|
||||
this.node.image.setBackgroundDB(img);
|
||||
}
|
||||
} else {
|
||||
if (lib.card[bg].modeimage) {
|
||||
this.node.image.setBackgroundImage(
|
||||
"image/mode/" + lib.card[bg].modeimage + "/card/" + bg + ".png"
|
||||
"image/mode/" +
|
||||
lib.card[bg].modeimage +
|
||||
"/card/" +
|
||||
bg +
|
||||
".png"
|
||||
);
|
||||
} else {
|
||||
do {
|
||||
|
@ -353,18 +388,29 @@ export class Card extends HTMLDivElement {
|
|||
if (bg == "sha" && typeof nature == "string") {
|
||||
let natures = get.natureList(nature),
|
||||
_bg;
|
||||
for (const n of natures) if (lib.natureBg.has(n)) _bg = n;
|
||||
for (const n of natures)
|
||||
if (lib.natureBg.has(n)) _bg = n;
|
||||
if (_bg) {
|
||||
this.node.image.setBackgroundImage(lib.natureBg.get(_bg));
|
||||
this.node.image.setBackgroundImage(
|
||||
lib.natureBg.get(_bg)
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.node.image.setBackgroundImage("image/card/" + bg + ".png");
|
||||
this.node.image.setBackgroundImage(
|
||||
"image/card/" + bg + ".png"
|
||||
);
|
||||
} while (0);
|
||||
}
|
||||
}
|
||||
} else if (get.dynamicVariable(lib.card[bg].image, this) == "background") {
|
||||
if (card[3]) this.node.background.setBackground(bg + "_" + get.natureList(card[3])[0], "card");
|
||||
} else if (
|
||||
get.dynamicVariable(lib.card[bg].image, this) == "background"
|
||||
) {
|
||||
if (card[3])
|
||||
this.node.background.setBackground(
|
||||
bg + "_" + get.natureList(card[3])[0],
|
||||
"card"
|
||||
);
|
||||
else this.node.background.setBackground(bg, "card");
|
||||
} else if (lib.card[bg].fullimage) {
|
||||
this.classList.add("fullimage");
|
||||
|
@ -376,10 +422,19 @@ export class Card extends HTMLDivElement {
|
|||
this.setBackgroundDB(img);
|
||||
}
|
||||
} else if (get.dynamicVariable(lib.card[bg].image, this)) {
|
||||
if (get.dynamicVariable(lib.card[bg].image, this).startsWith("character:")) {
|
||||
this.setBackground(get.dynamicVariable(lib.card[bg].image, this).slice(10), "character");
|
||||
if (
|
||||
get
|
||||
.dynamicVariable(lib.card[bg].image, this)
|
||||
.startsWith("character:")
|
||||
) {
|
||||
this.setBackground(
|
||||
get.dynamicVariable(lib.card[bg].image, this).slice(10),
|
||||
"character"
|
||||
);
|
||||
} else {
|
||||
this.setBackground(get.dynamicVariable(lib.card[bg].image, this));
|
||||
this.setBackground(
|
||||
get.dynamicVariable(lib.card[bg].image, this)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
var cardPack = lib.cardPack["mode_" + get.mode()];
|
||||
|
@ -407,30 +462,44 @@ export class Card extends HTMLDivElement {
|
|||
}
|
||||
if (img) {
|
||||
if (img.startsWith("ext:")) {
|
||||
this.node.avatar.setBackgroundImage(img.replace(/^ext:/, "extension/"));
|
||||
this.node.avatar.setBackgroundImage(
|
||||
img.replace(/^ext:/, "extension/")
|
||||
);
|
||||
this.node.avatar.style.backgroundSize = "cover";
|
||||
} else {
|
||||
this.node.avatar.setBackgroundDB(img);
|
||||
}
|
||||
} else if (get.dynamicVariable(lib.card[bg].image, this)) {
|
||||
if (get.dynamicVariable(lib.card[bg].image, this).startsWith("character:")) {
|
||||
if (
|
||||
get
|
||||
.dynamicVariable(lib.card[bg].image, this)
|
||||
.startsWith("character:")
|
||||
) {
|
||||
this.node.avatar.setBackground(
|
||||
get.dynamicVariable(lib.card[bg].image, this).slice(10),
|
||||
"character"
|
||||
);
|
||||
} else {
|
||||
this.node.avatar.setBackground(get.dynamicVariable(lib.card[bg].image, this));
|
||||
this.node.avatar.setBackground(
|
||||
get.dynamicVariable(lib.card[bg].image, this)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
var cardPack = lib.cardPack["mode_" + get.mode()];
|
||||
if (Array.isArray(cardPack) && cardPack.includes(bg)) {
|
||||
this.node.avatar.setBackground("mode/" + get.mode() + "/card/" + bg);
|
||||
this.node.avatar.setBackground(
|
||||
"mode/" + get.mode() + "/card/" + bg
|
||||
);
|
||||
} else {
|
||||
this.node.avatar.setBackground("card/" + bg);
|
||||
}
|
||||
}
|
||||
} else if (get.dynamicVariable(lib.card[bg].image, this) == "card") {
|
||||
if (card[3]) this.setBackground(bg + "_" + get.natureList(card[3])[0], "card");
|
||||
if (card[3])
|
||||
this.setBackground(
|
||||
bg + "_" + get.natureList(card[3])[0],
|
||||
"card"
|
||||
);
|
||||
else this.setBackground(bg, "card");
|
||||
} else if (
|
||||
typeof get.dynamicVariable(lib.card[bg].image, this) == "string" &&
|
||||
|
@ -444,13 +513,18 @@ export class Card extends HTMLDivElement {
|
|||
this.setBackgroundDB(img);
|
||||
}
|
||||
} else {
|
||||
this.setBackground(get.dynamicVariable(lib.card[bg].image, this));
|
||||
this.setBackground(
|
||||
get.dynamicVariable(lib.card[bg].image, this)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
this.node.background.innerHTML =
|
||||
lib.translate[bg + "_cbg"] || lib.translate[bg + "_bg"] || get.translation(bg)[0];
|
||||
lib.translate[bg + "_cbg"] ||
|
||||
lib.translate[bg + "_bg"] ||
|
||||
get.translation(bg)[0];
|
||||
// this.node.background.style.fontFamily=lib.config.card_font;
|
||||
if (this.node.background.innerHTML.length > 1) this.node.background.classList.add("tight");
|
||||
if (this.node.background.innerHTML.length > 1)
|
||||
this.node.background.classList.add("tight");
|
||||
else this.node.background.classList.remove("tight");
|
||||
}
|
||||
if (!lib.card[bg].fullborder && this.node.avatar && this.node.framebg) {
|
||||
|
@ -502,7 +576,10 @@ export class Card extends HTMLDivElement {
|
|||
let natures = get.natureList(nature);
|
||||
natures.sort(lib.sort.nature);
|
||||
for (let nature of natures) {
|
||||
name += lib.translate["nature_" + nature] || lib.translate[nature] || "";
|
||||
name +=
|
||||
lib.translate["nature_" + nature] ||
|
||||
lib.translate[nature] ||
|
||||
"";
|
||||
if (nature != "stab") this.node.image.classList.add(nature);
|
||||
}
|
||||
}
|
||||
|
@ -515,7 +592,8 @@ export class Card extends HTMLDivElement {
|
|||
this.node.name.classList.add("longlong");
|
||||
}
|
||||
}
|
||||
this.node.name2.innerHTML = get.translation(card[0]) + cardnum + " " + name;
|
||||
this.node.name2.innerHTML =
|
||||
get.translation(card[0]) + cardnum + " " + name;
|
||||
this.classList.add("card");
|
||||
if (card[3]) {
|
||||
let natures = get.natureList(card[3]);
|
||||
|
@ -539,7 +617,8 @@ export class Card extends HTMLDivElement {
|
|||
var dist = lib.card[this.name].distance;
|
||||
if (dist.attackFrom) {
|
||||
added = true;
|
||||
this.node.range.innerHTML = "范围: " + (-dist.attackFrom + 1);
|
||||
this.node.range.innerHTML =
|
||||
"范围: " + (-dist.attackFrom + 1);
|
||||
}
|
||||
}
|
||||
if (!added) {
|
||||
|
@ -548,13 +627,15 @@ export class Card extends HTMLDivElement {
|
|||
break;
|
||||
case "equip3":
|
||||
if (info.distance && info.distance.globalTo) {
|
||||
this.node.range.innerHTML = "防御: " + info.distance.globalTo;
|
||||
this.node.range.innerHTML =
|
||||
"防御: " + info.distance.globalTo;
|
||||
this.node.name2.innerHTML += "+";
|
||||
}
|
||||
break;
|
||||
case "equip4":
|
||||
if (info.distance && info.distance.globalFrom) {
|
||||
this.node.range.innerHTML = "进攻: " + -info.distance.globalFrom;
|
||||
this.node.range.innerHTML =
|
||||
"进攻: " + -info.distance.globalFrom;
|
||||
this.node.name2.innerHTML += "-";
|
||||
}
|
||||
break;
|
||||
|
@ -608,7 +689,8 @@ export class Card extends HTMLDivElement {
|
|||
game.layout == "nova")
|
||||
) {
|
||||
if (bool) {
|
||||
this.style.transform = this._transform + " translateY(-20px)";
|
||||
this.style.transform =
|
||||
this._transform + " translateY(-20px)";
|
||||
} else {
|
||||
this.style.transform = this._transform || "";
|
||||
}
|
||||
|
@ -659,12 +741,16 @@ export class Card extends HTMLDivElement {
|
|||
let owner = get.owner(this);
|
||||
if (owner) {
|
||||
if (owner == player) return true; //是牌主,必知情。
|
||||
if (player.hasSkillTag("viewHandcard", null, owner, true)) return true; //有viewHandcard标签,必知情。
|
||||
if (player.hasSkillTag("viewHandcard", null, owner, true))
|
||||
return true; //有viewHandcard标签,必知情。
|
||||
if (owner.isUnderControl(true, player)) return true; //被操控,必知情。
|
||||
}
|
||||
if (get.is.shownCard(this)) return true; //此牌是明置牌,必知情。
|
||||
if (this._knowers) {
|
||||
return this._knowers.includes("everyone") || this._knowers.includes(player.playerid);
|
||||
return (
|
||||
this._knowers.includes("everyone") ||
|
||||
this._knowers.includes(player.playerid)
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -702,8 +788,13 @@ export class Card extends HTMLDivElement {
|
|||
this.style.left = this.offsetLeft + "px";
|
||||
this.style.top = this.offsetTop + "px";
|
||||
|
||||
dx = player.getLeft() + player.offsetWidth / 2 - 52 - this.offsetLeft;
|
||||
dy = player.getTop() + player.offsetHeight / 2 - 52 - this.offsetTop;
|
||||
dx =
|
||||
player.getLeft() +
|
||||
player.offsetWidth / 2 -
|
||||
52 -
|
||||
this.offsetLeft;
|
||||
dy =
|
||||
player.getTop() + player.offsetHeight / 2 - 52 - this.offsetTop;
|
||||
}
|
||||
if (get.is.mobileMe(player)) {
|
||||
dx += get.cardOffset();
|
||||
|
@ -753,8 +844,10 @@ export class Card extends HTMLDivElement {
|
|||
var clone = true;
|
||||
var position;
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
if (typeof arguments[i] == "string") node.classList.add(arguments[i]);
|
||||
else if (["div", "fragment"].includes(get.objtype(arguments[i]))) position = arguments[i];
|
||||
if (typeof arguments[i] == "string")
|
||||
node.classList.add(arguments[i]);
|
||||
else if (["div", "fragment"].includes(get.objtype(arguments[i])))
|
||||
position = arguments[i];
|
||||
else if (typeof arguments[i] == "boolean") clone = arguments[i];
|
||||
}
|
||||
node.moveTo = lib.element.Card.prototype.moveTo;
|
||||
|
@ -780,7 +873,9 @@ export class Card extends HTMLDivElement {
|
|||
* @returns {boolean} 是否包含class
|
||||
*/
|
||||
classListContains(className) {
|
||||
return Array.from(arguments).some((name) => this.classList.contains(className));
|
||||
return Array.from(arguments).some((name) =>
|
||||
this.classList.contains(className)
|
||||
);
|
||||
}
|
||||
/**
|
||||
* 判断此牌是否包含class样式,参数有多个时,需全部满足。
|
||||
|
@ -790,7 +885,9 @@ export class Card extends HTMLDivElement {
|
|||
* @returns {boolean} 是否包含class
|
||||
*/
|
||||
classListContainsAll() {
|
||||
return Array.from(arguments).every((name) => this.classList.contains(this.className));
|
||||
return Array.from(arguments).every((name) =>
|
||||
this.classList.contains(this.className)
|
||||
);
|
||||
}
|
||||
/**
|
||||
* 返回一个键值,用于在缓存中作为键名。
|
||||
|
@ -809,7 +906,9 @@ export class Card extends HTMLDivElement {
|
|||
if (bool === false) {
|
||||
ui.cardPile.insertBefore(
|
||||
this,
|
||||
ui.cardPile.childNodes[Math.floor(Math.random() * ui.cardPile.childNodes.length)]
|
||||
ui.cardPile.childNodes[
|
||||
Math.floor(Math.random() * ui.cardPile.childNodes.length)
|
||||
]
|
||||
);
|
||||
} else {
|
||||
if (_status.discarded) {
|
||||
|
|
|
@ -5,6 +5,7 @@ import { ui } from "../../ui/index.js";
|
|||
|
||||
export class Dialog extends HTMLDivElement {
|
||||
/** @type { HTMLDivElement } */
|
||||
// eslint-disable-next-line no-unreachable
|
||||
contentContainer;
|
||||
/** @type { HTMLDivElement } */
|
||||
content;
|
||||
|
@ -51,7 +52,8 @@ export class Dialog extends HTMLDivElement {
|
|||
else dialog.add(argument);
|
||||
});
|
||||
//if (!hidden) dialog.open();
|
||||
if (!lib.config.touchscreen) dialog.contentContainer.onscroll = ui.update;
|
||||
if (!lib.config.touchscreen)
|
||||
dialog.contentContainer.onscroll = ui.update;
|
||||
if (!noTouchScroll) {
|
||||
dialog.contentContainer.ontouchstart = ui.click.dialogtouchStart;
|
||||
dialog.contentContainer.ontouchmove = ui.click.touchScroll;
|
||||
|
@ -98,21 +100,27 @@ export class Dialog extends HTMLDivElement {
|
|||
const buttons = ui.create.div(".buttons", this.content);
|
||||
if (zoom) buttons.classList.add("smallzoom");
|
||||
// @ts-ignore
|
||||
this.buttons = this.buttons.concat(ui.create.buttons(item, "card", buttons, noclick));
|
||||
this.buttons = this.buttons.concat(
|
||||
ui.create.buttons(item, "card", buttons, noclick)
|
||||
);
|
||||
}
|
||||
// @ts-ignore
|
||||
else if (get.itemtype(item) == "players") {
|
||||
var buttons = ui.create.div(".buttons", this.content);
|
||||
if (zoom) buttons.classList.add("smallzoom");
|
||||
// @ts-ignore
|
||||
this.buttons = this.buttons.concat(ui.create.buttons(item, "player", buttons, noclick));
|
||||
this.buttons = this.buttons.concat(
|
||||
ui.create.buttons(item, "player", buttons, noclick)
|
||||
);
|
||||
} else if (item[1] == "textbutton") {
|
||||
ui.create.textbuttons(item[0], this, noclick);
|
||||
} else {
|
||||
var buttons = ui.create.div(".buttons", this.content);
|
||||
if (zoom) buttons.classList.add("smallzoom");
|
||||
// @ts-ignore
|
||||
this.buttons = this.buttons.concat(ui.create.buttons(item[0], item[1], buttons, noclick));
|
||||
this.buttons = this.buttons.concat(
|
||||
ui.create.buttons(item[0], item[1], buttons, noclick)
|
||||
);
|
||||
}
|
||||
if (this.buttons.length) {
|
||||
if (this.forcebutton !== false) this.forcebutton = true;
|
||||
|
@ -166,10 +174,19 @@ export class Dialog extends HTMLDivElement {
|
|||
}
|
||||
ui.dialog = this;
|
||||
let translate;
|
||||
if (lib.config.remember_dialog && lib.config.dialog_transform && !this.classList.contains("fixed")) {
|
||||
if (
|
||||
lib.config.remember_dialog &&
|
||||
lib.config.dialog_transform &&
|
||||
!this.classList.contains("fixed")
|
||||
) {
|
||||
translate = lib.config.dialog_transform;
|
||||
this._dragtransform = translate;
|
||||
this.style.transform = "translate(" + translate[0] + "px," + translate[1] + "px) scale(0.8)";
|
||||
this.style.transform =
|
||||
"translate(" +
|
||||
translate[0] +
|
||||
"px," +
|
||||
translate[1] +
|
||||
"px) scale(0.8)";
|
||||
} else {
|
||||
this.style.transform = "scale(0.8)";
|
||||
}
|
||||
|
@ -179,8 +196,17 @@ export class Dialog extends HTMLDivElement {
|
|||
ui.dialogs.unshift(this);
|
||||
ui.update();
|
||||
ui.refresh(this);
|
||||
if (lib.config.remember_dialog && lib.config.dialog_transform && !this.classList.contains("fixed")) {
|
||||
this.style.transform = "translate(" + translate[0] + "px," + translate[1] + "px) scale(1)";
|
||||
if (
|
||||
lib.config.remember_dialog &&
|
||||
lib.config.dialog_transform &&
|
||||
!this.classList.contains("fixed")
|
||||
) {
|
||||
this.style.transform =
|
||||
"translate(" +
|
||||
translate[0] +
|
||||
"px," +
|
||||
translate[1] +
|
||||
"px) scale(1)";
|
||||
} else {
|
||||
this.style.transform = "scale(1)";
|
||||
}
|
||||
|
|
|
@ -67,37 +67,30 @@ export class GameEvent {
|
|||
/**
|
||||
* @type { Player }
|
||||
*/
|
||||
// @ts-ignore
|
||||
source;
|
||||
/**
|
||||
* @type { Player }
|
||||
*/
|
||||
// @ts-ignore
|
||||
player;
|
||||
/**
|
||||
* @type { Player[] }
|
||||
*/
|
||||
// @ts-ignore
|
||||
players;
|
||||
/**
|
||||
* @type { Player }
|
||||
*/
|
||||
// @ts-ignore
|
||||
target;
|
||||
/**
|
||||
* @type { Player[] }
|
||||
*/
|
||||
// @ts-ignore
|
||||
targets;
|
||||
/**
|
||||
* @type { Card }
|
||||
*/
|
||||
// @ts-ignore
|
||||
card;
|
||||
/**
|
||||
* @type { Card[] }
|
||||
*/
|
||||
// @ts-ignore
|
||||
cards;
|
||||
/**
|
||||
* @type { string }
|
||||
|
@ -114,7 +107,6 @@ export class GameEvent {
|
|||
/**
|
||||
* @type { GameEvent }
|
||||
*/
|
||||
// @ts-ignore
|
||||
_trigger;
|
||||
/**
|
||||
* @type { Result }
|
||||
|
@ -123,61 +115,79 @@ export class GameEvent {
|
|||
/**
|
||||
* @type { number }
|
||||
*/
|
||||
// @ts-ignore
|
||||
baseDamage;
|
||||
/**
|
||||
* @type { Player }
|
||||
*/
|
||||
// @ts-ignore
|
||||
customSource;
|
||||
/**
|
||||
* @type { number }
|
||||
*/
|
||||
// @ts-ignore
|
||||
extraDamage;
|
||||
/**
|
||||
* @type { string }
|
||||
*/
|
||||
// @ts-ignore
|
||||
nature;
|
||||
/**
|
||||
* @type { boolean }
|
||||
*/
|
||||
// @ts-ignore
|
||||
notrigger;
|
||||
/**
|
||||
* @type { number }
|
||||
*/
|
||||
// @ts-ignore
|
||||
original_num;
|
||||
/**
|
||||
* @type { boolean }
|
||||
*/
|
||||
// @ts-ignore
|
||||
unreal;
|
||||
/**
|
||||
* @type { Button[] }
|
||||
*/
|
||||
// @ts-ignore
|
||||
excludeButton;
|
||||
/**
|
||||
* @type { Result }
|
||||
*/
|
||||
// @ts-ignore
|
||||
result;
|
||||
/**
|
||||
* @type { GameEventPromise | void | null }
|
||||
*/
|
||||
// @ts-ignore
|
||||
parent;
|
||||
/**
|
||||
* @type { string }
|
||||
*/
|
||||
name;
|
||||
/**
|
||||
* @type { Function | void | null }
|
||||
* @type { (this: GameEventPromise) => any | undefined | void | null }
|
||||
*/
|
||||
filterStop;
|
||||
/**
|
||||
* @type { Result['cost_data'] }
|
||||
*/
|
||||
cost_data;
|
||||
/**
|
||||
* @type { boolean }
|
||||
*/
|
||||
responded;
|
||||
/**
|
||||
* @type { string | undefined }
|
||||
*/
|
||||
judgestr;
|
||||
/**
|
||||
* @type { boolean }
|
||||
*/
|
||||
judging;
|
||||
/**
|
||||
* @type { Function | undefined }
|
||||
*/
|
||||
judge2;
|
||||
/**
|
||||
* @type { Card[] }
|
||||
*/
|
||||
orderingCards;
|
||||
/**
|
||||
* @type { Function | undefined }
|
||||
*/
|
||||
ai;
|
||||
/**
|
||||
* @param {keyof this} key
|
||||
* @param {number} [value]
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
/**
|
||||
* @typedef { {
|
||||
* useCard: GameEventPromise[],
|
||||
* respond: GameEventPromise[],
|
||||
* skipped: GameEventPromise[],
|
||||
* lose: GameEventPromise[],
|
||||
* gain: GameEventPromise[],
|
||||
* sourceDamage: GameEventPromise[],
|
||||
* damage: GameEventPromise[],
|
||||
* custom: GameEventPromise[],
|
||||
* useSkill: GameEventPromise[],
|
||||
* }} ActionHistory
|
||||
*/
|
||||
|
||||
import { ai } from "../../ai/index.js";
|
||||
import { get } from "../../get/index.js";
|
||||
import { game } from "../../game/index.js";
|
||||
|
@ -165,6 +179,7 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
}
|
||||
/** @type { SMap<HTMLDivElement> } */
|
||||
// eslint-disable-next-line no-unreachable
|
||||
node;
|
||||
/**
|
||||
* @type { number }
|
||||
|
@ -223,17 +238,7 @@ export class Player extends HTMLDivElement {
|
|||
*/
|
||||
stat;
|
||||
/**
|
||||
* @type { {
|
||||
* useCard: GameEventPromise[],
|
||||
* respond: GameEventPromise[],
|
||||
* skipped: GameEventPromise[],
|
||||
* lose: GameEventPromise[],
|
||||
* gain: GameEventPromise[],
|
||||
* sourceDamage: GameEventPromise[],
|
||||
* damage: GameEventPromise[],
|
||||
* custom: GameEventPromise[],
|
||||
* useSkill: GameEventPromise[],
|
||||
* }[] }
|
||||
* @type { ActionHistory[] }
|
||||
*/
|
||||
actionHistory;
|
||||
/**
|
||||
|
@ -261,7 +266,8 @@ export class Player extends HTMLDivElement {
|
|||
* friend: [],
|
||||
* enemy: [],
|
||||
* neutral: [],
|
||||
* handcards: {
|
||||
* shown?: number,
|
||||
* handcards?: {
|
||||
* global: [],
|
||||
* source: [],
|
||||
* viewed: []
|
||||
|
@ -341,6 +347,18 @@ export class Player extends HTMLDivElement {
|
|||
* @type { ((player: this) => any)[] }
|
||||
*/
|
||||
_inits;
|
||||
/**
|
||||
* @type { boolean }
|
||||
*/
|
||||
isZhu;
|
||||
/**
|
||||
* @type { string }
|
||||
*/
|
||||
identity;
|
||||
/**
|
||||
* @type { boolean | undefined }
|
||||
*/
|
||||
identityShown;
|
||||
//新函数
|
||||
/**
|
||||
* 怒气
|
||||
|
@ -1401,7 +1419,7 @@ export class Player extends HTMLDivElement {
|
|||
/**
|
||||
* 向target发起协力
|
||||
* @param { Player } target
|
||||
* @param {*} type
|
||||
* @param { string } type
|
||||
* @param {*} reason
|
||||
*/
|
||||
cooperationWith(target, type, reason) {
|
||||
|
@ -2022,6 +2040,7 @@ export class Player extends HTMLDivElement {
|
|||
/**
|
||||
* @param { string } name
|
||||
* @param { string } type
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasUsableCard(name, type) {
|
||||
if (typeof type !== "string") type = type ? "limit" : "all";
|
||||
|
@ -3697,6 +3716,12 @@ export class Player extends HTMLDivElement {
|
|||
if (num == undefined) return 0;
|
||||
return num;
|
||||
}
|
||||
/**
|
||||
* @param {*} [unowned]
|
||||
* @param {*} [unique]
|
||||
* @param {*} [hidden]
|
||||
* @returns { string[] }
|
||||
*/
|
||||
getStockSkills(unowned, unique, hidden) {
|
||||
var list = [];
|
||||
if (lib.character[this.name] && (hidden || !this.isUnseen(0))) {
|
||||
|
@ -3841,6 +3866,11 @@ export class Player extends HTMLDivElement {
|
|||
getDiscardableCards(player, arg1, arg2) {
|
||||
return Array.from(this.iterableGetDiscardableCards(player, arg1, arg2));
|
||||
}
|
||||
/**
|
||||
* @param {Parameters<lib['filter']['canBeGained']>[1]} player
|
||||
* @param {Parameters<this['iterableGetCards']>[0]} arg1
|
||||
* @param {Parameters<this['iterableGetCards']>[1]} arg2
|
||||
*/
|
||||
*iterableGetGainableCards(player, arg1, arg2) {
|
||||
for (let card of this.iterableGetCards(arg1, arg2)) {
|
||||
if (lib.filter.canBeGained(card, player, this)) {
|
||||
|
@ -3848,6 +3878,12 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {Parameters<this['iterableGetGainableCards']>[0]} player
|
||||
* @param {Parameters<this['iterableGetGainableCards']>[1]} [arg1]
|
||||
* @param {Parameters<this['iterableGetGainableCards']>[2]} [arg2]
|
||||
*/
|
||||
getGainableCards(player, arg1, arg2) {
|
||||
return Array.from(this.iterableGetGainableCards(player, arg1, arg2));
|
||||
}
|
||||
|
@ -3859,6 +3895,10 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
return list;
|
||||
}
|
||||
/**
|
||||
* @param { Parameters<typeof this['iterableGetCards']>[0] } [arg1]
|
||||
* @param { Parameters<typeof this['iterableGetCards']>[1] } [arg2]
|
||||
*/
|
||||
countCards(arg1, arg2) {
|
||||
let count = 0;
|
||||
for (let item of this.iterableGetCards(arg1, arg2)) {
|
||||
|
@ -3882,6 +3922,11 @@ export class Player extends HTMLDivElement {
|
|||
countDiscardableCards(player, arg1, arg2) {
|
||||
return this.getDiscardableCards(player, arg1, arg2).length;
|
||||
}
|
||||
/**
|
||||
* @param {Parameters<this['getGainableCards']>[0]} player
|
||||
* @param {Parameters<this['getGainableCards']>[1]} [arg1]
|
||||
* @param {Parameters<this['getGainableCards']>[2]} [arg2]
|
||||
*/
|
||||
countGainableCards(player, arg1, arg2) {
|
||||
return this.getGainableCards(player, arg1, arg2).length;
|
||||
}
|
||||
|
@ -3905,6 +3950,11 @@ export class Player extends HTMLDivElement {
|
|||
skills.sort((a, b) => get.priority(a) - get.priority(b));
|
||||
return skills;
|
||||
}
|
||||
/**
|
||||
* @param { string | boolean | null } [arg2]
|
||||
* @param { boolean | null} [arg3]
|
||||
* @param {boolean} [arg4]
|
||||
*/
|
||||
getSkills(arg2, arg3, arg4) {
|
||||
var skills = this.skills.slice(0);
|
||||
var es = [];
|
||||
|
@ -5780,7 +5830,12 @@ export class Player extends HTMLDivElement {
|
|||
);
|
||||
return this;
|
||||
}
|
||||
gainMultiple(targets, position) {
|
||||
/**
|
||||
*
|
||||
* @param { Player[] } targets
|
||||
* @param { string } [position]
|
||||
*/
|
||||
gainMultiple(targets, position = "h") {
|
||||
var next = game.createEvent("gainMultiple", false);
|
||||
next.setContent("gainMultiple");
|
||||
next.player = this;
|
||||
|
@ -5944,6 +5999,12 @@ export class Player extends HTMLDivElement {
|
|||
next.gaintag = [];
|
||||
return next;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param { Card | Card[] } cards
|
||||
* @param { Player } target
|
||||
* @param { boolean } [visible]
|
||||
*/
|
||||
give(cards, target, visible) {
|
||||
var next = target.gain(cards, this);
|
||||
next.animate = visible ? "give" : "giveAuto";
|
||||
|
@ -6135,6 +6196,9 @@ export class Player extends HTMLDivElement {
|
|||
next.setContent("doubleDraw");
|
||||
return next;
|
||||
}
|
||||
/**
|
||||
* @param { number } [num]
|
||||
*/
|
||||
loseHp(num) {
|
||||
var next = game.createEvent("loseHp");
|
||||
next.num = num;
|
||||
|
@ -6786,6 +6850,12 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
if (typeof proceed == "function") proceed();
|
||||
}
|
||||
/**
|
||||
* @param { string | string[] } name
|
||||
* @param { Player | Player[] } [targets]
|
||||
* @param { boolean | string } [nature]
|
||||
* @param { boolean } [logv]
|
||||
*/
|
||||
logSkill(name, targets, nature, logv) {
|
||||
if (get.itemtype(targets) == "player") targets = [targets];
|
||||
var nopop = false;
|
||||
|
@ -6979,7 +7049,13 @@ export class Player extends HTMLDivElement {
|
|||
node.classList.add(className);
|
||||
}
|
||||
}
|
||||
popup(name, className, nobroadcast) {
|
||||
/**
|
||||
*
|
||||
* @param { string } name
|
||||
* @param { string } className
|
||||
* @param { Parameters<this["damagepop"]>[3] } [nobroadcast]
|
||||
*/
|
||||
popup(name, className = "water", nobroadcast) {
|
||||
var name2 = get.translation(name);
|
||||
if (!name2) return;
|
||||
this.$damagepop(name2, className || "water", true, nobroadcast);
|
||||
|
@ -7402,6 +7478,13 @@ export class Player extends HTMLDivElement {
|
|||
this.classList.remove("linked");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param { string | Card | VCard } card
|
||||
* @param { Player } target
|
||||
* @param { boolean } [distance]
|
||||
* @param { GameEventPromise | boolean } [includecard]
|
||||
* @returns { boolean }
|
||||
*/
|
||||
canUse(card, target, distance, includecard) {
|
||||
if (typeof card == "string") card = { name: card, isCard: true };
|
||||
var info = get.info(card);
|
||||
|
@ -8246,6 +8329,18 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @overload
|
||||
* @param { string } skill
|
||||
* @param { SkillTrigger | string } [expire]
|
||||
* @param { boolean } [checkConflict]
|
||||
*/
|
||||
/**
|
||||
* @overload
|
||||
* @param { string[] } skill
|
||||
* @param { SkillTrigger } [expire]
|
||||
* @param { boolean } [checkConflict]
|
||||
*/
|
||||
addTempSkill(skill, expire, checkConflict) {
|
||||
if (Array.isArray(skill)) {
|
||||
for (var i = 0; i < skill.length; i++) {
|
||||
|
@ -8416,6 +8511,18 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
return evts;
|
||||
}
|
||||
/**
|
||||
* @overload
|
||||
* @returns { ActionHistory }
|
||||
*/
|
||||
/**
|
||||
* @template { keyof ActionHistory } T
|
||||
* @overload
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { ActionHistory[T] }
|
||||
*/
|
||||
getHistory(key, filter, last) {
|
||||
if (!key) return this.actionHistory[this.actionHistory.length - 1];
|
||||
if (!filter) return this.actionHistory[this.actionHistory.length - 1][key];
|
||||
|
@ -8431,6 +8538,12 @@ export class Player extends HTMLDivElement {
|
|||
return history.filter(filter);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @template { keyof ActionHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
*/
|
||||
checkHistory(key, filter, last) {
|
||||
if (!key || !filter) return;
|
||||
else {
|
||||
|
@ -8446,7 +8559,14 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
}
|
||||
}
|
||||
hasHistory(key, filter, last) {
|
||||
/**
|
||||
* @template { keyof ActionHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasHistory(key, filter = lib.filter.all, last) {
|
||||
const history = this.getHistory(key);
|
||||
if (!filter || typeof filter != "function") filter = lib.filter.all;
|
||||
if (last) {
|
||||
|
@ -8458,6 +8578,14 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
return history.some(filter);
|
||||
}
|
||||
/**
|
||||
* @template { keyof ActionHistory } T
|
||||
* @overload
|
||||
* @param { T } [key]
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { null | ActionHistory[T] | boolean }
|
||||
*/
|
||||
getLastHistory(key, filter, last) {
|
||||
let history = false;
|
||||
for (let i = this.actionHistory.length - 1; i >= 0; i--) {
|
||||
|
@ -8480,6 +8608,12 @@ export class Player extends HTMLDivElement {
|
|||
return history.filter(filter);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @template { keyof ActionHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
*/
|
||||
checkAllHistory(key, filter, last) {
|
||||
if (!key || !filter) return;
|
||||
this.actionHistory.forEach((value) => {
|
||||
|
@ -8495,6 +8629,13 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* @template { keyof ActionHistory } T
|
||||
* @param { T } [key]
|
||||
* @param { (event: GameEventPromise) => boolean } [filter]
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { ActionHistory[T] }
|
||||
*/
|
||||
getAllHistory(key, filter, last) {
|
||||
const history = [];
|
||||
this.actionHistory.forEach((value) => {
|
||||
|
@ -8516,6 +8657,13 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
return history;
|
||||
}
|
||||
/**
|
||||
* @template { keyof ActionHistory } T
|
||||
* @param { T } key
|
||||
* @param { (event: GameEventPromise) => boolean } filter
|
||||
* @param { GameEventPromise } [last]
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasAllHistory(key, filter, last) {
|
||||
return this.actionHistory.some((value) => {
|
||||
let history = value[key];
|
||||
|
@ -9095,6 +9243,12 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param { number | Card[] | Card } [add]
|
||||
* @param { (card?: Card, player?: Player) => boolean } [filter]
|
||||
* @param { boolean } [pure]
|
||||
*/
|
||||
needsToDiscard(add, filter, pure) {
|
||||
/**
|
||||
* add: (逻辑上)同时考虑“获得”的这张/些牌
|
||||
|
@ -9123,9 +9277,23 @@ export class Player extends HTMLDivElement {
|
|||
distanceFrom(target, method) {
|
||||
return get.distance(target, this, method);
|
||||
}
|
||||
/**
|
||||
* @param { string } skill
|
||||
* @param { Parameters<this['getSkills']>[0] } arg2
|
||||
* @param { Parameters<this['getSkills']>[1] } arg3
|
||||
* @param { Parameters<this['getSkills']>[2] } arg4
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasSkill(skill, arg2, arg3, arg4) {
|
||||
return game.expandSkills(this.getSkills(arg2, arg3, arg4)).includes(skill);
|
||||
}
|
||||
/**
|
||||
* @param { string } skill
|
||||
* @param { Parameters<this['getStockSkills']>[0] } arg1
|
||||
* @param { Parameters<this['getStockSkills']>[1] } arg2
|
||||
* @param { Parameters<this['getStockSkills']>[2] } arg3
|
||||
* @returns { boolean }
|
||||
*/
|
||||
hasStockSkill(skill, arg1, arg2, arg3) {
|
||||
return game.expandSkills(this.getStockSkills(arg1, arg2, arg3)).includes(skill);
|
||||
}
|
||||
|
@ -9152,6 +9320,11 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {string} skill
|
||||
* @param {Player} [player]
|
||||
*/
|
||||
hasZhuSkill(skill, player) {
|
||||
if (!this.hasSkill(skill)) return false;
|
||||
if (player) {
|
||||
|
@ -9186,6 +9359,12 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* @param {string} tag
|
||||
* @param {Parameters<this['getSkills']>[0]} hidden
|
||||
* @param {Parameters<SkillAI['skillTagFilter']>[2]} arg
|
||||
* @param {boolean} [globalskill]
|
||||
*/
|
||||
hasSkillTag(tag, hidden, arg, globalskill) {
|
||||
var skills = this.getSkills(hidden);
|
||||
if (globalskill) {
|
||||
|
@ -9280,6 +9459,11 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param {string|boolean} [respond]
|
||||
* @param {boolean} [noauto]
|
||||
*/
|
||||
hasSha(respond, noauto) {
|
||||
if (this.countCards("hs", "sha")) return true;
|
||||
if (this.countCards("hs", "hufu")) return true;
|
||||
|
@ -10847,7 +11031,14 @@ export class Player extends HTMLDivElement {
|
|||
avatar ? 1600 : 1000
|
||||
);
|
||||
}
|
||||
$damagepop(num, nature, font, nobroadcast) {
|
||||
/**
|
||||
*
|
||||
* @param { number | string } num
|
||||
* @param { string } [nature]
|
||||
* @param { boolean } [font]
|
||||
* @param { boolean } [nobroadcast]
|
||||
*/
|
||||
$damagepop(num, nature = "soil", font, nobroadcast) {
|
||||
if (typeof num == "number" || typeof num == "string") {
|
||||
game.addVideo("damagepop", this, [num, nature, font]);
|
||||
if (nobroadcast !== false)
|
||||
|
|
|
@ -439,11 +439,11 @@ export const otherMenu = function (/** @type { boolean | undefined } */ connectM
|
|||
* @param { (value: T) => Promise<boolean> } predicate
|
||||
*/
|
||||
const asyncFilter = async (arr, predicate) => {
|
||||
//将arr每10个分为一个数组,分别使用Promise.all
|
||||
//将arr每20个分为一个数组,分别使用Promise.all
|
||||
/** @type { boolean[] } */
|
||||
const results = [];
|
||||
for (let i = 0; i < arr.length; i += 10) {
|
||||
const pushArr = arr.slice(i, i + 10);
|
||||
for (let i = 0; i < arr.length; i += 20) {
|
||||
const pushArr = arr.slice(i, i + 20);
|
||||
results.push(
|
||||
...await Promise.all(pushArr.map(predicate))
|
||||
);
|
||||
|
@ -453,8 +453,11 @@ export const otherMenu = function (/** @type { boolean | undefined } */ connectM
|
|||
|
||||
const result = await asyncFilter(files.flat(), async v => {
|
||||
return game.promises.readFile(v.path).then(data => {
|
||||
// 有设置就不进行对比直接返回false
|
||||
if (lib.config.asset_notReplaceExistingFiles) return false;
|
||||
return v.size != data.byteLength;
|
||||
}).catch(()=>true)
|
||||
// 报错了就是没有文件
|
||||
}).catch(() => true);
|
||||
}).then(arr => arr.map((v) => v.path));
|
||||
|
||||
console.log("需要更新的文件有:", result);
|
||||
|
@ -463,6 +466,22 @@ export const otherMenu = function (/** @type { boolean | undefined } */ connectM
|
|||
await lib.init.promises.js("game", "asset");
|
||||
if (Array.isArray(window.noname_asset_list)) {
|
||||
game.saveConfig("asset_version", window.noname_asset_list[0]);
|
||||
try {
|
||||
// 动态更新素材版本显示
|
||||
if (
|
||||
li2 instanceof HTMLLIElement &&
|
||||
li2.childNodes[0] &&
|
||||
// nodeType = 3为text
|
||||
li2.childNodes[0].nodeType === 3 &&
|
||||
li2.childNodes[0].textContent.startsWith(
|
||||
"素材版本"
|
||||
)
|
||||
) {
|
||||
li2.childNodes[0].textContent = `素材版本:${window.noname_asset_list[0]}`;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("动态更新素材版本显示失败:", error);
|
||||
}
|
||||
delete window.noname_asset_list;
|
||||
}
|
||||
if (confirm("更新完成,是否重启?")) {
|
||||
|
@ -655,7 +674,9 @@ export const otherMenu = function (/** @type { boolean | undefined } */ connectM
|
|||
if (!this.classList.toggle("on")) {
|
||||
game.saveConfig("asset_toggle_off", true);
|
||||
[
|
||||
/* span2, span2_br, span2_check,*/
|
||||
span7,
|
||||
span7_br,
|
||||
span7_check,
|
||||
span3,
|
||||
span3_br,
|
||||
span3_check,
|
||||
|
@ -674,7 +695,9 @@ export const otherMenu = function (/** @type { boolean | undefined } */ connectM
|
|||
} else {
|
||||
game.saveConfig("asset_toggle_off");
|
||||
[
|
||||
/* span2, span2_br, span2_check,*/
|
||||
span7,
|
||||
span7_br,
|
||||
span7_check,
|
||||
span3,
|
||||
span3_br,
|
||||
span3_check,
|
||||
|
@ -699,6 +722,23 @@ export const otherMenu = function (/** @type { boolean | undefined } */ connectM
|
|||
// li2.lastChild.appendChild(span6_br);
|
||||
// var span2_br = ui.create.node('br');
|
||||
|
||||
var span7 = ui.create.div("", `不替换已有素材`);
|
||||
span7.style.fontSize = "small";
|
||||
span7.style.lineHeight = "16px";
|
||||
li2.lastChild.appendChild(span7);
|
||||
var span7_check = document.createElement("input");
|
||||
span7_check.type = "checkbox";
|
||||
span7_check.style.marginLeft = "5px";
|
||||
if (lib.config.asset_notReplaceExistingFiles) {
|
||||
span7_check.checked = true;
|
||||
}
|
||||
span7_check.onchange = function () {
|
||||
game.saveConfig("asset_notReplaceExistingFiles", this.checked);
|
||||
};
|
||||
li2.lastChild.appendChild(span7_check);
|
||||
var span7_br = ui.create.node("br");
|
||||
li2.lastChild.appendChild(span7_br);
|
||||
|
||||
var span4 = ui.create.div("", `字体素材(${lib.config.asset_font_size || "23.4MB"})`);
|
||||
span4.style.fontSize = "small";
|
||||
span4.style.lineHeight = "16px";
|
||||
|
|
|
@ -141,6 +141,9 @@ export class UI {
|
|||
*/
|
||||
toastQueue = [];
|
||||
|
||||
* @type {HTMLDivElement}
|
||||
*/
|
||||
cardPile;
|
||||
refresh(node) {
|
||||
void window.getComputedStyle(node, null).getPropertyValue("opacity");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue