Merge branch 'PR-Branch' of https://github.com/libccy/noname into dev

This commit is contained in:
nineMangos 2024-04-24 11:19:55 +08:00
commit a12887335e
79 changed files with 15486 additions and 12365 deletions

BIN
audio/effect/coin.mp3 Normal file

Binary file not shown.

BIN
audio/effect/coin_cost.mp3 Normal file

Binary file not shown.

View File

@ -1007,6 +1007,7 @@ game.import("card", function () {
}); });
game.loseAsync({ game.loseAsync({
lose_list: lose_list, lose_list: lose_list,
visible: true,
}).setContent("chooseToCompareLose"); }).setContent("chooseToCompareLose");
} }
if (cards2.length) game.cardsGotoOrdering(cards2); if (cards2.length) game.cardsGotoOrdering(cards2);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,7 @@ game.import("character", function () {
character: { character: {
dc_shen_huatuo: ["male", "shen", 3, ["jingyu", "lvxin", "huandao"], ["qun"]], dc_shen_huatuo: ["male", "shen", 3, ["jingyu", "lvxin", "huandao"], ["qun"]],
shen_xuzhu: ["male", "shen", 5, ["zhengqing", "zhuangpo"], ["wei"]], shen_xuzhu: ["male", "shen", 5, ["zhengqing", "zhuangpo"], ["wei"]],
shen_lusu: ["male", "shen", 3, ["dingzhou", "tamo", "zhimeng"], ["wu"]], shen_lusu: ["male", "shen", 3, ["tamo", "dingzhou", "zhimeng"], ["wu"]],
shen_huatuo: ["male", "shen", 3, ["wuling", "youyi"], ["qun"]], shen_huatuo: ["male", "shen", 3, ["wuling", "youyi"], ["qun"]],
le_shen_jiaxu: ["male", "shen", 4, ["jxlianpo", "jxzhaoluan"], ["qun"]], le_shen_jiaxu: ["male", "shen", 4, ["jxlianpo", "jxzhaoluan"], ["qun"]],
shen_dianwei: ["male", "shen", 4, ["juanjia", "qiexie", "cuijue"], ["wei"]], shen_dianwei: ["male", "shen", 4, ["juanjia", "qiexie", "cuijue"], ["wei"]],
@ -126,7 +126,7 @@ game.import("character", function () {
if (!skill || skill === "jingyu") return false; if (!skill || skill === "jingyu") return false;
let info = get.info(skill); let info = get.info(skill);
while (true) { while (true) {
if (!info || info.charlotte) return false; if (!info || info.charlotte || info.equipSkill) return false;
if (info && !info.sourceSkill) break; if (info && !info.sourceSkill) break;
skill = info.sourceSkill; skill = info.sourceSkill;
info = get.info(skill); info = get.info(skill);
@ -235,13 +235,13 @@ game.import("character", function () {
if (["global", "equip"].includes(event.type)) return false; if (["global", "equip"].includes(event.type)) return false;
const skill = event.sourceSkill || event.skill; const skill = event.sourceSkill || event.skill;
const info = get.info(skill); const info = get.info(skill);
return info && !info.charlotte; return info && !info.charlotte && !info.equipSkill;
}, },
forced: true, forced: true,
onremove: true, onremove: true,
charlotte: true, charlotte: true,
async content(event, trigger, player) { async content(event, trigger, player) {
player.loseHp(player.countMark("lvxin_recover")); player.recover(player.countMark("lvxin_recover"));
player.removeSkill("lvxin_recover"); player.removeSkill("lvxin_recover");
}, },
intro: { intro: {
@ -256,7 +256,7 @@ game.import("character", function () {
if (["global", "equip"].includes(event.type)) return false; if (["global", "equip"].includes(event.type)) return false;
const skill = event.sourceSkill || event.skill; const skill = event.sourceSkill || event.skill;
const info = get.info(skill); const info = get.info(skill);
return info && !info.charlotte; return info && !info.charlotte && !info.equipSkill;
}, },
forced: true, forced: true,
onremove: true, onremove: true,
@ -673,7 +673,7 @@ game.import("character", function () {
return game.hasPlayer((current) => { return game.hasPlayer((current) => {
if (current == player) return false; if (current == player) return false;
const total = current.countCards("ej"); const total = current.countCards("ej");
return total > 0 && num > total; return total > 0 && num >= total;
}); });
}, },
filterCard: true, filterCard: true,
@ -682,7 +682,7 @@ game.import("character", function () {
1, 1,
Math.max( Math.max(
...game.filterPlayer((i) => i != get.player()).map((i) => i.countCards("ej")) ...game.filterPlayer((i) => i != get.player()).map((i) => i.countCards("ej"))
) + 1, ),
]; ];
}, },
check(card) { check(card) {
@ -691,10 +691,10 @@ game.import("character", function () {
filterTarget(card, player, target) { filterTarget(card, player, target) {
const num = target.countCards("ej"); const num = target.countCards("ej");
if (!num) return false; if (!num) return false;
return ui.selected.cards.length == num + 1 && player != target; return ui.selected.cards.length == num && player != target;
}, },
filterOk() { 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", position: "he",
lose: false, lose: false,
@ -715,7 +715,7 @@ game.import("character", function () {
eff = ui.selected.cards eff = ui.selected.cards
.map((card) => get.value(card)) .map((card) => get.value(card))
.reduce((p, c) => p + c, 0); .reduce((p, c) => p + c, 0);
if (player.hasSkill("zhimeng")) eff *= 1 + get.sgnAttitude(player, target) * 0.15; if (player.hasSkill("zhimeng") && (get.mode() == 'identity' || (player.countCards('h') - target.countCards('h') > 2 * ui.selected.cards.length))) eff *= 1 + get.sgnAttitude(player, target) * 0.15;
const es = target.getCards("e"), const es = target.getCards("e"),
js = target.getCards("j"); js = target.getCards("j");
es.forEach((card) => { es.forEach((card) => {
@ -747,6 +747,7 @@ game.import("character", function () {
return ( return (
(event.name != "phase" || game.phaseNumber == 0) && (event.name != "phase" || game.phaseNumber == 0) &&
game.countPlayer((current) => { game.countPlayer((current) => {
if (get.mode() === "doudizhu") return current.getSeatNum() !== 3;
return !current.isZhu2(); return !current.isZhu2();
}) > 1 }) > 1
); );
@ -756,15 +757,13 @@ game.import("character", function () {
derivation: "tamo_faq", derivation: "tamo_faq",
async content(event, trigger, player) { async content(event, trigger, player) {
const toSortPlayers = game.filterPlayer((current) => { const toSortPlayers = game.filterPlayer((current) => {
return ( if (get.mode() === "doudizhu") return current.getSeatNum() !== 3;
!current.isZhu2() || return !current.isZhu2();
get.mode() == "doudizhu" && current.getSeatNum() == 3
);
}); });
toSortPlayers.sortBySeat(game.findPlayer2((current) => current.getSeatNum() == 1, true)); toSortPlayers.sortBySeat(game.findPlayer2((current) => current.getSeatNum() == 1, true));
const next = player.chooseToMove("榻谟:是否分配" + const next = player.chooseToMove("榻谟:是否分配" +
(game.countPlayer() > toSortPlayers.length ? (get.mode() != "doudizhu" ?
"除主公" + (get.mode() == "doudizhu" ? "和三号位外" : "外") : "") + (game.hasPlayer(cur => cur.isZhu2()) ? "除主公外" : "") : "除三号位外") +
"所有角色的座次?" "所有角色的座次?"
); );
next.set("list", [ next.set("list", [
@ -901,7 +900,12 @@ game.import("character", function () {
game.swapSeat(list[0], list[1], false); game.swapSeat(list[0], list[1], false);
} }
}, toSwapList); }, toSwapList);
if (trigger.name === "phase" && !trigger.player.isZhu2() && trigger.player !== toSortPlayers[0] && !trigger._finished) { if (
trigger.name === "phase" &&
!trigger.player.isZhu2() &&
trigger.player !== toSortPlayers[0] &&
!trigger._finished
) {
trigger.finish(); trigger.finish();
trigger._triggered = 5; trigger._triggered = 5;
const evt = toSortPlayers[0].insertPhase(); const evt = toSortPlayers[0].insertPhase();
@ -912,10 +916,7 @@ game.import("character", function () {
} }
//跳过新回合的phaseBefore //跳过新回合的phaseBefore
evt.pushHandler("onPhase", (event, option) => { evt.pushHandler("onPhase", (event, option) => {
if ( if (event.step === 0 && option.state === "begin") {
event.step === 0 &&
option.state === "begin"
) {
event.step = 1; event.step = 1;
} }
}); });
@ -1422,8 +1423,7 @@ game.import("character", function () {
group: "jxlianpo_show", group: "jxlianpo_show",
*content(event, map) { *content(event, map) {
var source = map.trigger.source; var source = map.trigger.source;
source.draw(2); source.chooseDrawRecover(2, true);
source.recover();
}, },
mark: true, mark: true,
intro: { intro: {
@ -10817,7 +10817,7 @@ game.import("character", function () {
le_shen_jiaxu_prefix: "神", le_shen_jiaxu_prefix: "神",
jxlianpo: "炼魄", jxlianpo: "炼魄",
jxlianpo_info: jxlianpo_info:
"锁定技。①若场上最大阵营为:反贼,其他角色的手牌上限-1所有角色使用【杀】的次数上限和攻击范围+1主忠其他角色不能对其以外的角色使用【桃】。其他角色死亡后,若有多个最大阵营,来源摸两张牌并回复1点体力。②一轮游戏开始时你展示一张未加入游戏或已死亡角色的身份牌本轮视为该身份对应阵营的角色数+1。", "锁定技。①若场上最大阵营为:反贼,其他角色的手牌上限-1所有角色使用【杀】的次数上限和攻击范围+1主忠其他角色不能对其以外的角色使用【桃】。若有多个最大阵营,其他角色死亡后,来源摸两张牌或回复1点体力。②一轮游戏开始时你展示一张未加入游戏或已死亡角色的身份牌本轮视为该身份对应阵营的角色数+1。",
jxzhaoluan: "兆乱", jxzhaoluan: "兆乱",
jxzhaoluan_info: jxzhaoluan_info:
"限定技。一名角色死亡前若其此次进入过濒死状态你可以取消之令其加3点体力上限并失去所有非锁定技回复体力至3点摸四张牌。然后你获得如下效果出牌阶段你可以令一名成为过你〖兆乱〗目标的角色减1点体力上限然后对一名此阶段未以此法选择过的角色造成1点伤害。", "限定技。一名角色死亡前若其此次进入过濒死状态你可以取消之令其加3点体力上限并失去所有非锁定技回复体力至3点摸四张牌。然后你获得如下效果出牌阶段你可以令一名成为过你〖兆乱〗目标的角色减1点体力上限然后对一名此阶段未以此法选择过的角色造成1点伤害。",
@ -10841,18 +10841,18 @@ game.import("character", function () {
shen_lusu_prefix: "神", shen_lusu_prefix: "神",
dingzhou: "定州", dingzhou: "定州",
dingzhou_info: dingzhou_info:
"出牌阶段限一次。你可以将X张牌交给一名场上有牌的角色然后你获得其场上的所有牌X为其场上的牌数+1)。", "出牌阶段限一次。你可以将X张牌交给一名场上有牌的角色然后你获得其场上的所有牌X为其场上的牌数)。",
tamo: "榻谟", tamo: "榻谟",
tamo_info: tamo_info: "游戏开始时,你可以重新分配除主公外所有角色的座次。",
"游戏开始时,你可以重新分配除主公外所有角色的座次。", tamo_info_doudizhu: "游戏开始时,你可以重新分配除三号位角色外所有角色的座次。",
tamo_info_doudizhu:
"游戏开始时,你可以重新分配除主公和三号位外所有角色的座次。",
tamo_faq: "FAQ", tamo_faq: "FAQ",
tamo_faq_info: tamo_faq_info:
"<br><li>Q在一号位不为主公的情况下〖榻谟〗如何结算</li><li>A该角色可以正常进行座次交换。若受此技能影响导致一号位角色发生了变化则以排列后的一号位角色为起始角色开始本局游戏。</li>", "<br><li>Q在一号位不为主公的情况下〖榻谟〗如何结算</li><li>A该角色可以正常进行座次交换。若受此技能影响导致一号位角色发生了变化则以排列后的一号位角色为起始角色开始本局游戏。</li>",
zhimeng: "智盟", zhimeng: "智盟",
zhimeng_info_identity: '回合结束后,你可以选择一名其他角色。若如此做,你与其将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。', zhimeng_info_identity:
zhimeng_info: '回合结束后你可以选择一名手牌数不大于Y的其他角色Y为你的手牌数+1。若如此做你与其将各自所有手牌置于处理区然后你随机获得这些牌中的一半向上取整其获得剩余的牌。', "回合结束后,你可以选择一名其他角色。若如此做,你与其将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。",
zhimeng_info:
"回合结束后你可以选择一名手牌数不大于Y的其他角色Y为你的手牌数+1。若如此做你与其将各自所有手牌置于处理区然后你随机获得这些牌中的一半向上取整其获得剩余的牌。",
shen_xuzhu: "神许褚", shen_xuzhu: "神许褚",
shen_xuzhu_prefix: "神", shen_xuzhu_prefix: "神",
zhengqing: "争擎", zhengqing: "争擎",

View File

@ -1063,39 +1063,30 @@ game.import("character", function () {
filter(event, player) { filter(event, player) {
if (!event.isFirstTarget) return false; if (!event.isFirstTarget) return false;
if (get.type(event.card) !== "trick") return false; if (get.type(event.card) !== "trick") return false;
const evt = event.getParent(); return true;
const evts = game.getGlobalHistory("useCard", null, evt).slice().remove(evt);
return event.targets.some((target) => {
return evts.some((evt) => evt.targets.includes(target));
});
}, },
direct: true, direct: true,
async content(event, trigger, player) { async content(event, trigger, player) {
const evt = trigger.getParent();
const evts = game.getGlobalHistory("useCard", null, evt).slice().remove(evt);
const chooseableTargets = trigger.targets.filter((target) => {
return evts.some((evt) => evt.targets.includes(target));
});
const result = await player const result = await player
.chooseTarget() .chooseTarget()
.set("prompt", get.prompt("dcyingshi")) .set("prompt", get.prompt("dcyingshi"))
.set( .set(
"prompt2", "prompt2",
`一名可选角色选择本回合未被选择过的一项:⒈令你于此牌结算结束后视为对其使用一张${get.translation( `其中一名角色选择本回合未被选择过的一项:⒈令你于此牌结算结束后视为对其使用一张${get.translation(
trigger.card.name trigger.card.name
)}⒉弃置${get.cnNumber(player.countCards("e"))}张牌此牌对其无效` )}⒉弃置${get.cnNumber(player.countCards("e"))}张牌此牌对其无效`
) )
.set("filterTarget", (card, player, target) => { .set("filterTarget", (card, player, target) => {
return get.event("targets").includes(target); return get.event("targets").includes(target);
}) })
.set("targets", chooseableTargets) .set("targets", trigger.targets)
.set( .set(
"toFriends", "toFriends",
(() => { (() => {
const isPositive = chooseableTargets.some((current) => { const isPositive = trigger.targets.some((current) => {
return get.effect(current, trigger.card, trigger.player, player) > 0; return get.effect(current, trigger.card, trigger.player, player) > 0;
}), }),
isNegative = chooseableTargets.some((current) => { isNegative = trigger.targets.some((current) => {
return get.effect(current, trigger.card, trigger.player, player) < -5; return get.effect(current, trigger.card, trigger.player, player) < -5;
}); });
if ( if (
@ -1536,38 +1527,31 @@ game.import("character", function () {
return evt && evt.hs && evt.hs.length && current.countCards("h") == 0; return evt && evt.hs && evt.hs.length && current.countCards("h") == 0;
}); });
}, },
direct: true, async cost(event, trigger, player) {
async content(event, trigger, player) {
const targetx = _status.currentPhase; const targetx = _status.currentPhase;
const targets = game const targets = game
.filterPlayer((current) => { .filterPlayer((current) => {
if (targetx && current == targetx) return false; if (targetx && current == targetx || !current.isIn()) return false;
let evt = trigger.getl(current); let evt = trigger.getl(current);
return evt && evt.hs && evt.hs.length && current.countCards("h") == 0; return evt && evt.hs && evt.hs.length && current.countCards("h") == 0;
}) })
.sortBySeat(targetx || player); .sortBySeat(targetx || player);
for (const target of targets) { event.result = await player
if (!target.isIn()) continue; .chooseTarget("是否对" + (targets.length > 1 ? "其中一名角色" : get.translation(targets[0])) + "发动【守成】?",
const { "令其摸两张牌",
result: { bool }, (card, player, target) => {
} = await player return get.event("targets").includes(target);
.chooseBool(get.prompt2("dcshoucheng", target)) }
.set("choice", get.attitude(player, target) > 0); )
if (bool) { .set("targets", targets)
player.logSkill("dcshoucheng", target); .set("ai", target => get.attitude(get.event("player"), target))
if (target != player) player.addExpose(0.2); .forResult();
},
usable: 1,
async content(event, trigger, player) {
const target = event.targets[0];
if (get.mode() != "identity" || player.identity != "nei") player.addExpose(0.2);
target.draw(2); target.draw(2);
}
}
},
ai: {
threaten(player, target) {
return Math.sqrt(
game.countPlayer((i) => {
return get.attitude(target, i) > 0;
})
);
},
}, },
subSkill: { subSkill: {
ai: { ai: {
@ -9905,7 +9889,7 @@ game.import("character", function () {
var delta = player.countCards("h") - player.hp; var delta = player.countCards("h") - player.hp;
if (delta > 0) player.chooseToDiscard("h", 4, true); if (delta > 0) player.chooseToDiscard("h", 4, true);
else if (delta == 0) { else if (delta == 0) {
player.chooseToDiscard("h", true); player.chooseToDiscard("he", true);
player.recover(); player.recover();
} else { } else {
player.damage("fire", "nosource"); player.damage("fire", "nosource");
@ -12978,14 +12962,13 @@ game.import("character", function () {
}, },
usable: 1, usable: 1,
async cost(event, trigger, player) { async cost(event, trigger, player) {
"step 0";
var num = player.getFriends().length; var num = player.getFriends().length;
if ( if (
!game.hasPlayer(function (current) { !game.hasPlayer(function (current) {
return current != player && current.getFriends().length > num; return current != player && current.getFriends().length > num;
}) })
) { ) {
player event.result = await player
.chooseToDiscard( .chooseToDiscard(
"h", "h",
get.prompt("rewangzu"), get.prompt("rewangzu"),
@ -12994,12 +12977,11 @@ game.import("character", function () {
) )
.set("ai", function (card) { .set("ai", function (card) {
return 7 - get.value(card); return 7 - get.value(card);
}); })
.forResult();
} else { } else {
player.chooseBool(get.prompt("rewangzu"), "随机弃置一张牌并令伤害-1"); event.result = await player.chooseBool(get.prompt("rewangzu"), "随机弃置一张牌并令伤害-1").forResult();
} }
"step 1";
event.result = result;
}, },
async content(event, trigger, player) { async content(event, trigger, player) {
trigger.num--; trigger.num--;
@ -14163,18 +14145,18 @@ game.import("character", function () {
check: function (event, player) { check: function (event, player) {
var target = event.player; var target = event.player;
var att = get.attitude(player, target); 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; if (num2 <= 0) return att <= 0;
var num = target.countCards("h", function (card) { var num = target.countCards("h", function (card) {
return target.hasValueTarget(card, null, true); return target.hasValueTarget(card, null, true);
}); });
if (!num) return att > 0; if (!num) return att > 0;
return num > num2; return (num - num2) * att < 0;
}, },
preHidden: true, preHidden: true,
content: function () { content: function () {
"step 0"; "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); if (num > 0) trigger.player.draw(num);
"step 1"; "step 1";
trigger.player.addTempSkill("xibing2"); trigger.player.addTempSkill("xibing2");
@ -15731,9 +15713,9 @@ game.import("character", function () {
"①当你受到伤害后你可以摸一张牌或和一名势力相同的其他角色各摸一张牌②每回合限一次当你造成伤害后你可以对一名与你势力不同的角色造成1点伤害。", "①当你受到伤害后你可以摸一张牌或和一名势力相同的其他角色各摸一张牌②每回合限一次当你造成伤害后你可以对一名与你势力不同的角色造成1点伤害。",
xibing: "息兵", xibing: "息兵",
xibing_info: xibing_info:
"当一名其他角色在其出牌阶段内使用黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至当前体力值(至多摸五张)且本回合不能再使用手牌。", "当一名其他角色在其出牌阶段内使用黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至当前体力值(至多摸五张)且本回合不能再使用手牌。",
xibing_info_guozhan: xibing_info_guozhan:
"当一名其他角色在其出牌阶段内使用第一张黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至当前体力(至多摸五张)值且本回合不能再使用手牌。若你与其均明置了所有武将牌,则你可以暗置你与其各一张武将牌且本回合不能再明置此武将牌。", "当一名其他角色在其出牌阶段内使用第一张黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至当前体力(至多摸五张)值且本回合不能再使用手牌。若你与其均明置了所有武将牌,则你可以暗置你与其各一张武将牌且本回合不能再明置此武将牌。",
luyusheng: "陆郁生", luyusheng: "陆郁生",
zhente: "贞特", zhente: "贞特",
zhente2: "贞特", zhente2: "贞特",
@ -15868,7 +15850,7 @@ game.import("character", function () {
lianzhou_info: "锁定技。准备阶段,你横置你的武将牌。然后你可横置任意名体力值等于你的角色。", lianzhou_info: "锁定技。准备阶段,你横置你的武将牌。然后你可横置任意名体力值等于你的角色。",
jinglan: "惊澜", jinglan: "惊澜",
jinglan_info: jinglan_info:
"锁定技。当你造成伤害后,若你的手牌数:大于体力值,你弃置四张手牌;等于体力值,你弃置一张牌并回复1点体力小于体力值你受到1点无来源火焰伤害并摸五张牌。", "锁定技。当你造成伤害后,若你的手牌数:大于体力值,你弃置四张手牌;等于体力值,你弃置一张牌并回复1点体力小于体力值你受到1点无来源火焰伤害并摸五张牌。",
dc_yanghu: "羊祜", dc_yanghu: "羊祜",
dcdeshao: "德劭", dcdeshao: "德劭",
dcdeshao_info: dcdeshao_info:
@ -16244,7 +16226,7 @@ game.import("character", function () {
dcshengxi: "生息", dcshengxi: "生息",
dcshengxi_info: "弃牌阶段结束时,若你本回合未造成过伤害,你可以摸两张牌。", dcshengxi_info: "弃牌阶段结束时,若你本回合未造成过伤害,你可以摸两张牌。",
dcshoucheng: "守成", dcshoucheng: "守成",
dcshoucheng_info: "一名角色于其回合外失去最后的手牌后,你可令其摸两张牌。", dcshoucheng_info: "每回合限一次,当一名角色于其回合外失去手牌后,若其没有手牌,你可令其摸两张牌。",
dc_liuli: "刘理", dc_liuli: "刘理",
dcfuli: "抚黎", dcfuli: "抚黎",
dcfuli_info: dcfuli_info:
@ -16264,7 +16246,7 @@ game.import("character", function () {
"其他角色的出牌阶段限一次。其可以交给你一张牌,若此牌为装备牌,你可以使用之,然后其本回合攻击范围+XX为你装备区里的牌数。若你以此法替换了装备你与其各摸两张牌。", "其他角色的出牌阶段限一次。其可以交给你一张牌,若此牌为装备牌,你可以使用之,然后其本回合攻击范围+XX为你装备区里的牌数。若你以此法替换了装备你与其各摸两张牌。",
dcyingshi: "应时", dcyingshi: "应时",
dcyingshi_info: dcyingshi_info:
"每回合每项各限一次。当你使用普通锦囊牌指定第一个目标后,若有目标不为本回合第一次成为牌的目标,则你可令其选择一项⒈令你于此牌结算结束后视为对其使用一张与此牌牌名相同的牌⒉弃置X张牌此牌对其无效X为你装备区里的牌数。", "每回合每项各限一次。当你使用普通锦囊牌指定目标后,你可令其中一个目标选择一项⒈令你于此牌结算结束后视为对其使用一张与此牌牌名相同的牌⒉弃置X张牌此牌对其无效X为你装备区里的牌数。",
dc_wangling: "王淩", dc_wangling: "王淩",
dcjichou: "集筹", dcjichou: "集筹",
dcjichou_info: dcjichou_info:

105
character/key/card.js Normal file
View File

@ -0,0 +1,105 @@
import { lib, game, ui, get, ai, _status } from "../../noname.js";
const cards = {
kano_paibingbuzhen: {
fullskin: true,
type: "trick",
enable: true,
filterTarget: true,
selectTarget: [1, 3],
derivation: "key_kano",
content() {
"step 0";
target.draw();
"step 1";
var hs = target.getCards("he");
if (!hs.length) event.finish();
else if (hs.length == 1) event._result = { bool: true, cards: hs };
else target.chooseCard("he", true, "选择一张牌置入仁库");
"step 2";
if (result.bool) {
var card = result.cards[0];
target.$throw(card, 1000);
target.lose(card, "toRenku");
}
},
contentAfter() {
if (
player.isIn() &&
_status.renku.length &&
(function () {
var cards = _status.renku;
if (cards.length == 1) return true;
var color = get.color(cards[0], false),
type = get.type(cards[0], false);
for (var i = 1; i < cards.length; i++) {
if (color && get.color(cards[i], false) != color) color = false;
if (type && get.type(cards[i], false) != type) type = false;
if (!color && !type) return false;
}
return true;
})()
)
player.draw();
},
ai: {
order: 1,
result: {
player(player, target) {
if (player.hasSkill("kano_poyu")) return 2;
return 0;
},
target: 0.1,
},
},
},
kamome_suitcase: {
fullskin: true,
type: "equip",
subtype: "equip5",
derivation: "key_kamome",
skills: ["kamome_suitcase"],
ai: {
equipValue(card) {
return 7;
},
basic: {
equipValue: 7,
},
},
},
miki_hydrogladiator: {
fullskin: true,
type: "equip",
subtype: "equip1",
derivation: "key_miki",
skills: ["miki_hydrogladiator_skill"],
distance: {
attackFrom: -5,
},
ai: {
equipValue(card) {
return 7;
},
basic: {
equipValue: 7,
},
},
},
miki_binoculars: {
fullskin: true,
type: "equip",
subtype: "equip5",
derivation: "key_miki",
skills: ["miki_binoculars"],
ai: {
equipValue(card) {
return 7;
},
basic: {
equipValue: 7,
},
},
},
}
export default cards;

View File

@ -0,0 +1,86 @@
const characters = {
sp_key_yuri: ["female", "qun", 4, ["mubing", "ziqu", "diaoling"], ["border:key"]],
key_lucia: ["female", "key", "2/3", ["lucia_duqu", "lucia_zhenren"]],
key_kyousuke: ["male", "key", 4, ["nk_shekong", "key_huanjie"]],
key_yuri: ["female", "key", 3, ["yuri_xingdong", "key_huanjie", "yuri_wangxi"], ["zhu"]],
key_haruko: ["female", "key", 4, ["haruko_haofang", "haruko_zhuishi"]],
key_umi: ["female", "key", 3, ["umi_chaofan", "umi_lunhui", "umi_qihuan"]],
key_umi2: ["female", "key", 3, [], ["unseen"]],
key_rei: ["male", "key", 4, ["xiandeng", "shulv", "xisheng"]],
key_komari: ["female", "key", 3, ["komari_tiankou", "komari_xueshang"]],
key_yukine: ["female", "key", 3, ["yukine_wenzhou"]],
key_yusa: ["female", "key", 3, ["yusa_yanyi", "yusa_misa", "dualside"], ["dualside:key_misa"]],
key_misa: ["female", "key", 3, ["misa_yehuo", "misa_yusa", "dualside"], ["unseen"]],
key_masato: ["male", "key", "4/8", ["masato_baoquan"]],
key_iwasawa: ["female", "key", 3, ["iwasawa_yinhang", "iwasawa_mysong"]],
key_kengo: ["male", "key", 4, ["kengo_weishang", "kengo_guidui"]],
key_yoshino: ["male", "key", 4, ["yoshino_jueyi"]],
key_yui: ["female", "key", 3, ["yui_jiang", "yui_lieyin", "yui_takaramono"]],
key_tsumugi: ["female", "key", 3, ["tsumugi_mugyu", "tsumugi_huilang"]],
key_saya: ["female", "key", 3, ["saya_shouji", "saya_powei"]],
key_harukakanata: ["female", "key", 3, ["haruka_shuangche"]],
key_inari: ["female", "key", 2, ["inari_baiwei", "inari_huhun"]],
key_shiina: ["female", "key", 3, ["shiina_qingshen", "shiina_feiyan"]],
key_sunohara: [
"double",
"key",
"3/3/2",
["sunohara_chengshuang", "sunohara_tiaoyin", "sunohara_jianren"],
],
key_rin: ["female", "key", 3, ["rin_baoqiu"]],
key_sasami: ["female", "key", 3, ["sasami_miaobian"]],
key_akane: ["female", "key", 3, ["akane_jugu", "akane_quanqing", "akane_yifu"], ["zhu"]],
key_doruji: ["female", "key", 16, ["doruji_feiqu"]],
key_yuiko: ["female", "key", 3, ["yuiko_fenglun", "yuiko_dilve"]],
key_riki: ["double", "key", 3, ["riki_spwenji", "riki_nvzhuang", "riki_mengzhong"]],
key_hisako: ["female", "key", 3, ["hisako_yinbao", "hisako_zhuanyun"]],
key_hinata: ["male", "key", 4, ["hinata_qiulve", "hinata_ehou"]],
key_noda: ["male", "key", 4, ["noda_fengcheng", "noda_xunxin"]],
key_tomoya: ["male", "key", 4, ["tomoya_shangxian", "tomoya_wangjin"]],
key_nagisa: ["female", "key", 3, ["nagisa_tiandu", "nagisa_fuxin"]],
key_ayato: ["male", "key", 3, ["ayato_jianshen", "ayato_zonghuan"]],
key_ao: ["female", "key", 3, ["ao_xishi", "ao_kuihun", "ao_shixin"]],
key_yuzuru: ["male", "key", 5, ["yuzuru_wuxin", "yuzuru_deyi"]],
sp_key_kanade: ["female", "key", 3, ["kanade_mapo", "kanade_benzhan"]],
key_mio: ["female", "key", 3, ["mio_tuifu", "mio_tishen"]],
key_midori: ["female", "key", 3, ["midori_nonghuan", "midori_tishen"]],
key_kyoko: ["female", "key", 3, ["kyoko_juwu", "kyoko_zhengyi"]],
key_shizuru: ["female", "key", 3, ["shizuru_nianli", "shizuru_benzhan"]],
key_shiorimiyuki: ["female", "key", 3, ["shiorimiyuki_banyin", "shiorimiyuki_tingxian"]],
key_miki: ["female", "key", 3, ["miki_shenqiang", "miki_huanmeng", "miki_zhiluo"]],
key_shiori: ["female", "key", "2/3", ["shiori_huijuan"]],
key_kaori: ["female", "key", "3/4", ["kaori_siyuan"]],
key_akiko: ["female", "key", 3, ["akiko_dongcha"]],
key_abyusa: ["female", "key", 3, ["abyusa_jueqing", "abyusa_dunying"]],
key_godan: ["male", "key", 6, ["godan_yuanyi", "godan_feiqu", "godan_xiaoyuan"]],
key_yuu: ["male", "key", 3, ["yuu_lveduo"]],
key_ryoichi: ["male", "key", 4, ["ryoichi_baoyi", "ryoichi_tuipi"]],
key_kotori: ["female", "key", 3, ["kotori_yumo", "kotori_huazhan"]],
key_jojiro: ["male", "key", 4, ["jojiro_shensu", "jojiro_shunying"]],
key_shiroha: ["female", "key", 3, ["shiroha_yuzhao", "shiroha_guying", "shiroha_jiezhao"]],
key_shizuku: ["female", "key", 3, ["shizuku_sizhi", "shizuku_biyi", "shizuku_sanhua"]],
key_hiroto: ["male", "key", 3, ["hiroto_huyu", "hiroto_tuolao"]],
key_sakuya: ["male", "key", 3, ["youlong", "luanfeng", "sakuya_junbu"]],
key_youta: ["male", "key", 4, []],
key_rumi: ["female", "key", "3/4", ["rumi_shuwu"]],
key_chihaya: ["female", "key", 3, ["chihaya_liewu", "chihaya_youfeng"]],
key_yukito: ["male", "key", 4, ["yukito_kongwu", "yukito_yaxiang"]],
key_crow: ["male", "key", 4, [], ["unseen"]],
key_asara: ["female", "key", 3, ["asara_shelu", "asara_yingwei"]],
key_kotomi: ["female", "key", 3, ["kotomi_qinji", "kotomi_chuanxiang"]],
key_mia: ["female", "key", 3, ["mia_shihui", "mia_qianmeng"]],
key_kano: ["female", "key", 3, ["kano_liezhen", "kano_poyu"]],
db_key_liyingxia: [
"female",
"shu",
3,
["liyingxia_sanli", "liyingxia_zhenjun", "liyingxia_wumai"],
["doublegroup:shu:key"],
],
key_erika: ["female", "key", "3/3/2", ["erika_shisong", "erika_yousheng"]],
key_satomi: ["female", "key", 3, ["satomi_luodao", "satomi_daohai"]],
key_iriya: ["female", "key", 3, ["iriya_yinji", "iriya_haozhi"]],
key_fuuko: ["female", "key", 3, ["fuuko_xingdiao", "fuuko_chuanyuan"]],
};
export default characters;

102
character/key/index.js Normal file
View File

@ -0,0 +1,102 @@
import { lib, game, ui, get, ai, _status } from "../../noname.js";
import characters from "./character.js";
import cards from "./card.js";
import pinyins from "./pinyin.js";
import skills from "./skill.js";
import translates from "./translate.js";
game.import("character", function () {
return {
name: "key/index",
character: { ...characters },
characterFilter: {
key_jojiro(mode) {
return mode == "chess" || mode == "tafang";
},
key_yuu(mode) {
return (
mode == "identity" ||
mode == "doudizhu" ||
mode == "single" ||
(mode == "versus" && _status.mode != "standard" && _status.mode != "three")
);
},
key_tomoya(mode) {
return mode != "chess" && mode != "tafang" && mode != "stone";
},
key_sunohara(mode) {
return mode != "guozhan";
},
},
characterTitle: {
key_satomi: "#rHeaven Burns Red",
key_erika: "#rHeaven Burns Red",
db_key_liyingxia: "#rHeaven Burns Red",
key_kano: "#bAIR",
key_mia: "#bLoopers",
key_kotomi: "#gClannad<br>技能设计:落英逐紫裙",
key_asara: "#bRewrite",
key_yukito: "#bAIR",
key_chihaya: "#bRewrite",
key_rumi: "#rONE ~輝く季節へ~",
key_youta: "#b神様になった日",
key_sakuya: "#bRewrite",
key_hiroto: "#b神様になった日",
key_shizuku: "#bSummer Pockets",
key_shiroha: "#bSummer Pockets",
key_jojiro: "#bCharlotte<br>战棋专属角色",
key_kotori: "#bRewrite",
key_ryoichi: "#bSummer Pockets",
key_yuu: "#bCharlotte",
key_godan: "#rAngel Beats!",
key_abyusa: "#rAngel Beats!",
key_akiko: "#bKanon",
key_kaori: "#bKanon",
key_shiori: "#bKanon",
key_miki: "#bSummer Pockets",
key_shiorimiyuki: "#rAngel Beats!",
key_shizuru: "#bRewrite",
key_kyoko: "#bSummer Pockets",
sp_key_kanade: "#rAngel Beats!",
key_yuzuru: "#rAngel Beats!",
key_tsumugi: "#bSummer Pockets",
key_ayato: "#rAngel Beats!",
key_nagisa: "#gClannad",
key_tomoya: "#gClannad",
key_noda: "#rAngel Beats!",
key_hinata: "#rAngel Beats!",
key_hisako: "#rAngel Beats!",
key_doruji: "#bLittle Busters!",
key_riki: "#bLittle Busters!",
key_yuiko: "#bLittle Busters!",
key_akane: "#bRewrite",
key_sasami: "#bLittle Busters!",
key_rin: "#bLittle Busters!",
key_shiina: "#rAngel Beats!",
key_inari: "#bSummer Pockets",
key_saya: "#bLittle Busters!",
key_harukakanata: "#bLittle Busters!",
key_yui: "#rAngel Beats!",
key_yoshino: "#bRewrite",
key_kengo: "#bLittle Busters!",
key_iwasawa: "#rAngel Beats!",
key_masato: "#bLittle Busters!",
key_yusa: "#bCharlotte",
key_misa: "#rCharlotte",
key_yukine: "#gClannad",
key_komari: "#bLittle Busters!",
key_umi: "#bSummer Pockets",
key_rei: "#gHarmonia",
key_lucia: "#bRewrite",
key_kyousuke: "#bLittle Busters!",
key_yuri: "#rAngel Beats!",
key_haruko: "#bAIR",
sp_key_yuri: "#bAngel Beats!",
key_fuuko: "#gClannad",
},
card: { ...cards },
skill: { ...skills },
translate: { ...translates },
pinyins: { ...pinyins },
};
});

91
character/key/pinyin.js Normal file
View File

@ -0,0 +1,91 @@
const pinyins = {
加藤うみ: ["Kato", "Umi"],
仲村由理: ["Nakamura", "Yuri"],
此花露西娅: ["Konohana", "Lucia"],
枣恭介: ["Natsume", "Kyousuke"],
神尾晴子: ["Kamio", "Haruko"],
神北小毬: ["Kamikita", "Komari"],
宫泽有纪宁: ["Miyazawa", "Yukine"],
西森柚咲: ["Nishimori", "Yusa"],
黑羽美砂: ["Kurobane", "Misa"],
井之原真人: ["Inohara", "Masato"],
岩泽雅美: ["Iwasawa", "Masami"],
宫泽谦吾: ["Miyazawa", "Kengo"],
吉野晴彦: ["Yoshino", "Haruhiko"],
由依: ["Yui"],
紬文德斯: ["Tsumugi", "Wenders"],
朱鹭户沙耶: ["Tokido", "Saya"],
"三枝叶留佳&二木佳奈多": ["Saigusa", "Haruka", "Futaki", "Kanata"],
三枝二木: ["Saigusa", "Haruka", "Futaki", "Kanata"],
稻荷: ["Inari"],
椎名: ["Shiina"],
"春原阳平&春原芽衣": ["Sunohara", "Youhei", "Sunohara", "Mei"],
阳平芽衣: ["Sunohara", "Youhei", "Sunohara", "Mei"],
枣铃: ["Natsume", "Rin"],
笹濑川佐佐美: ["Sasasegawa", "Sasami"],
千里朱音: ["Senri", "Akane"],
多鲁基: ["Dorj"],
来谷唯湖: ["Kurugaya", "Yuiko"],
直枝理树: ["Naoe", "Riki"],
渕田久子: ["Fuchita", "Hisako"],
日向秀树: ["Hinata", "Hideki"],
野田: ["Noda"],
冈崎朋也: ["Okazaki", "Tomoya"],
古河渚: ["Furukawa", "Nagisa"],
直井文人: ["Naoi", "Ayato"],
空门苍: ["Sorakado", "Ao"],
音无结弦: ["Otonashi", "Yuzuru"],
立华奏: ["Tachibana", "Kanade"],
西园美鱼: ["Nishizono", "Mio"],
西园美鸟: ["Nishizono", "Midori"],
岬镜子: ["Misaki", "Kyoko"],
中津静流: ["Nakatsu", "Shizuru"],
"关根诗织&入江美雪": ["Sekine", "Shiori", "Irie", "Miyuki"],
关根入江: ["Sekine", "Shiori", "Irie", "Miyuki"],
野村美希: ["Nomura", "Miki"],
美坂栞: ["Misaka", "Shiori"],
美坂香里: ["Misaka", "Kaori"],
水濑秋子: ["Minase", "Akiko"],
游佐: ["Yusa"],
松下护騨: ["Matsushita", "Godan"],
乙坂有宇: ["Otosaka", "Yuu"],
三谷良一: ["Mitani", "Ryoichi"],
神户小鸟: ["Kanbe", "Kotori"],
高城丈士朗: ["Takajyo", "Jyojirou"],
鸣濑白羽: ["Naruse", "Shiroha"],
水织静久: ["Mizuori", "Shizuku"],
铃木央人: ["Suzuki", "Hiroto"],
凤咲夜: ["Ootori", "Sakuya"],
成神阳太: ["Narukami", "Youta"],
七濑留美: ["Nanase", "Rumi"],
凤千早: ["Ootori", "Chihaya"],
国崎往人: ["Kunisaki", "Yukito"],
井上晶: ["Inoue", "Asara"],
一之濑琴美: ["Ichinose", "Kotomi"],
藤川米娅: ["Fujikawa", "Mia"],
雾岛佳乃: ["Kirishima", "Kano"],
苍井绘梨花: ["Aoi", "Erika"],
藏里见: ["Kura", "Satomi"],
"喵呜·喵呼": ["Myau", "Mya-fu"],
喵呜喵呼: ["Myau", "Mya-fu"],
伊吹风子: ["Ibuki", "Fuuko"],
久岛鸥: ["Kushima", "Kamome"],
库特莉亚芙卡: ["Noumi", "Kudryavka"],
神尾观铃: ["Kamio", "Misuzu"],
友利奈绪: ["Tomori", "Nao"],
天王寺瑚太朗: ["Tennouji", "Kotarou"],
藤林杏: ["Fujibayashi", "Kyou"],
伊座并杏子: ["Izanami", "Kyouko"],
加纳天善: ["Kano", "Tenzen"],
冰室忧希: ["Himuro", "Yuuki"],
露娜Q: ["Lunar", "Q"],
远野小满: ["Toono", "Michiru"],
远野美凪: ["Toono", "Minagi"],
樱庭星罗: ["Sakuraba", "Seira"],
坂上智代: ["Sakagami", "Tomoyo"],
冈崎汐: ["Okazaki", "Ushio"],
神山识: ["Kamiyama", "Shiki"],
佐藤雏: ["Satou", "Hina"],
: ["Kagari"],
}
export default pinyins;

8951
character/key/skill.js Normal file

File diff suppressed because it is too large Load Diff

599
character/key/translate.js Normal file
View File

@ -0,0 +1,599 @@
const translates = {
sp_key_yuri: "SP仲村由理",
sp_key_yuri_prefix: "SP",
key_lucia: "此花露西娅",
key_kyousuke: "枣恭介",
key_yuri: "仲村由理",
key_haruko: "神尾晴子",
key_umi: "加藤うみ",
key_umi2: "鹰原羽未",
key_rei: "零",
key_komari: "神北小毬",
key_yukine: "宫泽有纪宁",
key_yusa: "西森柚咲",
key_misa: "黑羽美砂",
key_masato: "井之原真人",
key_iwasawa: "岩泽雅美",
key_kengo: "宫泽谦吾",
key_yoshino: "吉野晴彦",
key_yui: "由依",
key_tsumugi: "紬文德斯",
key_saya: "朱鹭户沙耶",
key_harukakanata: "三枝叶留佳&二木佳奈多",
key_harukakanata_ab: "三枝二木",
key_inari: "稻荷",
key_shiina: "椎名",
key_sunohara: "春原阳平&春原芽衣",
key_sunohara_ab: "阳平芽衣",
//该武将国战模式下不可用
key_rin: "枣铃",
key_sasami: "笹濑川佐佐美",
key_akane: "千里朱音",
key_doruji: "多鲁基",
key_yuiko: "来谷唯湖",
key_riki: "直枝理树" /*+'子'*/,
key_hisako: "渕田久子",
key_hinata: "日向秀树",
key_noda: "野田",
key_tomoya: "冈崎朋也",
key_nagisa: "古河渚",
key_ayato: "直井文人",
key_ao: "空门苍",
key_yuzuru: "音无结弦",
sp_key_kanade: "SP立华奏",
sp_key_kanade_prefix: "SP",
key_mio: "西园美鱼",
key_midori: "西园美鸟",
key_kyoko: "岬镜子",
key_shizuru: "中津静流",
key_shiorimiyuki: "关根诗织&入江美雪",
key_shiorimiyuki_ab: "关根入江",
key_miki: "野村美希",
key_shiori: "美坂栞",
key_kaori: "美坂香里",
key_akiko: "水濑秋子",
key_abyusa: "游佐",
key_godan: "松下护騨",
key_yuu: "乙坂有宇",
key_ryoichi: "三谷良一",
key_kotori: "神户小鸟",
key_jojiro: "高城丈士朗",
key_shiroha: "鸣濑白羽",
key_shizuku: "水织静久",
key_hiroto: "铃木央人",
key_sakuya: "凤咲夜",
key_youta: "成神阳太",
key_rumi: "七濑留美",
key_chihaya: "凤千早",
key_yukito: "国崎往人",
key_crow: "小空",
key_asara: "井上晶",
key_kotomi: "一之濑琴美",
key_mia: "藤川米娅",
key_kano: "雾岛佳乃",
db_key_liyingxia: "李映夏",
key_erika: "苍井绘梨花",
key_satomi: "藏里见",
key_iriya: "喵呜·喵呼",
key_iriya_ab: "喵呜喵呼",
key_fuuko: "伊吹风子",
lucia_duqu: "毒躯",
lucia_duqu_info:
"锁定技,①当你对其他角色造成伤害或受到其他角色的伤害时,你令对方获得一张花色点数随机的【毒】。<br>②当你因【毒】失去体力时,你改为回复等量的体力。",
lucia_zhenren: "振刃",
lucia_zhenren_info:
"锁定技每个结束阶段若你的装备区内有牌则你弃置之。然后你依次弃置场上的X张牌。X为你以此法弃置的牌数",
nk_shekong: "设控",
nk_shekong_info:
"出牌阶段限一次你可以弃置任意张手牌并选择一名其他角色不能超过该角色的牌数然后令其选择一项弃置一张牌并令你摸X张牌或弃置X张牌并令你摸一张牌。然后你将你与其弃置的且位于弃牌堆中的牌以任意顺序置于牌堆顶。",
key_huanjie: "幻界",
key_huanjie_info: "锁定技,当你进行判定或摸牌时,你改为从牌堆的另一端获取相应的牌。",
yuri_xingdong: "行动",
yuri_xingdong_info:
"锁定技,出牌阶段开始时,你获得一张【杀】或普通锦囊牌。出牌阶段限一次,你可以将一张【杀】或普通锦囊牌交给一名其他角色,然后该角色选择一项:对除你以外的角色使用此牌并在此牌结算完成后和你各摸一张牌;或跳过下回合的判定阶段和摸牌阶段。",
//目标角色跳过阶段的同时 该回合不能发动〖整经(郑玄)〗
yuri_wangxi: "忘隙",
yuri_wangxi_info:
"主公技限定技当有角色因你发动的【行动】而死亡后若其身份不为【明忠】则其可以将身份改为忠臣并重新加入游戏然后将势力改为与你相同将体力值回复至2点并摸一张牌。",
haruko_haofang: "豪放",
haruko_haofang_info:
"锁定技,你的延时锦囊牌视为【无中生有】。当你因执行【无中生有】的效果而摸牌时,你令摸牌数+2。",
haruko_zhuishi: "追逝",
haruko_zhuishi_info:
"一名角色的判定阶段开始时若其判定区内有牌则你可以获得其判定区内的所有牌。若你的体力值大于1你失去1点体力。",
umi_chaofan: "炒饭",
umi_chaofan_info:
"出牌阶段限一次你可以弃置两张花色不同的手牌并选择一名其他角色。你摸一张牌若你的体力值大于2目标角色回复1点体力等于2目标角色摸两张牌小于2目标角色受到1点无来源且对应渠道为这两张牌的火焰伤害。",
umi_lunhui: "轮回",
umi_lunhui_info:
"一名其他角色的回合结束时若你的手牌数小于体力值则你可以失去1点体力。若如此做你摸两张牌并进行一个额外回合且你于此回合内计算与此角色的距离视为1。",
umi_shiroha: "轮回 - 延时效果",
umi_qihuan: "七幻",
umi_qihuan_info:
"限定技当你处于濒死状态时你可以移去此武将牌。若如此做你回复X点体力X为场上势力数。然后你可获得场上已死亡角色武将牌上的至多两个技能。",
komari_tiankou: "甜口",
komari_tiankou_info:
"锁定技,当你使用红色的非伤害性基本牌/锦囊牌选择目标时或成为其他角色使用的这些牌的目标时你选择一项1.摸一张牌2.为此牌增加一个目标。",
komari_xueshang: "血殇",
komari_xueshang_info:
"锁定技,蓄能技,当有角色死亡时,你对自己造成<span class=yellowtext>1</span>点伤害,然后对所有其他角色依次造成<span class=firetext>1</span>点伤害。当有角色因此法进入濒死状态时你加1点体力上限并回复1点体力然后失去此技能并终止此技能的所有后续结算。",
yukine_wenzhou: "问咒",
yukine_wenzhou_info:
"一名角色的出牌阶段开始时,其可以交给你一张牌。若如此做,你选择一项:交给其一张牌,或令其从牌堆中获得一张与此牌类型相同的牌,且其于此阶段内使用与此牌牌名相同的牌时无法被响应。",
//如果对自己发动【问咒】,则自己可以响应这些牌。但其他角色发动【问咒】时,该角色自己并不能响应
yusa_yanyi: "演艺",
yusa_yanyi_info:
"出牌阶段限一次你可以指定至多X名与你距离不大于你的体力值的角色。这些角色选择一项①令你摸一张牌。②回复1点体力然后交给你一张牌。X为你的攻击范围且至少为1",
misa_yehuo: "业火",
misa_yehuo_info:
"一名角色的摸牌阶段开始时若其在你的攻击范围内你可以弃置X张牌并选择一项①对其造成1点火属性伤害。②令其于此摸牌阶段放弃摸牌。X为你与其的的距离",
yusa_misa: "通灵",
yusa_misa_info: "当你发动的〖演艺〗结算完成之后,你可以将武将牌翻面。",
misa_yusa: "归魂",
misa_yusa_info: "当你发动的〖业火〗结算完成后,你可以将武将牌翻面。",
masato_baoquan: "暴拳",
masato_baoquan_info:
"锁定技当你即将造成伤害时你选择一项1.令此伤害+2并减1点体力上限。2.防止此伤害。",
iwasawa_yinhang: "引吭",
iwasawa_yinhang_info: "锁定技当你的体力值变化1点时你可以令至多两名角色摸一张牌。",
iwasawa_mysong: "My Song",
iwasawa_mysong_info:
"锁定技当你即将进行濒死结算时取消之。回合开始时若你的体力值小于1则你获得技能〖奋音〗直到回合结束。回合结束时若你的体力值小于1你死亡。",
iwasawa_fenyin: "奋音",
iwasawa_fenyin_info:
"你的回合内,当你使用牌时,若此牌与你于此回合内使用的上一张牌的颜色不同,则你可以摸一张牌。",
iwasawa_refenyin: "奋音",
iwasawa_refenyin_info:
"锁定技,你的回合内,当一张牌进入弃牌堆后,若本回合内没有过与此牌花色相同的卡牌进入过弃牌堆,则你摸一张牌。",
//卡牌花色的计算不受〖红颜〗等技能的影响
kengo_weishang: "伪伤",
kengo_weishang_sha: "伪伤",
kengo_weishang_shan: "伪伤",
kengo_weishang_info:
"出牌阶段限一次,你可以废除一个装备栏并摸两张牌。若你的武器栏已废除,则你使用【杀】的次数上限+1且当你使用【杀】指定目标后目标角色弃置一张牌若你的防具栏已废除则你可以将一张牌当做【闪】使用或打出若你的攻击/防御坐骑栏已废除,则你至其他角色的距离-1/其他角色至你的距离-1。",
kengo_guidui: "归队",
kengo_guidui_info:
"锁定技,准备阶段,若你有已废除的装备栏,则你恢复这些装备栏,且本局游戏内发动【伪伤】时不能废除这些装备栏。",
yoshino_jueyi: "决义",
yoshino_jueyi_info:
"出牌阶段开始时你可以选择一名其他角色。你摸一张牌并与其猜拳平局则重来。若你赢你对其造成1点伤害。若你没赢你本阶段内使用牌时不能指定其为目标。",
yui_jiang: "激昂",
yui_jiang_info:
"每当你使用(指定目标后)或被使用(成为目标后)一张【决斗】或红色的【杀】时,你可以摸一张牌。",
yui_lieyin: "烈音",
yui_lieyin_info:
"锁定技,出牌阶段开始时,你选择一项:①本阶段内的红色牌均视为【杀】;②本阶段内的【杀】均视为【决斗】。",
yui_takaramono: "珍宝",
yui_takaramono_info:
"觉醒技准备阶段若你满足以下条件中的至少两个①体力值不大于1②场上有已死亡的角色③已因〖激昂〗累计获得过至少三张牌则你获得技能〖引吭〗将〖烈音〗描述中的「你选择」改为「你可选择」然后加1点体力上限并回复1点体力。",
//ユイ/孙笨双将组合时,孙笨的〖激昂〗不计入〖珍宝〗的次数统计
yui_yinhang: "引吭",
yui_yinhang_info: "锁定技当你的体力值变化1点时你可以令至多两名角色摸一张牌。",
tsumugi_mugyu: "姆啾",
tsumugi_mugyu_info: "当你成为牌的目标后,若你的手牌数小于体力上限,则你可以摸一张牌。",
tsumugi_huilang: "回廊",
tsumugi_huilang2: "回廊",
tsumugi_huilang_info:
"回合结束时,你可以将任意张牌扣置于武将牌下(均称为「隐」)。回合开始时,你获得所有「隐」,然后可令等量的角色各摸一张牌。",
//〖回廊〗涉及的所有卡牌移动的结算不会触发〖良姻〗
haruka_shuangche: "双掣",
kanata_shuangche: "双掣",
haruka_shuangche_backup: "双掣",
haruka_shuangche_info:
"出牌阶段你可以视为使用任意基本牌或普通锦囊牌。此牌结算完成后你选择一项1.弃置X张牌。2.失去1点体力且本回合内不能再发动〖双掣〗。X为你于此回合内发动过〖双掣〗的次数",
//你不能以此法使用〖回魂〗
saya_shouji: "授计",
saya_shouji_info:
"每回合限一次,当你使用的牌结算完成后,你可以将此牌对应的所有实体牌交给一名其他角色。其可以使用这些牌中的一张,若如此做,你摸一张牌。",
saya_powei: "破围",
saya_powei_info:
"限定技回合结束后你可以选择一名体力值大于你的其他角色。你与其交替进行额外回合直到你与其中的一名角色死亡或进行到九个回合。你于回合开始时进行判定若结果为红色则你对其造成1点伤害。此过程中其他角色不计入距离和座次计算。",
saya_judge: "破围",
saya_nodis: "破围",
//〖破围〗不会因为〖铁骑〗无效
inari_baiwei: "摆尾",
inari_baiwei_draw: "摆尾",
inari_baiwei_info: "你可以将一张♦牌当做任意基本牌使用或打出。此牌结算完成后,你摸一张牌。",
//你不能以此法使用【毒】
inari_baiwei_backup: "摆尾",
inari_baiwei_sha: "摆尾",
inari_baiwei_shan: "摆尾",
inari_huhun: "狐魂",
inari_huhun_info: "锁定技,你的♣牌的花色均视为♦。你的手牌上限+1。",
shiina_qingshen: "轻身",
shiina_qingshen_info:
"当你受到或造成伤害后,你可以获得此次伤害的渠道对应的实体牌,然后将等量的牌置于你的武将牌上,称为「轻」。锁定技,你的手牌上限和攻击范围+XX为「轻」数。",
shiina_feiyan: "飞燕",
shiina_feiyan_info:
"一名其他角色的回合开始时,若其在你的攻击范围内,则你可以将一张「轻」置于弃牌堆,然后视为对其使用一张【杀】。若此【杀】未造成伤害,你摸一张牌。你于此【杀】的结算流程中视为拥有技能〖铁骑〗。",
shiina_retieji: "铁骑",
//你不能对稻荷和多鲁基发动〖飞燕〗
sunohara_chengshuang: "成双",
sunohara_chengshuang_phase: "成双",
sunohara_chengshuang_info: "锁定技,游戏开始时,你选择你的性别。回合开始时,你可以切换你的性别。",
sunohara_tiaoyin: "挑引",
sunohara_tiaoyin_info:
"出牌阶段限一次你可以弃置任意张花色各不相同的手牌然后获得等量角色区域内的各一张牌。若你以此法获得了异性角色区域内的牌则你失去1点体力。",
sunohara_jianren: "坚忍",
sunohara_jianren_info:
"当你受到伤害后,你可以令一名角色摸一张牌。若伤害无来源或来源与你性别不同,则改为摸三张牌。",
rin_baoqiu: "暴球",
rin_baoqiu_info:
"锁定技,你的攻击范围+2。当你使用【杀】指定目标后你进行判定。若结果为红色此【杀】对其的伤害值基数+1为黑色其无法闪避此【杀】为♠/♥,此【杀】不计入使用次数限制且你摸一张牌;为♦/♣,目标角色的所有非锁定技失效直到回合结束,且你弃置其一张牌。",
sasami_miaobian: "喵变",
sasami_miaobian_info:
"当你的体力值变为3以下时你获得技能〖公清〗2以下时你获得技能〖复难〗1以下时你获得技能〖暴球〗。",
sasami_gongqing: "公清",
sasami_gongqing_info:
"锁定技。当你受到伤害时,若伤害来源的攻击范围:<3则你令此伤害的数值减为1。>3你令此伤害+1。",
sasami_funan: "复难",
sasami_funan_info:
"其他角色使用或打出牌响应你使用的牌时,你可令其获得你使用的牌(其本回合不能使用或打出这些牌),然后你获得其使用或打出的牌。",
sasami_baoqiu: "暴球",
sasami_baoqiu_info:
"锁定技,你的攻击范围+2。当你使用【杀】指定目标后你进行判定。若结果为红色此【杀】对其的伤害值基数+1为黑色其无法闪避此【杀】为♠/♥,此【杀】不计入使用次数限制且你摸一张牌;为♦/♣,目标角色的所有非锁定技失效直到回合结束,且你弃置其一张牌。",
akane_jugu: "巨贾",
akane_jugu_info: "锁定技1.你的手牌上限+X。2.游戏开始时你摸X张牌X为你的体力上限。",
akane_quanqing: "权倾",
akane_quanqing_info:
"出牌阶段你可选择1.弃置一张点数大于10的牌并对攻击范围内的一名其他角色造成1点伤害2.弃置一张点数大于6的牌并弃置攻击范围内的一名其他角色区域内的一张牌。3.弃置一张牌并令攻击范围内的一名其他角色摸一张牌。",
akane_yifu: "蚁附",
akane_yifu2: "蚁附",
akane_yifu_info:
"主公技,其他键势力角色的出牌阶段限一次,其可交给你一张手牌。然后你摸一张牌,并将一张手牌交给该角色。",
doruji_feiqu: "肥躯",
doruji_feiqu_info: "锁定技,当你使用【杀】时,或你成为【杀】的目标后,你令此【杀】不可被响应。",
yuiko_fenglun: "锋论",
yuiko_fenglun_info:
"出牌阶段限一次,你可以和一名其他角色拼点。若你赢,你本阶段内使用牌没有次数和距离限制。",
yuiko_dilve: "底略",
yuiko_dilve_info: "你可以使用牌堆底的一张牌进行拼点。当你拼点后,你可以获得两张拼点牌。",
riki_spwenji: "问计",
riki_spwenji_info:
"出牌阶段开始时,你可以令一名其他角色交给你一张牌。你于本回合内使用与该牌名称相同的牌时不能被其他角色响应。",
riki_nvzhuang: "女装",
riki_nvzhuang_info:
"锁定技,此武将牌视为包含女性性别。结束阶段,若你:有手牌,你摸一张牌;没有手牌,你摸两张牌。",
riki_mengzhong: "梦终",
riki_mengzhong_info:
"觉醒技准备阶段若你已因〖问计〗获得了三张或更多的牌则你加1点体力上限并回复1点体力失去〖问计〗并获得〖重振〗。",
riki_chongzhen: "重振",
riki_chongzhen_info:
"出牌阶段开始时,你可以与一名角色拼点。若你赢,你获得该角色手牌区,装备区,判定区的各一张牌;若你没赢,你于此阶段内使用牌时不能指定其他角色为目标。",
hisako_yinbao: "音爆",
hisako_yinbao_info:
"当你受到伤害/回复体力后你可以判定。若结果为♠则你对一名其他角色造成1点雷属性伤害。",
hisako_zhuanyun: "转运",
hisako_zhuanyun_info: "锁定技,你的判定会朝向对你有利的方向倾斜。",
hinata_qiulve: "球略",
hinata_qiulve_info:
"你可以将一张非基本牌当做【杀】使用或打出(无距离限制)。你以此法使用的红色【杀】不可被响应,黑色【杀】不计入使用次数限制。",
hinata_ehou: "扼喉",
hinata_ehou_info:
"其他角色对你使用的牌结算完成后,你可对其使用一张【杀】。若此【杀】造成伤害,则你摸一张牌。",
noda_fengcheng: "奉承",
noda_fengcheng_info: "锁定技,其他角色交给你牌后,其摸一张牌。",
noda_xunxin: "寻衅",
noda_xunxin2: "寻衅",
noda_xunxin_info:
"出牌阶段限X次你可以视为对一名体力值不小于你的角色使用【决斗】。若如此做此【决斗】结算完成后没赢的角色交给赢的角色一张牌。X为你的体力值",
tomoya_shangxian: "伤弦",
tomoya_shangxian_info:
"锁定技,你计算与其他角色的距离时始终从逆时针方向计算。出牌阶段开始时,你可摸一张牌,并改变此方向。",
tomoya_wangjin: "往今",
tomoya_wangjin_info:
"每项每轮各限一次。一名其他角色的回合结束时,若其:在你的攻击范围内,你可令其摸一张牌。若其的体力值小于你,则你摸一张牌,并可交给其一张牌。不在你的攻击范围内,则你摸两张牌,并令其弃置你的一张手牌。若其的体力值大于你,则你视为对其使用一张【杀】(无距离限制)。",
nagisa_tiandu: "天妒",
nagisa_tiandu_info: "当你的判定牌生效后,你可以获得此牌。",
nagisa_fuxin: "抚心",
nagisa_fuxin_info:
"当一名角色于回合外受到伤害,或其手牌被其他角色弃置或获得后,你可以令其判定。若结果为:红色,其摸一张牌。黑色,当前回合角色弃置一张牌。",
ayato_jianshen: "僭神",
ayato_jianshen_info: "锁定技,你手牌中的【杀】均视为神属性。",
ayato_zonghuan: "纵幻",
ayato_zonghuan_info:
"出牌阶段限一次,你可以观看一名其他角色的手牌,然后选择一项:将其中的一张牌置入弃牌堆,或以该角色的视角使用其中的一张,然后摸一张牌。",
ao_xishi: "习事",
ao_xishi_info: "锁定技,当你使用或打出♦牌时,或其他角色使用♦牌指定你为目标后,你摸一张牌。",
ao_kuihun: "窥魂",
ao_kuihun_info:
"其他角色进入濒死状态时,你可以摸一张牌,然后观看其手牌并将其中一张牌置于你的武将牌上,称为「蝶」。你使用与一张「蝶」花色相同的牌时无距离和次数限制。你的手牌上限+XX为蝶数。",
ao_shixin: "释心",
ao_shixin_info:
"觉醒技准备阶段若你的「蝶」中包含至少三种花色则你加1点体力上限并回复1点体力失去〖窥魂〗并获得〖蝶归〗。",
ao_diegui: "蝶归",
ao_diegui_backup: "蝶归",
ao_diegui_info: "出牌阶段限一次,你可以将一张「蝶」交给一名角色,该角色摸两张牌并复原武将牌。",
yuzuru_wuxin: "无心",
yuzuru_wuxin_info:
"结束阶段你可以选择一项失去1点体力并令一名角色摸两张牌或弃置两张牌并回复1点体力。",
yuzuru_deyi: "得义",
yuzuru_deyi_info:
"觉醒技当有其他角色死亡后你减1点体力上限并回复1点体力失去技能〖无心〗获得技能〖往生〗〖困奋〗和〖去疾〗。",
yuzuru_wangsheng: "往生",
yuzuru_wangsheng_info:
"觉醒技当你即将死亡时你防止此次死亡。你可以将任意张牌交给一名其他角色然后减1点体力上限并将体力回复至2点修改技能〖困奋〗和〖去疾〗。",
yuzuru_kunfen: "困奋",
yuzuru_kunfen_info:
"锁定技结束阶段你失去1点体力并摸两张牌。然后你可以将两张牌交给一名其他角色。",
yuzuru_quji: "去疾",
yuzuru_quji_info:
"出牌阶段限一次你可以弃置X张牌并选择至多等量已受伤的其他角色这些角色各回复1点体力。若你以此法弃置了黑色牌则你失去1点体力。X为你已损失的体力值",
yuzuru_kunfen_rewrite: "困奋·改",
yuzuru_kunfen_rewrite_info: "锁定技,结束阶段,你摸两张牌。然后你可以将两张牌交给一名其他角色。",
yuzuru_quji_rewrite: "去疾·改",
yuzuru_quji_rewrite_info:
"出牌阶段限一次你可以弃置X张牌并选择至多等量已受伤的其他角色这些角色各回复1点体力。X为你已损失的体力值",
yuzuru_bujin: "步进",
yuzuru_bujin_info: "锁定技,己方其他角色计算与其他角色的距离-1且摸牌阶段的额定摸牌数+1。",
kanade_mapo: "麻婆",
kanade_mapo_info: "你可以将一张♥牌当做【麻婆豆腐】使用。你使用的【麻婆豆腐】可以多指定一个目标。",
kanade_benzhan: "奔战",
kanade_benzhan_info:
"每回合限一次。当你使用或打出牌响应其他角色或其他角色使用或打出牌响应你后若此牌为基本牌你可令一名角色弃置两张牌或令一名角色摸两张牌非基本牌你可对一名角色造成1点伤害或令一名其他角色回复1点体力。",
mio_tuifu: "推腐",
mio_tuifu_info: "锁定技,当一名角色对一名同性角色造成伤害时,你摸一张牌。",
mio_tishen: "替身",
mio_tishen_info:
"限定技,准备阶段,你可以将体力值回复至体力上限并摸等同于回复量的牌,然后将武将牌替换为【西园美鸟】。",
midori_nonghuan: "弄幻",
midori_nonghuan_info:
"出牌阶段限X次X为你的体力值你可以获得一名本阶段内未选择过的其他角色的区域内的一张牌。你摸一张牌然后将一张牌交给该角色。然后你清除此技能结算过程中所有卡牌移动事件的移动记录。",
//即技能结算完成后所有涉及到的牌移动事件不会再被getHistory获取
midori_tishen: "替身",
midori_tishen_info:
"限定技,准备阶段,你可以将体力值回复至体力上限并摸等同于回复量的牌,然后将武将牌替换为【西园美鱼】。",
kyoko_juwu: "聚物",
kyoko_juwu_info:
"你的回合外,当有装备牌进入弃牌堆后,若这些牌不是从你的区域移动的,则你可以获得这些牌。",
kyoko_zhengyi: "整遗",
kyoko_zhengyi_info:
"锁定技若你装备区的花色数大于等于1你视为拥有〖精策〗大于等于2你视为拥有〖涉猎〗大于等于3你视为拥有〖制衡〗大于等于4你将〖精策〗和〖制衡〗改为界限突破版本。",
kyoko_jingce: "精策",
kyoko_shelie: "涉猎",
kyoko_zhiheng: "制衡",
shizuru_nianli: "念力",
shizuru_nianli_info:
"每轮限一次,你可以展示一张♦/♣/♥/♠手牌,然后视为使用一张不计入次数限制和记录的雷【杀】/【闪】/【桃】/【无懈可击】。",
shizuru_benzhan: "奔战",
shizuru_benzhan_info:
"每回合限一次。当你使用或打出牌响应其他角色或其他角色使用或打出牌响应你后若此牌为基本牌你可令一名角色弃置两张牌或令一名角色摸两张牌非基本牌你可对一名角色造成1点伤害或令一名其他角色回复1点体力。",
shiorimiyuki_banyin: "伴音",
shiorimiyuki_banyin_info: "当你受到伤害或回复体力后你可令一名其他角色回复1点体力。",
shiorimiyuki_tingxian: "铤险",
shiorimiyuki_tingxian_info:
"出牌阶段开始时你可以摸至多三张牌。若如此做你回复1点体力且此阶段结束时你失去X点体力。X为你得到的牌中仍在手牌区的牌的数量",
shiorimiyuki_tingxian2: "铤险",
miki_shenqiang: "神枪",
miki_shenqiang_info:
"锁定技,游戏开始时,你将一张【海德洛格拉迪尔特·改】和一张【望远镜】置入你的装备区。你装备区内的武器牌和宝物牌不能被其他角色弃置。",
miki_huanmeng: "幻梦",
miki_huanmeng_info:
"准备阶段开始时你可以观看牌堆顶的X+1张牌并可以按任意顺序置于牌堆顶或牌堆底。X为你装备区内的牌数",
miki_zhiluo: "治裸",
miki_zhiluo_info:
"锁定技,一名其他角色的回合结束时,若其在你的攻击范围内且其装备区内没有牌,则你选择:①摸一张牌。②视为对其使用一张【杀】。",
miki_hydrogladiator: "海德洛",
miki_hydrogladiator_info:
"全名为【海德洛格拉迪尔特·改】。锁定技当你因执行【杀】的效果而对目标角色造成伤害后你弃置所有至目标角色距离为1的其他角色的一张牌或弃置其两张牌。",
miki_hydrogladiator_skill: "海德洛格拉迪尔特·改",
miki_binoculars: "望远镜",
miki_binoculars_info: "锁定技,其他角色的手牌对你可见。",
shiori_huijuan: "绘卷",
shiori_huijuan_discard: "绘卷",
shiori_huijuan_info:
"锁定技其他角色的结束阶段开始时你可以视为使用一张该角色本回合出牌阶段内使用过的基本牌或普通锦囊牌。准备阶段开始时若你自上个回合起以此法使用的牌数不小于X则你选择一项①弃置装备区或判定区内的一张牌。②跳过本回合的出牌阶段。X为场上玩家数的一半且至少为2",
kaori_siyuan: "思愿",
kaori_siyuan_info:
"出牌阶段,你可以将一张装备牌或延时锦囊牌置于一名其他角色的装备区内,然后可以视为使用一张基本牌或普通锦囊牌。",
akiko_dongcha: "洞察",
akiko_dongcha_info_identity:
"锁定技,其他角色的手牌对你可见。游戏开始时,你令其他角色的身份牌对你可见。",
akiko_dongcha_info: "锁定技,其他角色的手牌对你可见。",
abyusa_jueqing: "绝情",
abyusa_jueqing_info:
"当你对其他角色造成伤害时,你可以令此伤害值+X。若如此做你失去X点体力并于此伤害结算完成后修改〖绝情〗X为伤害值。",
abyusa_jueqing_1st: "绝情",
abyusa_jueqing_rewrite: "绝情·改",
abyusa_jueqing_rewrite_info: "锁定技,你即将造成的伤害均视为失去体力。",
abyusa_dunying: "遁影",
abyusa_dunying_info:
"锁定技,其他角色计算与你的距离时+X。准备阶段和结束阶段你摸X张牌X为你已损失的体力值。",
godan_yuanyi: "远忆",
godan_yuanyi_info:
"锁定技回合开始时你摸X张牌并进行一个额外的出牌阶段。X为游戏轮数且至多为3",
godan_feiqu: "肥躯",
godan_feiqu_info: "锁定技,当你使用【杀】时,或你成为【杀】的目标后,你令此【杀】不可被响应。",
godan_xiaoyuan: "消元",
godan_xiaoyuan_info:
"觉醒技当你扣减体力时若你的体力值小于4则你减3点体力上限并摸三张牌失去【肥躯】。",
yuu_lveduo: "掠夺",
yuu_lveduo_info:
"每轮限一次,其他角色的回合开始时,若你本局游戏内未对其发动过〖掠夺〗且你的武将牌正面朝上,你可以将武将牌翻面并获得该角色本回合内的控制权。此回合结束时,你将武将牌翻回正面。锁定技,若你的武将牌背面朝上,则你不能使用或打出牌。",
yuu_lveduo_full_info:
"每轮限一次其他角色的回合开始时若你本局游戏内未对其发动过〖掠夺〗且你的武将牌正面朝上你可以将武将牌翻面并获得该角色本回合内的控制权。此回合结束时你将武将牌翻回正面获得该角色武将牌上所有的带有「Charlotte」标签的技能且该角色失去这些技能。锁定技若你的武将牌背面朝上则你不能使用或打出牌。",
ryoichi_baoyi: "爆衣",
ryoichi_baoyi_info:
"锁定技当你失去装备区内的一张牌后你摸一张牌然后选择一项①令一名其他女性角色失去1点体力。②弃置一名其他非女性角色区域内的两张牌。",
ryoichi_tuipi: "褪皮",
ryoichi_tuipi_info:
"锁定技,你不是【顺手牵羊】和【过河拆桥】的合法目标。你装备区的牌于弃牌阶段内计入手牌上限。",
kotori_yumo: "驭魔",
kotori_yumo_damage: "驭魔",
kotori_yumo_gain: "驭魔",
kotori_yumo_info:
"锁定技,游戏开始时,你获得蓝色、红色、绿色、黄色、灰色魔物各一个。当有角色受到伤害后,若你没有对应的标记,你根据其势力获得一个对应魔物:魏:蓝、蜀:红、吴:绿、群:黄、灰:晋、键:紫。回合开始时,你可以弃置一个对应的魔物并获得以下技能之一直到回合结束:蓝:魏业、红:蜀义、绿:吴耀、黄:群心、灰:晋势、紫:键魂。",
kotori_skill_wei: "魏业",
kotori_skill_wei_info:
"回合开始时,你可以弃置一张牌并指定一名其他角色,该角色须弃置一张牌,否则你摸一张牌。",
kotori_skill_shu: "蜀义",
kotori_skill_shu_info:
"你使用【杀】上限+1出牌阶段结束时若你于此阶段使用【杀】次数不少于2摸一张牌。",
kotori_skill_wu: "吴耀",
kotori_skill_wu_info: "回合结束时,若你的手牌数不等于你的体力值,则你摸一张牌。",
kotori_skill_qun: "群心",
kotori_skill_qun_info:
"锁定技弃牌阶段开始时若你的手牌数比体力值多2或更多你本回合手牌上限+1若你已损失体力值大于1你手牌上限+1。",
kotori_skill_key: "键魂",
kotori_skill_key_info:
"出牌阶段限一次你可以摸一张牌并获得1点护甲。若如此做你于当前回合结束时失去1点体力。",
kotori_skill_jin: "晋势",
kotori_skill_jin_info:
"摸牌阶段结束时,你可以展示你于此阶段内因摸牌而得到的牌。若这些牌的花色均不同,则你摸一张牌。",
kotori_yumo_wei: '<span class="thundertext">魔物</span>',
kotori_yumo_shu: '<span class="firetext">魔物</span>',
kotori_yumo_wu: '<span class="greentext">魔物</span>',
kotori_yumo_qun: '<span class="yellowtext">魔物</span>',
kotori_yumo_key: '<span class="legendtext">魔物</span>',
kotori_yumo_jin: '<span class="icetext">魔物</span>',
kotori_huazhan: "花绽",
kotori_huazhan_info:
"每回合每种魔物限一次,你可将一个蓝色/红色/绿色/黄色/紫色/灰色魔物当做【树上开花】使用。",
jojiro_shensu: "神速",
jojiro_shensu_info:
"你可以选择一至三项1. 跳过判定阶段和摸牌阶段2. 跳过出牌阶段并弃置一张装备牌3. 跳过弃牌阶段并将你的武将牌翻面。你每选择一项,视为你对一名其他角色使用一张没有距离限制的【杀】。",
jojiro_shensu1: "神速",
jojiro_shensu2: "神速",
jojiro_shensu4: "神速",
jojiro_shunying: "瞬影",
jojiro_shunying_info:
"锁定技回合结束时若你本回合内跳过了阶段则你选择一项1.失去1点体力。2.移动至多X格并摸X张牌X为你本回合内跳过的阶段数。",
shiroha_yuzhao: "预兆",
shiroha_yuzhao_umi: "预兆",
shiroha_yuzhao_info:
"锁定技游戏开始时你将牌堆顶的X张牌扣置于你的武将牌上称为「兆」。一名角色的回合开始时若你有「兆」且其至你的距离不大于1则你将牌堆顶的X张牌扣置为「兆」然后将等量的「兆」置于牌堆顶。X为势力数",
shiroha_guying: "孤影",
shiroha_guying_info:
"锁定技,每回合限一次,当你受到伤害/对其他角色造成伤害时,你进行判定。若结果为红色/黑色,此伤害-1/+1。",
shiroha_guying_rewrite: "孤影·改",
shiroha_guying_rewrite_info:
"当你受到伤害/对其他角色造成伤害时,你可进行判定。若结果为红色/黑色,此伤害-1/+1。",
shiroha_jiezhao: "解兆",
shiroha_jiezhao_info:
"一名角色的判定牌生效前你可打出一张「兆」代替之。当你以此法移去最后一张「兆」后你加1点体力上限并回复1点体力然后修改〖孤影〗并随机获得以下技能中的一个〖炒饭〗/〖习事〗/〖呣啾〗/〖结伴〗。",
//猴年马月爆料再利用
shizuku_sizhi: "思智",
shizuku_sizhi2: "思智",
shizuku_sizhi_info:
"出牌阶段限一次你可以弃置任意张点数之和为13的牌然后摸两倍数量的牌。以此法得到的牌中黑色牌本回合无距离和次数限制红色牌本回合不计入手牌上限。",
shizuku_biyi: "避忆",
shizuku_biyi_info:
"当你受到伤害后你可以进行一次判定然后若你弃置任意张点数之和与判定结果点数相同的牌你回复1点体力。",
shizuku_sanhua: "散花",
shizuku_sanhua_info: "当你死亡时,你可令一名其他角色从牌堆中获得四张名称各不相同的基本牌。",
hiroto_huyu: "虎驭",
hiroto_huyu2: "虎驭",
hiroto_huyu_info:
"其他角色的出牌阶段结束时,若你没有技能〖纵略〗,则其可将两张手牌交给你。若如此做,你获得〖纵略〗。你的下回合结束时,你失去〖纵略〗并将本回合内得到的所有牌交给该角色。",
hiroto_zonglve: "纵略",
hiroto_zonglve_info:
"锁定技,你的手牌上限+3。出牌阶段限一次你可以将一张手牌背面朝下放置并展示一名其他角色的一张手牌。若这两张牌颜色相同你对其造成1点伤害并弃置其展示的牌。颜色不同你获得该角色区域内的两张牌。",
hiroto_tuolao: "脱牢",
hiroto_tuolao_info:
"觉醒技,回合结束后,若此回合不是你的第一个回合且你本轮内未因〖虎驭〗失去过牌,则你摸三张牌,失去〖虎驭〗并获得〖纵略〗。",
sakuya_junbu: "均步",
sakuya_junbu_info:
"锁定技若你已废除的装备栏数量≥1你使用牌无距离限制。≥2你使用牌无次数限制。≥3你使用牌时可以多指定一个目标。≥4你使用的牌不可被响应。≥5你使用牌造成伤害时失去1点体力令此伤害+1。",
rumi_shuwu: "淑武",
rumi_shuwu2: "淑武",
rumi_shuwu_info:
"锁定技你使用【杀】无距离和次数限制你使用普通锦囊牌选择目标后可增加一个目标。出牌阶段结束时你令X=0且每满足一项便令X+1①你于本阶段内使用【杀】的次数不大于1。②你于本阶段内未使用锦囊牌造成过伤害。③你的体力值不大于3。你摸X张牌且本回合手牌上限+X。",
chihaya_liewu: "烈武",
chihaya_liewu2: "烈武",
chihaya_liewu_info:
"锁定技你使用【杀】无距离和次数限制你使用普通锦囊牌选择目标后可增加一个目标。当你首次废除最后一个装备栏后你减4点体力上限并获得技能〖怀柔〗。",
chihaya_youfeng: "游凤",
chihaya_youfeng_info:
"转换技每轮限一次你可以加1点体力上限视为使用一张普通锦囊牌每轮限一次你可以废除你的一个装备栏视为使用一张基本牌。",
chihaya_huairou: "怀柔",
chihaya_huairou_info: "出牌阶段,你可以重铸装备牌。",
yukito_kongwu: "控物",
yukito_kongwu_info:
"出牌阶段限一次你可以表演《小空飞天》。若如此做你从以下项目中随机选择X项并执行其中的一项①令一名角色摸两张牌。②对一名角色造成1点伤害。③令一名已受伤的角色回复1点体力。④弃置一名角色区域内的两张牌。⑤移动场上的一张牌。若X=0则你弃置两张牌。X为你的得分",
yukito_yaxiang: "鸦翔",
yukito_yaxiang_info:
"限定技当有角色进入濒死状态时你可移去此武将牌然后令该角色将体力值回复至3点弃置判定区的所有牌并获得技能〖终愿〗。",
misuzu_zhongyuan: "终愿",
misuzu_zhongyuan_info:
"限定技。当你的判定结果生效时,你可将判定结果改为任意花色和点数并结束此时机。",
asara_shelu: "摄录",
asara_shelu_info:
"出牌阶段限一次你可以弃置一张牌然后展示一名其他角色的一张手牌并将其置于你的武将牌上称为“影”。若你以此法弃置的牌和展示的牌花色相同则你摸两张牌。点数相同则你回复1点体力。",
asara_yingwei: "影威",
asara_yingwei_info:
"你可以如手牌般使用或打出“影”。锁定技,当你使用“影”时,强制触发对应的应变效果。",
kotomi_qinji: "琴击",
kotomi_qinji_info:
"出牌阶段开始时,你可视为使用使用【万箭齐发】。你以此法使用【万箭齐发】造成的伤害视为失去体力。",
kotomi_chuanxiang: "传箱",
kotomi_chuanxiang2: "传箱",
kotomi_chuanxiang_info:
"其他角色的出牌阶段限一次,其可以将装备区内的一张牌移动到另一名角色的装备区内,然后你摸一张牌。若你是目标角色,则你改为摸两张牌。",
mia_shihui: "时迴",
mia_shihui_info:
"锁定技摸牌阶段你改为摸X+1张牌X为你上回合弃置的牌数结束阶段你弃置一张牌并回复1点体力。",
mia_qianmeng: "潜梦",
mia_qianmeng_info:
"使命技。①游戏开始时,你摸一张牌,然后将一张牌置于牌堆的正中央。②使命:当有角色获得“潜梦”牌时,其将此牌交给你。你将体力值回复至上限,失去〖时迴〗并获得〖风发〗。③失败:当你死亡时,你可令一名角色获得牌堆中所有与“潜梦”牌花色点数相同的牌。",
mia_fengfa: "风发",
mia_fengfa_info: "锁定技。摸牌阶段你多摸X张牌X为你上回合使用过的牌数。",
kano_liezhen: "列阵",
kano_liezhen_info:
"结束阶段,若你本回合内使用过牌且这些牌的类型:不均相同,你可视为使用【排兵布阵】或智囊;均相同,你获得仁库中的所有牌(没有则改为摸两张牌)。",
kano_paibingbuzhen: "排兵布阵",
kano_paibingbuzhen_info:
"出牌阶段,对至多三名角色使用。目标角色摸一张牌,然后将一张牌置入仁库。若仁库中的牌类型或颜色均相同,则你摸一张牌。",
kano_poyu: "破羽",
kano_poyu_info:
"当你成为【杀】或伤害性锦囊牌的目标后,若仁库中有牌,你可判定。然后你可从仁库中移去一张与此牌类型或花色相同的牌,令此牌对你无效。",
liyingxia_sanli: "三礼",
liyingxia_sanli_info:
"锁定技。其他角色于其回合内前两次使用牌指定你为目标后,你摸一张牌;第三次使用牌指定你为目标后,你交给其一张牌。",
liyingxia_zhenjun: "振军",
liyingxia_zhenjun_info:
"键势力技。结束阶段你可以令至多X+1名角色各摸一张牌且这些角色于自己的下个回合内第一次造成的伤害+1X为你本回合内使用【杀】和伤害性锦囊牌的次数。",
liyingxia_wumai: "武脉",
liyingxia_wumai_info:
"蜀势力技。一轮游戏开始时,你可以选择获得其中一个未选择过的技能直到本轮结束:〖八阵〗/〖集智〗/〖观星〗/〖游龙〗。若均已选择过则你可以摸X张牌X为场上已受伤的角色数且至多为3。",
erika_shisong: "识诵",
erika_shisong_info:
"锁定技。①你的手牌上限+XX为你的护甲数。②当你于回合内使用第Y张牌时若此牌与你上回合使用的第Y张牌类型相同则你摸一张牌。",
erika_yousheng: "佑生",
erika_yousheng_info:
"使命技。①限定技。一轮游戏开始时你可以选择至多两名其他角色。你减2点体力上限并增加3点护甲。②当你〖佑生①〗选择的角色成为【杀】或伤害类锦囊牌的目标时你可以弃置X张牌并将此目标转移给自己X为你本轮内发动过〖佑生②〗的次数。此牌结算结束后你可令一名原目标角色获得此牌。③成功当你失去最后的护甲后若你已发动过〖佑生①〗则你和所有〖佑生①〗选择的角色各摸三张牌。④失败当一名〖佑生①〗选择的角色因【杀】或伤害类锦囊牌而受到伤害时你失去所有护甲并弃置等量的牌。",
erika_yousheng_append:
'<span style="font-family: yuanli">Death is not the end of life, but the completion of life.</span>',
satomi_luodao: "落刀",
satomi_luodao_info:
"当你使用【杀】指定目标后,你可以展示目标角色的所有手牌。若其中:有【闪】,则你弃置其中的一张【闪】;没有【闪】,则你弃置一张牌。",
satomi_daohai: "稻海",
satomi_daohai_info:
"结束阶段,若你本回合内弃置过牌,则你可以视为使用一张【五谷丰登】。然后你可以将你于此【五谷丰登】中得到的牌当做【乐不思蜀】使用。",
satomi_daohai_append: '<span style="font-family: yuanli">五穀豊穣、刈り入れ時だね!</span>',
tenzen_fenghuan: "封还",
tenzen_fenghuan_info:
"其他角色使用的【杀】或伤害性锦囊牌结算结束后,若你是此牌的唯一目标,则你可以弃置任意张点数之和大于等于此牌点数两倍的牌,然后视为对其使用一张名称相同的牌。",
tenzen_retianquan: "天全",
tenzen_retianquan_info:
"每回合限一次。当你使用【杀】指定目标后你可失去1点体力或弃置一张牌然后亮出牌堆顶的三张牌若你的体力值小于体力上限的50%,则改为展示五张牌)。这些牌中每有一张基本牌,响应此牌所需的【闪】的数量便+1。此牌结算结束后若此牌造成过伤害则你获得展示牌中的所有非基本牌。",
iriya_yinji: "殷极",
iriya_yinji_info: "锁定技。出牌阶段开始时你将手牌摸至17张。你不能直接使用以此法得到的牌。",
iriya_haozhi: "豪掷",
iriya_haozhi_info:
"出牌阶段,你可以按照斗地主牌型弃置至少两张牌,且其他角色可以依次对其进行一轮响应。最后一名进行响应的角色可以根据对应牌型执行对应效果。" +
"对子:其可以令至多两名角色各摸一张牌。" +
"三带:其可以弃置至多三名其他角色的各一张牌,然后摸一张牌。" +
"单顺:其可以弃置一名其他角色的一张牌。若其未以此法弃置过颜色相同的牌,则其可以重复此流程。然后其摸等量的牌。" +
"双顺:其可以获得一名其他角色的一张牌。若其未以此法获得过颜色相同的牌,则其可以重复此流程。然后其回复等量的体力。" +
"三顺/飞机其可以令至多3名其他角色翻面然后对其中一名角色造成1点火属性伤害。" +
"炸弹/四带二其可以对一名角色造成2点雷属性伤害然后目标角色翻面弃置装备区的所有牌和四张手牌。",
visible_fuuko_xingdiao: '<span data-nature="soilmm">星</span>',
fuuko_xingdiao: "星雕",
fuuko_xingdiao_info:
"锁定技。游戏开始时你将手牌摸至8张然后将所有手牌明置称为“星”不计入手牌上限。每名其他角色限一次其可以于出牌阶段选择获得你的一张“星”然后你摸一张牌。",
fuuko_chuanyuan: "传愿",
fuuko_chuanyuan_info:
"锁定技。当你失去一张“星”后你回复1点体力然后从牌堆中获得一张和“星”花色点数相同的牌没有则改为摸一张牌且使用此牌无距离和次数限制。",
}
export default translates;

View File

@ -2442,9 +2442,9 @@ game.import("character", function () {
mbyilie3: { mbyilie3: {
audio: "mbyilie", audio: "mbyilie",
trigger: { player: "phaseEnd" }, trigger: { player: "phaseEnd" },
//filter:function(event,player){ filter: function (event, player) {
// return player.countMark('mbyilie'); return player.hasMark('mbyilie');
//}, },
forced: true, forced: true,
content: function () { content: function () {
"step 0"; "step 0";
@ -9722,9 +9722,9 @@ game.import("character", function () {
"step 1"; "step 1";
if (result.number < 7) { if (result.number < 7) {
var source = trigger.source; var source = trigger.source;
if (source && source.isIn() && source.countCards("he") > 0) { if (source && source.isIn() && source.countCards("h") > 0) {
player.line(source); player.line(source);
source.chooseToDiscard("he", true); source.chooseToDiscard("h", true);
} }
} }
}, },
@ -20080,8 +20080,8 @@ game.import("character", function () {
mbzuoyou(player) { mbzuoyou(player) {
const mbzuoyou = player.storage.mbzuoyou; const mbzuoyou = player.storage.mbzuoyou;
if (mbzuoyou) if (mbzuoyou)
return '转换技。出牌阶段限一次,阴:你可以令一名角色摸三张牌,然后其弃置两张牌;<span class="bluetext">阳:你可以令一名角色弃置一张手牌然后其获得1点护甲。</span>'; return '转换技。出牌阶段限一次,阴:你可以令一名角色摸两张牌,然后其弃置一张牌;<span class="bluetext">阳:你可以令一名手牌数不少于二的角色弃置两张手牌然后其获得1点护甲。</span>';
return '转换技。出牌阶段限一次,<span class="bluetext">阴:你可以令一名角色摸三张牌,然后其弃置两张牌;</span>阳:你可以令一名角色弃置一张手牌然后其获得1点护甲。'; return '转换技。出牌阶段限一次,<span class="bluetext">阴:你可以令一名角色摸两张牌,然后其弃置一张牌;</span>阳:你可以令一名手牌数不少于二的角色弃置两张手牌然后其获得1点护甲。';
}, },
}, },
perfectPair: { perfectPair: {
@ -20724,7 +20724,7 @@ game.import("character", function () {
simafu: "司马孚", simafu: "司马孚",
xunde: "勋德", xunde: "勋德",
xunde_info: xunde_info:
"一名角色受到伤害后若你至其的距离不大于1则你可判定。若判定结果大于5你令该角色获得判定牌小于7你令伤害来源弃置一张牌。", "一名角色受到伤害后若你至其的距离不大于1则你可判定。若判定结果大于5你令该角色获得判定牌小于7你令伤害来源弃置一张牌。",
chenjie: "臣节", chenjie: "臣节",
chenjie_info: chenjie_info:
"一名角色的判定牌生效前,你可打出一张花色相同的牌。系统将你打出的牌作为新判定牌,将原判定牌置入弃牌堆。然后你摸两张牌。", "一名角色的判定牌生效前,你可打出一张花色相同的牌。系统将你打出的牌作为新判定牌,将原判定牌置入弃牌堆。然后你摸两张牌。",
@ -21154,7 +21154,7 @@ game.import("character", function () {
mbyilie2: "义烈", mbyilie2: "义烈",
mbyilie3: "义烈", mbyilie3: "义烈",
mbyilie_info: mbyilie_info:
"锁定技。①游戏开始时你选择一名其他角色然后你获得以下效果其受到伤害时若你没有“烈”则你获得等同于伤害值的“烈”标记然后防止此伤害其对其他角色造成伤害后你回复1点体力。②结束阶段你摸一张牌并失去X点体力然后移去所有“烈”X为你拥有的“烈”标记数。", "锁定技。①游戏开始时你选择一名其他角色然后你获得以下效果其受到伤害时若你没有“烈”则你获得等同于伤害值的“烈”标记然后防止此伤害其对其他角色造成伤害后你回复1点体力。②结束阶段若你拥有“烈”标记,你摸一张牌并失去X点体力然后移去所有“烈”X为你拥有的“烈”标记数。",
muludawang: "木鹿大王", muludawang: "木鹿大王",
shoufa: "兽法", shoufa: "兽法",
shoufa_info: shoufa_info:

View File

@ -703,7 +703,10 @@ game.import("character", function () {
dragjuwu: { dragjuwu: {
trigger: { target: "shaBefore" }, trigger: { target: "shaBefore" },
filter(event, player) { 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, forced: true,
content() { content() {
@ -714,6 +717,7 @@ game.import("character", function () {
target(card, player, target) { target(card, player, target) {
if ( if (
card.name == "sha" && card.name == "sha" &&
!game.hasNature(card) &&
game.countPlayer((targetx) => player.inRange(targetx)) >= 3 game.countPlayer((targetx) => player.inRange(targetx)) >= 3
) )
return "zerotarget"; return "zerotarget";

View File

@ -142,6 +142,7 @@ window.noname_character_rank = {
"dc_shen_huatuo", "dc_shen_huatuo",
"sp_zhenji", "sp_zhenji",
"wu_guanyu", "wu_guanyu",
"clan_zhongyao",
], ],
a: [ a: [
"star_caoren", "star_caoren",
@ -1916,6 +1917,7 @@ window.noname_character_rank = {
"wu_guanyu", "wu_guanyu",
], ],
epic: [ epic: [
"clan_zhongyao",
"dc_caoshuang", "dc_caoshuang",
"tianchou", "tianchou",
"star_yuanshao", "star_yuanshao",

View File

@ -8241,7 +8241,7 @@ game.import("character", function () {
cardUsable: function (card, player) { cardUsable: function (card, player) {
if (card.name == "sha") { if (card.name == "sha") {
const suit = get.suit(card); 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) { aiOrder: function (player, card, num) {
@ -18102,9 +18102,9 @@ game.import("character", function () {
reluoyi_info: reluoyi_info:
"你可以跳过摸牌阶段,然后亮出牌堆顶的三张牌,获得其中的基本牌、武器牌和【决斗】,若如此做,直到你的下回合开始,你为伤害来源的【杀】或【决斗】造成的伤害+1。", "你可以跳过摸牌阶段,然后亮出牌堆顶的三张牌,获得其中的基本牌、武器牌和【决斗】,若如此做,直到你的下回合开始,你为伤害来源的【杀】或【决斗】造成的伤害+1。",
reganglie_info: reganglie_info:
"当你受到1点伤害后你可进行判定若结果为红色你对伤害来源造成1点伤害;黑色,你弃置伤害来源一张牌。", "当你受到1点伤害后你可进行判定若结果为红色你对伤害来源造成1点伤害;黑色,你弃置伤害来源一张牌。",
reganglie_info_guozhan: reganglie_info_guozhan:
"当你受到伤害后你可进行判定若结果为红色你对伤害来源造成1点伤害;黑色,你弃置伤害来源一张牌。", "当你受到伤害后你可进行判定若结果为红色你对伤害来源造成1点伤害;黑色,你弃置伤害来源一张牌。",
botu: "博图", botu: "博图",
botu_info: "回合结束时,若你本回合出牌阶段内使用的牌包含四种花色,则你可以进行一个额外回合。", botu_info: "回合结束时,若你本回合出牌阶段内使用的牌包含四种花色,则你可以进行一个额外回合。",
rebotu: "博图", rebotu: "博图",

View File

@ -1424,22 +1424,21 @@ game.import("character", function () {
player.removeMark("sbxingshang", get.info("sbxingshang").getNum(num + 4)); player.removeMark("sbxingshang", get.info("sbxingshang").getNum(num + 4));
switch (num) { switch (num) {
case 1: case 1:
case 2: case 5:
case 6: case 6:
const type = ["basic", "equip", "trick"][[1, 2, 6].indexOf(num)]; const type = ["basic", "equip", "trick"][[1, 5, 6].indexOf(num)];
target.addTempSkill("sbfangzhu_ban", { player: "phaseEnd" }); target.addTempSkill("sbfangzhu_ban", { player: "phaseEnd" });
target.markAuto("sbfangzhu_ban", [type]); target.markAuto("sbfangzhu_ban", [type]);
break; break;
case 2:
target.addTempSkill("baiban", { player: "phaseEnd" });
break;
case 3: case 3:
target.addTempSkill("sbfangzhu_kill", { player: "phaseEnd" }); target.addTempSkill("sbfangzhu_kill", { player: "phaseEnd" });
break; break;
case 4: case 4:
target.turnOver(); target.turnOver();
break; break;
case 5:
target.addTempSkill("sbfangzhu_ban", { player: "phaseEnd" });
target.markAuto("sbfangzhu_ban", ["equip"]);
break;
} }
}, },
ai: { ai: {

File diff suppressed because it is too large Load Diff

View File

@ -23921,17 +23921,16 @@ game.import("character", function () {
filter: function (event, player) { filter: function (event, player) {
if (event.name == "loseAsync") { if (event.name == "loseAsync") {
if (event.type != "gain") return false; if (event.type != "gain") return false;
var hs = current.getCards("h"),
cards = event.getl(player).cards2;
return game.hasPlayer(function (current) { return game.hasPlayer(function (current) {
if (current == player) return false; if (current == player) return false;
var hs = current.getCards("h"),
cards = event.getl(player).cards2;
var cardsx = event.getg(current); var cardsx = event.getg(current);
for (var i of cardsx) { for (var i of cardsx) {
if ( if (
hs.includes(i) &&
cards.includes(i) && cards.includes(i) &&
hs.includes(card) && get.color(i, player) == "black"
cards.includes(card) &&
get.color(card, player) == "black"
) )
return true; return true;
} }

View File

@ -129,6 +129,7 @@ game.import("character", function () {
ganning: ["lingtong", "xf_sufei"], ganning: ["lingtong", "xf_sufei"],
guanyu: ["zhangfei", "liaohua"], guanyu: ["zhangfei", "liaohua"],
}, },
/** @type { importCharacterConfig['skill'] } */
skill: { skill: {
//标准版甘夫人 //标准版甘夫人
stdshushen: { stdshushen: {
@ -578,7 +579,7 @@ game.import("character", function () {
async cost(event, trigger, player) { async cost(event, trigger, player) {
let num = game.countPlayer( let num = game.countPlayer(
(current) => (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; let check = num >= 2;
const { result } = await player const { result } = await player
@ -2611,7 +2612,7 @@ game.import("character", function () {
global: ["dying", "gainAfter", "loseAsyncAfter"], global: ["dying", "gainAfter", "loseAsyncAfter"],
}, },
audio: 2, audio: 2,
getIndex: function (event, player) { getIndex(event, player) {
if (event.name !== "loseAsync") return [event.player]; if (event.name !== "loseAsync") return [event.player];
else else
return game return game

View File

@ -5425,7 +5425,7 @@ game.import("character", function () {
return val; return val;
}, },
prompt: () => "选择要交出的牌和要交给的目标", prompt: () => "选择要交出的牌和要交给的目标",
selectCard: 1, selectCard: [1, Infinity],
discard: false, discard: false,
lose: false, lose: false,
delay: false, delay: false,
@ -20495,7 +20495,7 @@ game.import("character", function () {
tw_jiangji_prefix: "TW", tw_jiangji_prefix: "TW",
twjichou: "急筹", twjichou: "急筹",
twjichou_info: twjichou_info:
"①每回合限一次。你可以视为使用一张未被〖急筹①〗记录过的普通锦囊牌并记录此牌。②你无法响应或{使用对应实体牌包含你的手牌的}〖急筹①〗记录过的锦囊牌。③出牌阶段限一次。你可将手牌中的一张〖急筹①〗记录过的锦囊牌交给其他角色。", "①每回合限一次。你可以视为使用一张未被〖急筹①〗记录过的普通锦囊牌并记录此牌。②你无法响应或{使用对应实体牌包含你的手牌的}〖急筹①〗记录过的锦囊牌。③出牌阶段限一次。你可将手牌中任意张〖急筹①〗记录过的锦囊牌交给其他角色。",
twjilun: "机论", twjilun: "机论",
twjilun_info: twjilun_info:
"当你受到伤害后你可以摸X张牌X为〖急筹①〗记录数且至少为1至多为5或视为使用一张〖急筹①〗记录过且未被〖机论〗记录过的普通锦囊牌并记录此牌。", "当你受到伤害后你可以摸X张牌X为〖急筹①〗记录数且至少为1至多为5或视为使用一张〖急筹①〗记录过且未被〖机论〗记录过的普通锦囊牌并记录此牌。",

View File

@ -131,8 +131,21 @@ game.import("play", function () {
} }
}, },
game: { game: {
changeCoin: function (num) { changeCoin: function (num, toast, audio) {
if (typeof num == "number" && ui.coin) { if (typeof num == "number" && ui.coin) {
if (num != 0 && toast !== false) {
ui.create.toast(
`${num > 0 ? "获得" : "花费"}&nbsp;${Math.abs(
num
)}&nbsp;金币`
);
}
if (audio !== false) {
game.playAudio(
"effect",
num > 0 ? "coin" : "coin_cost"
);
}
game.saveConfig("coin", lib.config.coin + num); game.saveConfig("coin", lib.config.coin + num);
var str; var str;
if (lib.config.coin_display_playpackconfig == "text") { if (lib.config.coin_display_playpackconfig == "text") {

View File

@ -244,7 +244,7 @@ new Promise((resolve) => {
"serviceWorker" in navigator "serviceWorker" in navigator
) { ) {
let scope = let scope =
window.location.protocol + "//" + window.location.host + "/"; window.location.protocol + "//" + window.location.host + window.location.pathname;
navigator.serviceWorker navigator.serviceWorker
.getRegistrations() .getRegistrations()
.then(async (registrations) => { .then(async (registrations) => {

View File

@ -23,6 +23,7 @@ window.noname_package = {
old: "怀旧", old: "怀旧",
diy: "DIY", diy: "DIY",
ddd: "3D精选", ddd: "3D精选",
key: "Key",
yxs: "英雄杀", yxs: "英雄杀",
hearth: "炉石传说", hearth: "炉石传说",
gwent: "昆特牌", gwent: "昆特牌",

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

View File

@ -1,28 +1,29 @@
<!DOCTYPE HTML> <!DOCTYPE html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8" />
<meta name="format-detection" content="telephone=no"> <meta name="format-detection" content="telephone=no" />
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="viewport" content="user-scalable=no, viewport-fit=cover"> <meta name="viewport" content="user-scalable=no, viewport-fit=cover" />
<title>无名杀</title> <title>无名杀</title>
<script> <script>
if (typeof window.require == 'function' && if (
typeof window.process == 'object' && typeof window.require == "function" &&
typeof window.__dirname == 'string') { typeof window.process == "object" &&
typeof window.__dirname == "string"
) {
// 使importMap解析node内置模块 // 使importMap解析node内置模块
const builtinModules = require('module').builtinModules; const builtinModules = require("module").builtinModules;
if (Array.isArray(builtinModules)) { if (Array.isArray(builtinModules)) {
const importMap = { const importMap = {
imports: {} imports: {},
}; };
for (const module of builtinModules) { for (const module of builtinModules) {
importMap.imports[module] = importMap.imports[module] = importMap.imports[`node:${module}`] =
importMap.imports[`node:${module}`] = `./noname-builtinModules/${module}`;
`./noname-builtinModules/${module}`
} }
const im = document.createElement('script'); const im = document.createElement("script");
im.type = 'importmap'; im.type = "importmap";
im.textContent = JSON.stringify(importMap); im.textContent = JSON.stringify(importMap);
document.currentScript.after(im); document.currentScript.after(im);
} }
@ -32,11 +33,11 @@
"use strict"; "use strict";
(() => { (() => {
window.onerror = function (msg, src, line, column, err) { window.onerror = function (msg, src, line, column, err) {
let str = `错误文件: ${typeof src == 'string' && src.length > 0 ? decodeURI(src) : '未知文件'}`; let str = `错误文件: ${typeof src == "string" && src.length > 0 ? decodeURI(src) : "未知文件"}`;
str += `\n错误信息: ${msg}`; str += `\n错误信息: ${msg}`;
str += `\n行号: ${line}`; str += `\n行号: ${line}`;
str += `\n列号: ${column}`; str += `\n列号: ${column}`;
if (err && err.stack) str += '\n' + decodeURI(err.stack); if (err && err.stack) str += "\n" + decodeURI(err.stack);
console.error(str); console.error(str);
alert(str); alert(str);
}; };
@ -50,13 +51,13 @@
// 捕获位置用到的正则 // 捕获位置用到的正则
const regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/; const regExp = /(.+?)(?::(\d+))?(?::(\d+))?$/;
const parts = regExp.exec(urlLike.replace(/[()]/g, '')); const parts = regExp.exec(urlLike.replace(/[()]/g, ""));
// @ts-ignore // @ts-ignore
return [parts[1], parts[2] || void 0, parts[3] || void 0]; return [parts[1], parts[2] || void 0, parts[3] || void 0];
} }
window.onunhandledrejection = async event => { window.onunhandledrejection = async (event) => {
event.promise.catch(error => { event.promise.catch((error) => {
console.log(error); console.log(error);
// 如果`error`是个错误,则继续处理 // 如果`error`是个错误,则继续处理
if (error instanceof Error) { if (error instanceof Error) {
@ -64,11 +65,10 @@
if (errorList.includes(error)) return; if (errorList.includes(error)) return;
errorList.push(error); errorList.push(error);
// 如果`error`拥有字符串形式的报错栈堆且报错栈堆确实符合v8的stack // 如果`error`拥有字符串形式的报错栈堆且报错栈堆确实符合v8的stack
if (typeof error.stack === 'string' && STACK_REGEXP.test(error.stack)) { if (typeof error.stack === "string" && STACK_REGEXP.test(error.stack)) {
// 获取符合栈堆信息的字符串,一般来说就是从第二行开始的所有行 // 获取符合栈堆信息的字符串,一般来说就是从第二行开始的所有行
// 为了处理eval的情况故必须获取完行数 // 为了处理eval的情况故必须获取完行数
let lines = error.stack.split('\n').filter((line) => let lines = error.stack.split("\n").filter((line) => STACK_REGEXP.test(line));
STACK_REGEXP.test(line));
// 提供类型信息防止vscode报错 // 提供类型信息防止vscode报错
/** /**
@ -90,14 +90,19 @@
for (let currentLine = 0; currentLine < lines.length; ++currentLine) { for (let currentLine = 0; currentLine < lines.length; ++currentLine) {
if (/\(eval /.test(lines[currentLine])) continue; if (/\(eval /.test(lines[currentLine])) continue;
let formatedLine = lines[currentLine].replace(/^\s+/, '').replace(/\(eval code/g, '(').replace(/^.*?\s+/, ''); let formatedLine = lines[currentLine]
.replace(/^\s+/, "")
.replace(/\(eval code/g, "(")
.replace(/^.*?\s+/, "");
const location = formatedLine.match(/ (\(.+\)$)/); const location = formatedLine.match(/ (\(.+\)$)/);
if (location) formatedLine = formatedLine.replace(location[0], ''); if (location) formatedLine = formatedLine.replace(location[0], "");
const locationParts = extractLocation(location ? location[1] : formatedLine); const locationParts = extractLocation(location ? location[1] : formatedLine);
fileName = ['eval', '<anonymous>'].includes(locationParts[0]) ? void 0 : locationParts[0]; fileName = ["eval", "<anonymous>"].includes(locationParts[0])
? void 0
: locationParts[0];
line = Number(locationParts[1]); line = Number(locationParts[1]);
column = Number(locationParts[2]); column = Number(locationParts[2]);
break; break;
@ -110,13 +115,14 @@
else { else {
try { try {
// @ts-ignore // @ts-ignore
let [_, src = void 0, line = void 0, column = void 0] = /at\s+.*\s+\((.*):(\d*):(\d*)\)/i.exec(error.stack.split('\n')[1]) let [_, src = void 0, line = void 0, column = void 0] =
if (typeof line == 'string') line = Number(line); /at\s+.*\s+\((.*):(\d*):(\d*)\)/i.exec(error.stack.split("\n")[1]);
if (typeof column == 'string') column = Number(column); if (typeof line == "string") line = Number(line);
if (typeof column == "string") column = Number(column);
// @ts-ignore // @ts-ignore
window.onerror(error.message, src, line, column, error); window.onerror(error.message, src, line, column, error);
} catch (e) { } catch (e) {
window.onerror(error.message, '', 0, 0, error); window.onerror(error.message, "", 0, 0, error);
} }
} }
} }
@ -126,28 +132,33 @@
</script> </script>
<script> <script>
"use strict"; "use strict";
if (location.href.startsWith('http') && typeof window.initReadWriteFunction != 'function' && !window.require && !window.__dirname) { if (
location.href.startsWith("http") &&
typeof window.initReadWriteFunction != "function" &&
!window.require &&
!window.__dirname
) {
window.initReadWriteFunction = async function (game) { window.initReadWriteFunction = async function (game) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
fetch(`./readFile?fileName=noname.js`) fetch(`./readFile?fileName=noname.js`)
.then(response => { .then((response) => {
return response.json(); return response.json();
}) })
.then(result => { .then((result) => {
if (result && result.success) callback(); if (result && result.success) callback();
else reject(result.errorMsg) else reject(result.errorMsg);
}) })
.catch(reject); .catch(reject);
function callback() { function callback() {
game.readFile = function (fileName, callback = () => {}, error = () => {}) { game.readFile = function (fileName, callback = () => {}, error = () => {}) {
fetch(`./readFile?fileName=${fileName}`) fetch(`./readFile?fileName=${fileName}`)
.then(response => { .then((response) => {
return response.json(); return response.json();
}) })
.then(result => { .then((result) => {
if (result && result.success) callback(new Uint8Array(result.data).buffer); if (result && result.success)
callback(new Uint8Array(result.data).buffer);
else error(result && result.errorMsg); else error(result && result.errorMsg);
}) })
.catch(error); .catch(error);
@ -155,10 +166,10 @@
game.readFileAsText = function (fileName, callback = () => {}, error = () => {}) { game.readFileAsText = function (fileName, callback = () => {}, error = () => {}) {
fetch(`./readFileAsText?fileName=${fileName}`) fetch(`./readFileAsText?fileName=${fileName}`)
.then(response => { .then((response) => {
return response.json(); return response.json();
}) })
.then(result => { .then((result) => {
if (result && result.success) callback(result.data); if (result && result.success) callback(result.data);
else error(result && result.errorMsg); else error(result && result.errorMsg);
}) })
@ -167,35 +178,37 @@
game.writeFile = function (data, path, name, callback = () => {}) { game.writeFile = function (data, path, name, callback = () => {}) {
game.ensureDirectory(path, function () { game.ensureDirectory(path, function () {
if (Object.prototype.toString.call(data) == '[object File]') { if (Object.prototype.toString.call(data) == "[object File]") {
const fileReader = new FileReader(); const fileReader = new FileReader();
fileReader.onload = function (e) { fileReader.onload = function (e) {
game.writeFile(e.target.result, path, name, callback); game.writeFile(e.target.result, path, name, callback);
}; };
fileReader.readAsArrayBuffer(data, "UTF-8"); fileReader.readAsArrayBuffer(data, "UTF-8");
} } else {
else {
let filePath = path; let filePath = path;
if (path.endsWith('/')) { if (path.endsWith("/")) {
filePath += name; filePath += name;
} else if (path == "") { } else if (path == "") {
filePath += name; filePath += name;
} else { } else {
filePath += '/' + name; filePath += "/" + name;
} }
fetch(`./writeFile`, { fetch(`./writeFile`, {
method: 'post', method: "post",
headers: { "Content-Type": "application/json" }, headers: { "Content-Type": "application/json" },
body: JSON.stringify({ body: JSON.stringify({
data: typeof data == 'string' ? data : Array.prototype.slice.call(new Uint8Array(data)), data:
path: filePath typeof data == "string"
? data
: Array.prototype.slice.call(new Uint8Array(data)),
path: filePath,
}),
}) })
}) .then((response) => {
.then(response => {
return response.json(); return response.json();
}) })
.then(result => { .then((result) => {
if (result && result.success) { if (result && result.success) {
callback(); callback();
} else { } else {
@ -208,23 +221,29 @@
game.removeFile = function (fileName, callback = () => {}) { game.removeFile = function (fileName, callback = () => {}) {
fetch(`./removeFile?fileName=${fileName}`) fetch(`./removeFile?fileName=${fileName}`)
.then(response => { .then((response) => {
return response.json(); return response.json();
}) })
.then(result => { .then((result) => {
callback(result.errorMsg); callback(result.errorMsg);
}) })
.catch(error); .catch(error);
}; };
game.getFileList = function (dir, callback = () => { }) { game.getFileList = function (dir, callback = () => {}, onerror) {
fetch(`./getFileList?dir=${dir}`) fetch(`./getFileList?dir=${dir}`)
.then(response => { .then((response) => {
return response.json(); return response.json();
}) })
.then(result => { .then((result) => {
if (result && result.success) { if (!result) {
callback(result.data.dirs, result.data.files); throw new Error("Cannot get available resource.");
}
if (result.success) {
callback(result.data.folders, result.data.files);
} else if (onerror) {
onerror(new Error(result.errorMsg));
} }
}); });
}; };
@ -237,31 +256,39 @@
game.createDir(pathArray.join("/"), callback, console.error); game.createDir(pathArray.join("/"), callback, console.error);
}; };
game.createDir = (directory, successCallback = () => { }, errorCallback = () => { }) => { game.createDir = (
directory,
successCallback = () => {},
errorCallback = () => {}
) => {
fetch(`./createDir?dir=${directory}`) fetch(`./createDir?dir=${directory}`)
.then(response => { .then((response) => {
return response.json(); return response.json();
}) })
.then(result => { .then((result) => {
if (result && result.success) { if (result && result.success) {
successCallback(); successCallback();
} else { } else {
errorCallback(new Error('创建文件夹失败')) errorCallback(new Error("创建文件夹失败"));
}; }
}) })
.catch(errorCallback); .catch(errorCallback);
}; };
game.removeDir = (directory, successCallback = () => { }, errorCallback = () => { }) => { game.removeDir = (
directory,
successCallback = () => {},
errorCallback = () => {}
) => {
fetch(`./removeDir?dir=${directory}`) fetch(`./removeDir?dir=${directory}`)
.then(response => { .then((response) => {
return response.json(); return response.json();
}) })
.then(result => { .then((result) => {
if (result && result.success) { if (result && result.success) {
successCallback(); successCallback();
} else { } else {
errorCallback(new Error('创建文件夹失败')) errorCallback(new Error("创建文件夹失败"));
}; }
}) })
.catch(errorCallback); .catch(errorCallback);
}; };

43
layout/default/toast.css Normal file
View File

@ -0,0 +1,43 @@
.toast-container {
display: block;
position: absolute;
top: 15%;
left: 50%;
transform: translateX(-50%);
z-index: 9999;
}
.toast {
display: block;
position: absolute;
left: 50%;
transform: translateX(-50%);
background-color: rgba(255, 165, 0, 0.7);
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
color: white;
font-weight: bold;
padding: 10px 20px;
text-align: center;
white-space: nowrap;
width: max-content;
animation: fadeInOut 1500ms ease-in-out forwards;
}
@keyframes fadeInOut {
0% {
opacity: 0;
}
20% {
opacity: 1;
}
80% {
opacity: 1;
}
100% {
opacity: 0;
}
}

View File

@ -1718,7 +1718,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
ui.cheat2 = ui.create.control("自由选将", function () { ui.cheat2 = ui.create.control("自由选将", function () {
if (this.dialog == _status.event.dialog) { if (this.dialog == _status.event.dialog) {
if (game.changeCoin) { if (game.changeCoin) {
game.changeCoin(50); game.changeCoin(10);
} }
this.dialog.close(); this.dialog.close();
_status.event.dialog = this.backup; _status.event.dialog = this.backup;

View File

@ -3420,7 +3420,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
ui.cheat2 = ui.create.control("自由选将", function () { ui.cheat2 = ui.create.control("自由选将", function () {
if (this.dialog == _status.event.dialog) { if (this.dialog == _status.event.dialog) {
if (game.changeCoin) { if (game.changeCoin) {
game.changeCoin(50); game.changeCoin(10);
} }
this.dialog.close(); this.dialog.close();
_status.event.dialog = this.backup; _status.event.dialog = this.backup;

View File

@ -4306,7 +4306,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
ui.cheat2 = ui.create.control("自由选将", function () { ui.cheat2 = ui.create.control("自由选将", function () {
if (this.dialog == _status.event.dialog) { if (this.dialog == _status.event.dialog) {
if (game.changeCoin) { if (game.changeCoin) {
game.changeCoin(50); game.changeCoin(10);
} }
this.dialog.close(); this.dialog.close();
_status.event.dialog = this.backup; _status.event.dialog = this.backup;

View File

@ -1094,7 +1094,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
ui.cheat2 = ui.create.control("自由选将", function () { ui.cheat2 = ui.create.control("自由选将", function () {
if (this.dialog == _status.event.dialog) { if (this.dialog == _status.event.dialog) {
if (game.changeCoin) { if (game.changeCoin) {
game.changeCoin(50); game.changeCoin(10);
} }
this.dialog.close(); this.dialog.close();
_status.event.dialog = this.backup; _status.event.dialog = this.backup;

View File

@ -22429,7 +22429,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
ui.cheat2 = ui.create.control("自由选将", function () { ui.cheat2 = ui.create.control("自由选将", function () {
if (this.dialog == _status.event.dialog) { if (this.dialog == _status.event.dialog) {
if (game.changeCoin) { if (game.changeCoin) {
game.changeCoin(50); game.changeCoin(10);
} }
this.dialog.close(); this.dialog.close();
_status.event.dialog = this.backup; _status.event.dialog = this.backup;

View File

@ -2303,7 +2303,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
ui.cheat2 = ui.create.control("自由选将", function () { ui.cheat2 = ui.create.control("自由选将", function () {
if (this.dialog == _status.event.dialog) { if (this.dialog == _status.event.dialog) {
if (game.changeCoin) { if (game.changeCoin) {
game.changeCoin(50); game.changeCoin(10);
} }
this.dialog.close(); this.dialog.close();
_status.event.dialog = this.backup; _status.event.dialog = this.backup;

View File

@ -2486,7 +2486,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
ui.cheat2 = ui.create.control("自由选将", function () { ui.cheat2 = ui.create.control("自由选将", function () {
if (this.dialog == _status.event.dialog) { if (this.dialog == _status.event.dialog) {
if (game.changeCoin) { if (game.changeCoin) {
game.changeCoin(50); game.changeCoin(10);
} }
this.dialog.close(); this.dialog.close();
_status.event.dialog = this.backup; _status.event.dialog = this.backup;

View File

@ -841,7 +841,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
ui.cheat2 = ui.create.control("自由选将", function () { ui.cheat2 = ui.create.control("自由选将", function () {
if (this.dialog == _status.event.dialog) { if (this.dialog == _status.event.dialog) {
if (game.changeCoin) { if (game.changeCoin) {
game.changeCoin(50); game.changeCoin(10);
} }
this.dialog.close(); this.dialog.close();
_status.event.dialog = this.backup; _status.event.dialog = this.backup;
@ -1115,7 +1115,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
ui.cheat2 = ui.create.control("自由选将", function () { ui.cheat2 = ui.create.control("自由选将", function () {
if (this.dialog == _status.event.dialog) { if (this.dialog == _status.event.dialog) {
if (game.changeCoin) { if (game.changeCoin) {
game.changeCoin(50); game.changeCoin(10);
} }
this.dialog.close(); this.dialog.close();
_status.event.dialog = this.backup; _status.event.dialog = this.backup;
@ -1446,7 +1446,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
ui.cheat2 = ui.create.control("自由选将", function () { ui.cheat2 = ui.create.control("自由选将", function () {
if (this.dialog == _status.event.dialog) { if (this.dialog == _status.event.dialog) {
if (game.changeCoin) { if (game.changeCoin) {
game.changeCoin(50); game.changeCoin(10);
} }
this.dialog.close(); this.dialog.close();
_status.event.dialog = this.backup; _status.event.dialog = this.backup;
@ -1637,7 +1637,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
ui.cheat2 = ui.create.control("自由选将", function () { ui.cheat2 = ui.create.control("自由选将", function () {
if (this.dialog == _status.event.dialog) { if (this.dialog == _status.event.dialog) {
if (game.changeCoin) { if (game.changeCoin) {
game.changeCoin(50); game.changeCoin(10);
} }
this.dialog.close(); this.dialog.close();
_status.event.dialog = this.backup; _status.event.dialog = this.backup;

View File

@ -37,7 +37,12 @@ declare interface Result {
* card参数特供给视为牌cards[0] * card参数特供给视为牌cards[0]
* card.isCardfalse为视为牌 * card.isCardfalse为视为牌
*/ */
card: Card; card: Card | CardBaseUIData;
cost_data: {
[key: string]: any;
};
[key: string]: any; [key: string]: any;
} }

View File

@ -442,7 +442,7 @@ declare interface Skill {
* *
* checkcheck方法检测 * checkcheck方法检测
*/ */
frequent?: boolean | string | TwoParmFun<SkillTrigger, Player, number | boolean>; frequent?: boolean | string | TwoParmFun<GameEventPromise, Player, number | boolean>;
/** /**
* 2 * 2
* *
@ -1285,7 +1285,7 @@ declare interface Skill {
* *
* @param target v1.10.11 * @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显示触发者的目标日志 * logTarget显示触发者的目标日志
* *

View File

@ -1,8 +1,8 @@
export { GNC, gnc, setGNC } from './noname/gnc/index.js'; export { boot } from "./noname/init/index.js";
export { AI, ai, setAI } from './noname/ai/index.js'; export { GNC, gnc, setGNC } from "./noname/gnc/index.js";
export { Game, game, setGame } from './noname/game/index.js'; export { AI, ai, setAI } from "./noname/ai/index.js";
export { Get, get, setGet } from './noname/get/index.js'; export { Game, game, setGame } from "./noname/game/index.js";
export { Library, lib, setLibrary } from './noname/library/index.js'; export { Get, get, setGet } from "./noname/get/index.js";
export { status, _status, setStatus } from './noname/status/index.js'; export { Library, lib, setLibrary } from "./noname/library/index.js";
export { UI, ui, setUI } from './noname/ui/index.js'; export { status, _status, setStatus } from "./noname/status/index.js";
export { boot } from './noname/init/index.js'; export { UI, ui, setUI } from "./noname/ui/index.js";

View File

@ -5,7 +5,7 @@ export class Basic {
* buttons?: Button[] * buttons?: Button[]
* ) => number } check * ) => number } check
*/ */
chooseButton(check: (button: any, buttons?: Button[]) => number): boolean | undefined; chooseButton(check: (button: Button, buttons?: Button[]) => number): boolean | undefined;
/** /**
* @param { ( * @param { (
* card?: Card, * card?: Card,
@ -13,12 +13,12 @@ export class Basic {
* ) => number } check * ) => number } check
* @returns { boolean | undefined } * @returns { boolean | undefined }
*/ */
chooseCard(check: (card?: any, cards?: Card[]) => number): boolean | undefined; chooseCard(check: (card?: Card, cards?: Card[]) => number): boolean | undefined;
/** /**
* @param { ( * @param { (
* target?: Player, * target?: Player,
* targets?: Player[] * targets?: Player[]
* ) => number } check * ) => number } check
*/ */
chooseTarget(check: (target?: any, targets?: Player[]) => number): boolean | undefined; chooseTarget(check: (target?: Player, targets?: Player[]) => number): boolean | undefined;
} }

View File

@ -5,4 +5,4 @@ export class AI {
export let ai: AI; export let ai: AI;
export function setAI(instance?: AI | undefined): void; export function setAI(instance?: AI | undefined): void;
export { Basic }; export { Basic };
import { Basic } from './basic.js'; import { Basic } from "./basic.js";

View File

@ -15,7 +15,7 @@ export class Game {
* @type { { [key: string]: Player } } * @type { { [key: string]: Player } }
*/ */
playerMap: { playerMap: {
[key: string]: any; [key: string]: import("noname-typings/nonameModules/noname/library/element/player.js").Player;
}; };
phaseNumber: number; phaseNumber: number;
roundNumber: number; roundNumber: number;
@ -28,11 +28,15 @@ export class Game {
/** /**
* @type { Player } * @type { Player }
*/ */
me: any; me: Player;
/** /**
* @type { boolean } * @type { boolean }
*/ */
chess: boolean; chess: boolean;
/**
* @type { Player }
*/
zhu: Player;
globalEventHandlers: { globalEventHandlers: {
_handlers: {}; _handlers: {};
getHandler(name: any, type: any): any; getHandler(name: any, type: any): any;
@ -173,19 +177,19 @@ export class Game {
/** /**
* @template { keyof GameHistory } T * @template { keyof GameHistory } T
* @param { T } key * @param { T } key
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter * @param { (event: GameEventPromise) => boolean } filter
* @param { import('../library/index.js').GameEventPromise } [last] * @param { GameEventPromise } [last]
* @returns { boolean } * @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 * @template { keyof GameHistory } T
* @param { T } key * @param { T } key
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter * @param { (event: GameEventPromise) => boolean } filter
* @param { import('../library/index.js').GameEventPromise } [last] * @param { GameEventPromise } [last]
* @returns { void } * @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 * @overload
* @returns { GameHistory } * @returns { GameHistory }
@ -195,27 +199,27 @@ export class Game {
* @template { keyof GameHistory } T * @template { keyof GameHistory } T
* @overload * @overload
* @param { T } key * @param { T } key
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } [filter] * @param { (event: GameEventPromise) => boolean } [filter]
* @param { import('../library/index.js').GameEventPromise } [last] * @param { GameEventPromise } [last]
* @returns { GameHistory[T] } * @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 * @template { keyof GameHistory } T
* @param { T } key * @param { T } key
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter * @param { (event: GameEventPromise) => boolean } filter
* @param { import('../library/index.js').GameEventPromise } [last] * @param { GameEventPromise } [last]
* @returns { boolean } * @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 * @template { keyof GameHistory } T
* @param { T } key * @param { T } key
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter * @param { (event: GameEventPromise) => boolean } filter
* @param { import('../library/index.js').GameEventPromise } [last] * @param { GameEventPromise } [last]
* @returns { void } * @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 * @overload
* @returns { GameHistory[] } * @returns { GameHistory[] }
@ -225,11 +229,11 @@ export class Game {
* @template { keyof GameHistory } T * @template { keyof GameHistory } T
* @overload * @overload
* @param { T } key * @param { T } key
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } [filter] * @param { (event: GameEventPromise) => boolean } [filter]
* @param { import('../library/index.js').GameEventPromise } [last] * @param { GameEventPromise } [last]
* @returns { GameHistory[T] } * @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 * @overload
* @returns { void } * @returns { void }
@ -238,15 +242,15 @@ export class Game {
/** /**
* @overload * @overload
* @param { Card } cards * @param { Card } cards
* @returns { import('../library/index.js').GameEventPromise } * @returns { GameEventPromise }
*/ */
cardsDiscard(cards: any): import('../library/index.js').GameEventPromise; cardsDiscard(cards: Card): GameEventPromise;
/** /**
* @overload * @overload
* @param {Card[]} cards * @param {Card[]} cards
* @returns { import('../library/index.js').GameEventPromise } * @returns { GameEventPromise }
*/ */
cardsDiscard(cards: Card[]): import('../library/index.js').GameEventPromise; cardsDiscard(cards: Card[]): GameEventPromise;
/** /**
* @overload * @overload
* @returns { void } * @returns { void }
@ -255,15 +259,15 @@ export class Game {
/** /**
* @overload * @overload
* @param { Card } cards * @param { Card } cards
* @returns { import('../library/index.js').GameEventPromise } * @returns { GameEventPromise }
*/ */
cardsGotoOrdering(cards: any): import('../library/index.js').GameEventPromise; cardsGotoOrdering(cards: Card): GameEventPromise;
/** /**
* @overload * @overload
* @param {Card[]} cards * @param {Card[]} cards
* @returns { import('../library/index.js').GameEventPromise } * @returns { GameEventPromise }
*/ */
cardsGotoOrdering(cards: Card[]): import('../library/index.js').GameEventPromise; cardsGotoOrdering(cards: Card[]): GameEventPromise;
/** /**
* @overload * @overload
* @returns { void } * @returns { void }
@ -273,16 +277,16 @@ export class Game {
* @overload * @overload
* @param { Card } cards * @param { Card } cards
* @param { 'toRenku' | false } [bool] false时不触发trigger'toRenku' * @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 * @overload
* @param {Card[]} cards * @param {Card[]} cards
* @param { 'toRenku' | false } [bool] false时不触发trigger'toRenku' * @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 {...( * @param {...(
@ -299,9 +303,9 @@ export class Game {
any any
])[]): import("../library/element/gameEvent.js").GameEvent & import("../library/element/gameEventPromise.js").GameEventPromise; ])[]): 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] * @param { false } [pause]
*/ */
@ -316,16 +320,22 @@ export class Game {
* @param { string } url * @param { string } url
* @param { Player } [player] * @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 { string[] } updates
* @param { Function } proceed * @param { Function } proceed
*/ */
checkFileList(updates: string[], proceed: Function): void; 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 * @param { string } name
*/ */
@ -344,7 +354,7 @@ export class Game {
* @param { ...Parameters<typeof lib.message.client[T]> } args * @param { ...Parameters<typeof lib.message.client[T]> } args
* @returns { void } * @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; log: (arr: any) => void;
opened: () => void; opened: () => void;
onconnection: (id: any) => void; onconnection: (id: any) => void;
@ -376,7 +386,7 @@ export class Game {
* @param { ...T } args * @param { ...T } args
* @returns { void } * @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 * @template { keyof typeof lib.message.client } T
* @overload * @overload
@ -384,7 +394,7 @@ export class Game {
* @param { ...Parameters<typeof lib.message.client[T]> } args * @param { ...Parameters<typeof lib.message.client[T]> } args
* @returns { void } * @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; log: (arr: any) => void;
opened: () => void; opened: () => void;
onconnection: (id: any) => void; onconnection: (id: any) => void;
@ -416,7 +426,7 @@ export class Game {
* @param { ...T } args * @param { ...T } args
* @returns { void } * @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; syncState(): void;
updateWaiting(): void; updateWaiting(): void;
/** /**
@ -484,7 +494,7 @@ export class Game {
* //如果key中包含发动技能的角色名player则直接改用info.audioname2[player]来播放语音 * //如果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]; audio: string | number | boolean | [string, number];
audioname?: string[] | undefined; audioname?: string[] | undefined;
audioname2?: { audioname2?: {
@ -838,7 +848,7 @@ export class Game {
* @param { any } [content] * @param { any } [content]
* @returns * @returns
*/ */
addVideo(type: string, player: any, content?: any): void; addVideo(type: string, player: Player, content?: any): void;
/** /**
* @param { Function } func * @param { Function } func
*/ */
@ -876,18 +886,18 @@ export class Game {
* @param { string } name * @param { string } name
* @param { string } skill * @param { string } skill
* @param { Player } player * @param { Player } player
* @param { import('../library/index.js').GameEventPromise } event * @param { GameEventPromise } event
* @returns { import('../library/index.js').GameEventPromise } * @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. * @legacy Use {@link lib.element.GameEvent.constructor} instead.
* *
* @param { string } name * @param { string } name
* @param { false } [trigger] * @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 { string } name
* @param { { extension: string, sex: Sex, group: string, hp: string | number, skills?: string[], tags?: any[], translate: string } } information * @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 { Card } info
* @param { { extension: string, translate: string, description: string, number?: number, color?: string } } info2 * @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; extension: string;
translate: string; translate: string;
description: string; description: string;
@ -938,7 +948,7 @@ export class Game {
forbid?: string[] | undefined; forbid?: string[] | undefined;
list: any[]; list: any[];
card: { card: {
[key: string]: any; [key: string]: import("noname-typings/nonameModules/noname/library/element/card.js").Card;
}; };
skill: { skill: {
[key: string]: any; [key: string]: any;
@ -970,7 +980,7 @@ export class Game {
* @param { string } skill * @param { string } skill
* @param { Player } [player] * @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 { string } skill
* @param { lib.element.Player } player * @param { lib.element.Player } player
@ -980,7 +990,7 @@ export class Game {
/** /**
* @param { string } extensionName * @param { string } extensionName
*/ */
hasExtension(extensionName: string): any; hasExtension(extensionName: string): boolean;
/** /**
* @param { string } extensionName * @param { string } extensionName
*/ */
@ -988,7 +998,7 @@ export class Game {
/** /**
* @param { string } extensionName * @param { string } extensionName
*/ */
hasExtensionLoaded(extensionName: string): any; hasExtensionLoaded(extensionName: string): boolean;
/** /**
* @param { string } extensionName * @param { string } extensionName
* @param { Function } runnable * @param { Function } runnable
@ -1004,7 +1014,7 @@ export class Game {
* @overload * @overload
* @returns { Card } * @returns { Card }
*/ */
createCard(): any; createCard(): Card;
/** /**
* @overload * @overload
* @param { Card | string } name * @param { Card | string } name
@ -1017,7 +1027,7 @@ export class Game {
* @overload * @overload
* @returns { Card } * @returns { Card }
*/ */
createCard2(): any; createCard2(): Card;
/** /**
* @overload * @overload
* @param { Card | string } name * @param { Card | string } name
@ -1046,17 +1056,17 @@ export class Game {
*/ */
executingAsyncEventMap: Map<GameEvent, Promise<any>>; 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; pause(): void;
pause2(): void; pause2(): void;
resume(): void; resume(): void;
@ -1092,9 +1102,9 @@ export class Game {
*/ */
asyncDelayx(time?: number | undefined, time2?: number | undefined): Promise<void>; 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; Check: Check;
uncheck(...args: any[]): void; uncheck(...args: any[]): void;
/** /**
@ -1104,21 +1114,21 @@ export class Game {
* @param { boolean } [behind] * @param { boolean } [behind]
* @param { boolean } [noanimate] * @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 } player1
* @param { Player } [player2] * @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 * @param { Player } player
*/ */
swapControl(player: any): void; swapControl(player: Player): void;
swapPlayerAuto(player: any): void; swapPlayerAuto(player: any): void;
/** /**
* @param { Player } player * @param { Player } player
*/ */
findNext(player: any): any; findNext(player: Player): import("noname-typings/nonameModules/noname/library/element/player.js").Player;
/** /**
* @param { string } name * @param { string } name
* @param { Function } callback * @param { Function } callback
@ -1140,20 +1150,20 @@ export class Game {
/** /**
* @param { Player } player * @param { Player } player
*/ */
phaseLoop(player: any): void; phaseLoop(player: Player): void;
/** /**
* @param { Player } [player] * @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; chooseCharacterDouble(...args: any[]): void;
updateRoundNumber(): void; updateRoundNumber(): void;
/** /**
* @param { Player[] } players * @param { Player[] } players
* @param { number | number[] | (player: Player) => number } num * @param { number | number[] | (player: Player) => number } [num]
* @param { { drawDeck: boolean } } [drawDeck] * @param { { drawDeck: boolean } } [drawDeck]
* @param { boolean } [bottom] * @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; drawDeck: boolean;
} | undefined, bottom?: boolean | undefined): void; } | undefined, bottom?: boolean | undefined): void;
/** /**
@ -1161,7 +1171,7 @@ export class Game {
* @param { number | number[] | (player: Player) => number } num * @param { number | number[] | (player: Player) => number } num
* @param { { drawDeck: boolean } } [drawDeck] * @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; drawDeck: boolean;
} | undefined, ...args: any[]): void; } | undefined, ...args: any[]): void;
finishSkill(i: any, sub: any): void; finishSkill(i: any, sub: any): void;
@ -1181,11 +1191,11 @@ export class Game {
* @param { Player } player * @param { Player } player
* @param { string | Card[] } card * @param { string | Card[] } card
* @param { Player[] } [targets] * @param { Player[] } [targets]
* @param { import('../library/index.js').GameEventPromise } [event] * @param { GameEventPromise } [event]
* @param { boolean } [forced] * @param { boolean } [forced]
* @param { string } [logvid] * @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 } storeName
* @param { string } idbValidKey * @param { string } idbValidKey
@ -1267,28 +1277,28 @@ export class Game {
/** /**
* @param { Player } player * @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 * @param { Player } player
*/ */
restorePlayer(player: any): any; restorePlayer(player: Player): import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined;
/** /**
* @param { Player } player * @param { Player } player
*/ */
removePlayer(player: any): any; removePlayer(player: Player): import("noname-typings/nonameModules/noname/library/element/player.js").Player;
/** /**
* @param { Player } player * @param { Player } player
* @param { string } [character] * @param { string } [character]
* @param { string } [character2] * @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; arrangePlayers(): void;
/** /**
* @param { string[] } skills * @param { string[] } skills
* @param { Player } player * @param { Player } player
* @param { string[] } exclude * @param { string[] } exclude
*/ */
filterSkills(skills: string[], player: any, exclude: string[]): string[]; filterSkills(skills: string[], player: Player, exclude: string[]): string[];
/** /**
* @param { string[] } skills * @param { string[] } skills
*/ */
@ -1303,22 +1313,22 @@ export class Game {
* @param { (player: Player) => boolean } func * @param { (player: Player) => boolean } func
* @param { boolean } [includeOut] * @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 { (player: Player) => boolean } func
* @param { boolean } [includeOut] * @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 { (player: Player) => boolean } func
* @param { boolean } [includeOut] * @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 { (player: Player) => boolean } func
* @param { boolean } [includeOut] * @param { boolean } [includeOut]
*/ */
countPlayer2(func: (player: any) => boolean, includeOut?: boolean | undefined): any; countPlayer2(func: (player: Player) => boolean, includeOut?: boolean | undefined): number;
/** /**
* @overload * @overload
* @returns { Player[] } * @returns { Player[] }
@ -1331,7 +1341,7 @@ export class Game {
* @param { boolean } [includeOut] * @param { boolean } [includeOut]
* @returns { Player[] } * @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 * @overload
* @returns { Player[] } * @returns { Player[] }
@ -1344,23 +1354,23 @@ export class Game {
* @param { boolean } [includeOut] * @param { boolean } [includeOut]
* @returns { Player[] } * @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 { (player: Player) => boolean } func
* @param { boolean } [includeOut] * @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 { (player: Player) => boolean } func
* @param { boolean } [includeOut] * @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 { (player: Player) => boolean } func
* @param { boolean } [all] * @param { boolean } [all]
*/ */
findCards(func: (player: any) => boolean, all?: boolean | undefined): string[]; findCards(func: (player: Player) => boolean, all?: boolean | undefined): string[];
countGroup(): any; countGroup(): number;
/** /**
* *
* @param {function} * @param {function}
@ -1374,7 +1384,7 @@ export class Game {
* @param { (player: Player, i: number) => Promise<any | void> } asyncFunc async方法 * @param { (player: Player, i: number) => Promise<any | void> } asyncFunc async方法
* @param { (a: Player, b: Player) => number } sort lib.sort.seat * @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 let game: Game;
export function setGame(instance?: Game | undefined): void; export function setGame(instance?: Game | undefined): void;
@ -1403,6 +1413,6 @@ export type Videos = {
}; };
import { GamePromises } from "./promises.js"; import { GamePromises } from "./promises.js";
import { DynamicStyle } from "./dynamic-style/index.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 { Check } from "./check.js";
import { delay } from "../util/index.js"; import { delay } from "../util/index.js";

View File

@ -25,7 +25,11 @@ export class GamePromises {
*/ */
alert(title: string): Promise<true>; alert(title: string): Promise<true>;
download(url: any, folder: any, dev: any, onprogress: any): Promise<any>; 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>; readFileAsText(filename: any): Promise<any>;
writeFile(data: any, path: any, name: any): Promise<any>; writeFile(data: any, path: any, name: any): Promise<any>;
ensureDirectory(list: any, callback: any, file: any): Promise<any>; ensureDirectory(list: any, callback: any, file: any): Promise<any>;

View File

@ -74,7 +74,7 @@ export class Get {
* @param { false | Player } [player] * @param { false | Player } [player]
* @returns { string[] } * @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[] } * @returns { string[] }
*/ */
@ -90,7 +90,7 @@ export class Get {
* @param { Player } player * @param { Player } player
* @returns { string[] } * @returns { string[] }
*/ */
skillCategoriesOf(skill: string, player: any): string[]; skillCategoriesOf(skill: string, player: Player): string[];
numOf(obj: any, item: any): any; numOf(obj: any, item: any): any;
connectNickname(): any; connectNickname(): any;
zhinangs(filter: any): any; zhinangs(filter: any): any;
@ -99,7 +99,7 @@ export class Get {
infoHp(hp: any): number; infoHp(hp: any): number;
infoMaxHp(hp: any): number; infoMaxHp(hp: any): number;
infoHujia(hp: any): number; infoHujia(hp: any): number;
bottomCards(num: any, putBack: any): any; bottomCards(num: any, putBack: any): Node | Node[];
discarded(): any; discarded(): any;
cardOffset(): number; cardOffset(): number;
colorspan(str: any): any; colorspan(str: any): any;
@ -175,7 +175,7 @@ export class Get {
charactersOL(func: any): number[]; charactersOL(func: any): number[];
trimip(str: any): any; trimip(str: any): any;
mode(): any; mode(): any;
idDialog(id: any): any; idDialog(id: any): import("noname-typings/nonameModules/noname/library/element/dialog.js").Dialog | null;
arenaState(): { arenaState(): {
number: string | undefined; number: string | undefined;
players: {}; 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"; 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; skillRank(skill: any, type: any, grouped: any): number;
targetsInfo(targets: any): any[]; 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[]; cardInfo(card: any): any[];
cardsInfo(cards?: any[]): any[][]; cardsInfo(cards?: any[]): any[][];
infoCard(info: any): import("../library/element/card.js").Card; infoCard(info: any): import("../library/element/card.js").Card;
@ -279,25 +279,25 @@ export class Get {
* @param { Button } obj * @param { Button } obj
* @returns { 'button' } * @returns { 'button' }
*/ */
itemtype(obj: any): 'button'; itemtype(obj: Button): 'button';
/** /**
* @overload * @overload
* @param { Card } obj * @param { Card } obj
* @returns { 'card' } * @returns { 'card' }
*/ */
itemtype(obj: any): 'card'; itemtype(obj: Card): 'card';
/** /**
* @overload * @overload
* @param { Player } obj * @param { Player } obj
* @returns { 'player' } * @returns { 'player' }
*/ */
itemtype(obj: any): 'player'; itemtype(obj: Player): 'player';
/** /**
* @overload * @overload
* @param { Dialog } obj * @param { Dialog } obj
* @returns { 'dialog' } * @returns { 'dialog' }
*/ */
itemtype(obj: any): 'dialog'; itemtype(obj: Dialog): 'dialog';
/** /**
* @overload * @overload
* @param { GameEvent | GameEventPromise } obj * @param { GameEvent | GameEventPromise } obj
@ -314,7 +314,7 @@ export class Get {
* @param { false | Player } [player] * @param { false | Player } [player]
* @returns { string } * @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; equiptype(card: any, player: any): number;
/** /**
* *
@ -322,40 +322,40 @@ export class Get {
* @param { false | Player } [player] * @param { false | Player } [player]
* @returns { string } * @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 {Card | VCard | Card[] | VCard[]} card
* @param {false | Player} [player] * @param {false | Player} [player]
* @returns {string} * @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 {Card | VCard | Card[] | VCard[]} card
* @param {false | Player} [player] * @param {false | Player} [player]
* @returns {string} * @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 {Card | VCard} card
* @param {false | Player} [player] * @param {false | Player} [player]
* @returns {number} * @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` * `lib.natureSeparator``fire|thunder`
* @param {string | string[] | Card | VCard} card * @param {string | string[] | Card | VCard} card
* @param {false | Player} [player] * @param {false | Player} [player]
* @returns {string} * @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 {string[] | string} card
* @param {false | Player} [player] * @param {false | Player} [player]
* @returns {string[]} * @returns {string[]}
*/ */
natureList(card: string[] | string, player?: false | Player): string[]; natureList(card: string[] | string, player?: false | import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): string[];
cards(num: any, putBack: any): any; cards(num: any, putBack: any): Node | Node[];
judge(card: any): any; judge(card: any): any;
judge2(card: any): any; judge2(card: any): any;
distance(from: any, to: any, method: any): number; distance(from: any, to: any, method: any): number;
@ -371,7 +371,7 @@ export class Get {
* @param { Player | false } [player] * @param { Player | false } [player]
* @returns { any } * @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] * @param { number | Select | (()=>Select) } [select]
* @returns { Select } * @returns { Select }
@ -382,16 +382,16 @@ export class Get {
* @overload * @overload
* @returns {GameEvent} * @returns {GameEvent}
*/ */
event(): any; event(): GameEvent;
/** /**
* @template { keyof GameEvent } T * @template { keyof GameEvent } T
* @overload * @overload
* @param {T} key * @param {T} key
* @returns {GameEvent[T]} * @returns {GameEvent[T]}
*/ */
event<T_2 extends string | number | symbol>(key: T_2): 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(): any; player(): import("noname-typings/nonameModules/noname/library/element/player.js").Player;
players(sort: any, dead: any, out: any): any[]; players(sort: any, dead: any, out: any): import("noname-typings/nonameModules/noname/library/element/player.js").Player[];
position(card: any, ordering: any): number | "e" | "j" | "x" | "s" | "h" | "c" | "d" | "o" | null | undefined; position(card: any, ordering: any): number | "e" | "j" | "x" | "s" | "h" | "c" | "d" | "o" | null | undefined;
skillTranslation(str: any, player: any): string; skillTranslation(str: any, player: any): string;
skillInfoTranslation(name: any, player: any): any; skillInfoTranslation(name: any, player: any): any;
@ -412,12 +412,12 @@ export class Get {
* @param {((a: Button, b: Button) => number)} [sort] * @param {((a: Button, b: Button) => number)} [sort]
* @returns { Button[] } * @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] * @param {((a: Card, b: Card) => number)} [sort]
* @returns { Card[] } * @returns { Card[] }
*/ */
selectableCards(sort?: ((a: any, b: any) => number) | undefined): Card[]; selectableCards(sort?: ((a: Card, b: Card) => number) | undefined): Card[];
/** /**
* @returns { string[] } * @returns { string[] }
*/ */
@ -429,11 +429,11 @@ export class Get {
* @param {((a: Player, b: Player) => number)} [sort] * @param {((a: Player, b: Player) => number)} [sort]
* @returns { Player[] } * @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; filter(filter: any, i: any): any;
cardCount(card: any, player: any): any; cardCount(card: any, player: any): any;
skillCount(skill: 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; noSelected(): boolean;
population(identity: any): number; population(identity: any): number;
totalPopulation(identity: any): number; totalPopulation(identity: any): number;
@ -467,8 +467,8 @@ export class Get {
unuseful3(card: any): number; unuseful3(card: any): number;
value(card: any, player: any, method: any): any; value(card: any, player: any, method: any): any;
equipResult(player: any, target: any, name: any): number; equipResult(player: any, target: any, name: any): number;
equipValue(card: any, player: any): any; equipValue(card: any, player: any): number;
equipValueNumber(card: any): any; equipValueNumber(card: any): number;
disvalue(card: any, player: any): number; disvalue(card: any, player: any): number;
disvalue2(card: any, player: any): number; disvalue2(card: any, player: any): number;
skillthreaten(skill: any, player: any, target: any): number | void; skillthreaten(skill: any, player: any, target: any): number | void;
@ -476,7 +476,7 @@ export class Get {
/** /**
* @returns { number } * @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; result(item: any, skill: any): any;
cacheEffectUse(target: any, card: any, player: any, player2: any, isLink: any): number; 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; effect_use(target: any, card: any, player: any, player2: any, isLink: any): number;

View File

@ -5,14 +5,14 @@ export class Is {
* @param { false | Player } [player] * @param { false | Player } [player]
* @returns { boolean } * @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 { Card | VCard } card
* @param { false | Player } [player] * @param { false | Player } [player]
* @returns { boolean } * @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 } * @returns { boolean }
@ -34,7 +34,7 @@ export class Is {
* *
* @param { Card } card * @param { Card } card
*/ */
shownCard(card: any): boolean; shownCard(card: Card): boolean;
/** /**
* *
* @param { Card | VCard } card * @param { Card | VCard } card
@ -49,7 +49,7 @@ export class Is {
* *
* @param { Card | VCard } card * @param { Card | VCard } card
*/ */
ordinaryCard(card: Card | VCard): any; ordinaryCard(card: Card | VCard): boolean;
/** /**
* *
* @param { string } str1 * @param { string } str1
@ -61,7 +61,7 @@ export class Is {
* @param { Player } player * @param { Player } player
* @returns * @returns
*/ */
blocked(skill: string, player: any): boolean; blocked(skill: string, player: Player): boolean;
/** /**
* *
* @param { string } name * @param { string } name
@ -107,7 +107,7 @@ export class Is {
/** /**
* @param { GameEventPromise } event * @param { GameEventPromise } event
*/ */
converted(event: any): boolean; converted(event: GameEventPromise): boolean;
safari(): boolean; safari(): boolean;
/** /**
* @param { (Card | VCard)[]} cards * @param { (Card | VCard)[]} cards
@ -162,14 +162,14 @@ export class Is {
/** /**
* @param { Player } [player] * @param { Player } [player]
*/ */
mobileMe(player?: any): any; mobileMe(player?: import("noname-typings/nonameModules/noname/library/element/player.js").Player | undefined): boolean | undefined;
newLayout(): boolean; newLayout(): boolean;
phoneLayout(): boolean; phoneLayout(): boolean;
singleHandcard(): any; singleHandcard(): any;
/** /**
* @param { Player } player * @param { Player } player
*/ */
linked2(player: any): boolean; linked2(player: Player): boolean;
/** /**
* @param { {} } obj * @param { {} } obj
*/ */
@ -183,11 +183,11 @@ export class Is {
* @param { Player } player * @param { Player } player
* @returns * @returns
*/ */
locked(skill: string, player: any): any; locked(skill: string, player: Player): any;
/** /**
* @param { string } skill * @param { string } skill
* @param { Player } player * @param { Player } player
* @returns * @returns
*/ */
zhuanhuanji(skill: string, player: any): boolean; zhuanhuanji(skill: string, player: Player): boolean;
} }

View File

@ -14,4 +14,4 @@ export class Button extends HTMLDivElement {
exclude(): void; exclude(): void;
get updateTransform(): (bool: any, delay: any) => void; get updateTransform(): (bool: any, delay: any) => void;
} }
import { ui } from '../../ui/index.js'; import { ui } from "../../ui/index.js";

View File

@ -34,6 +34,10 @@ export class Card extends HTMLDivElement {
* @type { string } * @type { string }
*/ */
name: string; name: string;
/**
* @type { boolean }
*/
isCard: boolean;
selfDestroy(event: any): void; selfDestroy(event: any): void;
willBeDestroyed(targetPosition: any, player: any, event: any): any; willBeDestroyed(targetPosition: any, player: any, event: any): any;
hasNature(nature: any, player: any): boolean; hasNature(nature: any, player: any): boolean;

View File

@ -1,4 +1,4 @@
/** /**
* @type { SMap<((event: GameEventPromise, trigger: GameEventPromise, player: Player) => Promise<any>)[]> } * @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>)[]>;

View File

@ -22,14 +22,14 @@ export class Dialog extends HTMLDivElement {
* @param {*} [noclick] * @param {*} [noclick]
* @param { boolean } [zoom] * @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; forcebutton: boolean | undefined;
/** /**
* @param { string } str * @param { string } str
* @param { boolean } [center] * @param { boolean } [center]
*/ */
addText(str: string, center?: boolean | undefined): this; 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; addAuto(content: any): void;
open(): this | undefined; open(): this | undefined;
_dragtransform: any; _dragtransform: any;

View File

@ -43,15 +43,19 @@ export class GameEvent {
/** /**
* @type { Player } * @type { Player }
*/ */
source: any; source: Player;
/** /**
* @type { Player } * @type { Player }
*/ */
player: any; player: Player;
/**
* @type { Player[] }
*/
players: Player[];
/** /**
* @type { Player } * @type { Player }
*/ */
target: any; target: Player;
/** /**
* @type { Player[] } * @type { Player[] }
*/ */
@ -59,7 +63,7 @@ export class GameEvent {
/** /**
* @type { Card } * @type { Card }
*/ */
card: any; card: Card;
/** /**
* @type { Card[] } * @type { Card[] }
*/ */
@ -87,7 +91,7 @@ export class GameEvent {
/** /**
* @type { Player } * @type { Player }
*/ */
customSource: any; customSource: Player;
/** /**
* @type { number } * @type { number }
*/ */
@ -121,9 +125,37 @@ export class GameEvent {
*/ */
parent: GameEventPromise | void | null; 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 {keyof this} key
* @param {number} [value] * @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} [forced] {}forced为true则返回null
* @param {boolean} [includeSelf] level不是数字 * @param {boolean} [includeSelf] level不是数字
* @returns {GameEvent|{}|null} * @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; getTrigger(): any;
getRand(name: any): any; getRand(name: any): any;
_rand_map: {} | undefined; _rand_map: {} | undefined;
@ -267,8 +299,8 @@ export class GameEvent {
_cardChoice: any; _cardChoice: any;
_targetChoice: any; _targetChoice: any;
_skillChoice: any; _skillChoice: any;
isMine(): any; isMine(): boolean;
isOnline(): any; isOnline(): boolean;
notLink(): boolean; notLink(): boolean;
isPhaseUsing(player: any): boolean; isPhaseUsing(player: any): boolean;
addTrigger(skills: any, player: any): this; addTrigger(skills: any, player: any): this;

View File

@ -21,7 +21,7 @@
* game.log('等待', player, '摸牌完成执行log'); * 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 * @param { import('./gameEvent.js').GameEvent } arg
*/ */
@ -140,10 +140,6 @@ export class GameEventPromise extends Promise<any> {
* @returns { Promise<Exclude<Result[T], undefined>[]> } * @returns { Promise<Exclude<Result[T], undefined>[]> }
*/ */
forResult<T extends keyof Result>(params: T[]): 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项 * result中的bool项
*/ */
@ -151,11 +147,11 @@ export class GameEventPromise extends Promise<any> {
/** /**
* result中的targets项 * result中的targets项
*/ */
forResultTargets(): Promise<any[]>; forResultTargets(): Promise<import("noname-typings/nonameModules/noname/library/element/player.js").Player[]>;
/** /**
* result中的cards项 * result中的cards项
*/ */
forResultCards(): Promise<any[]>; forResultCards(): Promise<import("noname-typings/nonameModules/noname/library/element/card.js").Card[]>;
/** /**
* result中的card项 * result中的card项
* *

View File

@ -69,29 +69,9 @@ export class Player extends HTMLDivElement {
skill: {}; skill: {};
}[]; }[];
/** /**
* @type { { * @type { ActionHistory[] }
* useCard: GameEventPromise[],
* respond: GameEventPromise[],
* skipped: GameEventPromise[],
* lose: GameEventPromise[],
* gain: GameEventPromise[],
* sourceDamage: GameEventPromise[],
* damage: GameEventPromise[],
* custom: GameEventPromise[],
* useSkill: GameEventPromise[],
* }[] }
*/ */
actionHistory: { actionHistory: ActionHistory[];
useCard: GameEventPromise[];
respond: GameEventPromise[];
skipped: GameEventPromise[];
lose: GameEventPromise[];
gain: GameEventPromise[];
sourceDamage: GameEventPromise[];
damage: GameEventPromise[];
custom: GameEventPromise[];
useSkill: GameEventPromise[];
}[];
/** /**
* @type { SMap<string[]> } * @type { SMap<string[]> }
*/ */
@ -117,7 +97,8 @@ export class Player extends HTMLDivElement {
* friend: [], * friend: [],
* enemy: [], * enemy: [],
* neutral: [], * neutral: [],
* handcards: { * shown?: number,
* handcards?: {
* global: [], * global: [],
* source: [], * source: [],
* viewed: [] * viewed: []
@ -128,7 +109,8 @@ export class Player extends HTMLDivElement {
friend: []; friend: [];
enemy: []; enemy: [];
neutral: []; neutral: [];
handcards: { shown?: number;
handcards?: {
global: []; global: [];
source: []; source: [];
viewed: []; viewed: [];
@ -208,6 +190,18 @@ export class Player extends HTMLDivElement {
* @type { ((player: this) => any)[] } * @type { ((player: this) => any)[] }
*/ */
_inits: ((player: this) => any)[]; _inits: ((player: this) => any)[];
/**
* @type { boolean }
*/
isZhu: boolean;
/**
* @type { string }
*/
identity: string;
/**
* @type { boolean | undefined }
*/
identityShown: boolean | undefined;
/** /**
* *
* @param { number } amount * @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所知的牌 * other所知的牌
* @param { Player } [other] * @param { Player } [other]
* @param { (card: Card) => boolean } [filter] * @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] * @param { Player } [other]
@ -312,13 +306,13 @@ export class Player extends HTMLDivElement {
* @param { Player } [other] * @param { Player } [other]
* @param { (card: Card) => boolean } [filter] * @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 { Player } [other]
* @param { (card: Card) => boolean } [filter] * @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 * Execute the delay card effect
* *
@ -336,7 +330,7 @@ export class Player extends HTMLDivElement {
* *
* @param { Card } card * @param { Card } card
*/ */
canIgnoreHandcard(card: any): boolean; canIgnoreHandcard(card: Card): boolean;
/** /**
* Gift * Gift
* *
@ -353,7 +347,7 @@ export class Player extends HTMLDivElement {
* @param { Player } target * @param { Player } target
* @param { boolean } [strict] * @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 * Check if the player refuses gifts
* *
@ -361,7 +355,7 @@ export class Player extends HTMLDivElement {
* @param { Card } card * @param { Card } card
* @param { Player } player * @param { Player } player
*/ */
refuseGifts(card: any, player: Player): boolean; refuseGifts(card: Card, player: Player): boolean;
/** /**
* Gift AI related * Gift AI related
* *
@ -369,12 +363,12 @@ export class Player extends HTMLDivElement {
* @param { Card } card * @param { Card } card
* @param { Player } target * @param { Player } target
*/ */
getGiftAIResultTarget(card: any, target: Player): number; getGiftAIResultTarget(card: Card, target: Player): number;
/** /**
* @param { Card } card * @param { Card } card
* @param { Player } target * @param { Player } target
*/ */
getGiftEffect(card: any, target: Player): number; getGiftEffect(card: Card, target: Player): number;
/** /**
* *
* @param { Card | Card[] } cards * @param { Card | Card[] } cards
@ -390,7 +384,7 @@ export class Player extends HTMLDivElement {
* @param { Player } [source] * @param { Player } [source]
* @param { boolean } [strict] * @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发起协力 * target发起协力
* @param { Player } target * @param { Player } target
* @param {*} type * @param { string } type
* @param {*} reason * @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; chooseCooperationFor(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
checkCooperationStatus(target: any, reason: any): boolean; checkCooperationStatus(target: any, reason: any): boolean;
removeCooperation(info: any): void; removeCooperation(info: any): void;
@ -574,7 +568,7 @@ export class Player extends HTMLDivElement {
* @param { string } tag * @param { string } tag
* @param { Card[] } [cards] * @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 * @param { Player } target
*/ */
@ -583,18 +577,18 @@ export class Player extends HTMLDivElement {
* @param { Card } card * @param { Card } card
* @param { Player } target * @param { Player } target
*/ */
canSaveCard(card: any, target: Player): any; canSaveCard(card: Card, target: Player): any;
/** /**
* @param { String } from * @param { String } from
* @param { String } to * @param { String } to
* @returns { GameEventPromise } * @returns { GameEventPromise }
*/ */
reinitCharacter(from: string, to: string, log?: boolean): any; reinitCharacter(from: string, to: string, log?: boolean): GameEventPromise;
/** /**
* @param { String[] } newPairs * @param { String[] } newPairs
* @returns { GameEventPromise } * @returns { GameEventPromise }
*/ */
changeCharacter(newPairs: string[], log?: boolean): any; changeCharacter(newPairs: string[], log?: boolean): GameEventPromise;
/** /**
* @param { 0 | 1 | 2 } num * @param { 0 | 1 | 2 } num
* @param { false } [log] * @param { false } [log]
@ -630,12 +624,13 @@ export class Player extends HTMLDivElement {
* @param { string } [nature] * @param { string } [nature]
* @param { string } [popname] * @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 } name
* @param { string } type * @param { string } type
* @returns { boolean }
*/ */
hasUsableCard(name: string, type: string): true | undefined; hasUsableCard(name: string, type: string): boolean;
/** /**
* @param { Player } to * @param { Player } to
* @returns { boolean } * @returns { boolean }
@ -754,12 +749,12 @@ export class Player extends HTMLDivElement {
name: string; name: string;
name1: string; name1: string;
name2: string; name2: string;
handcards: any[]; handcards: import("noname-typings/nonameModules/noname/library/element/card.js").Card[];
gaintag: never[]; gaintag: never[];
equips: any[]; equips: import("noname-typings/nonameModules/noname/library/element/card.js").Card[];
judges: any[]; judges: import("noname-typings/nonameModules/noname/library/element/card.js").Card[];
specials: any[]; specials: import("noname-typings/nonameModules/noname/library/element/card.js").Card[];
expansions: any[]; expansions: import("noname-typings/nonameModules/noname/library/element/card.js").Card[];
expansion_gaintag: never[]; expansion_gaintag: never[];
disableJudge: boolean; disableJudge: boolean;
disabledSlots: SMap<number>; disabledSlots: SMap<number>;
@ -768,9 +763,9 @@ export class Player extends HTMLDivElement {
position: number; position: number;
hujia: number; hujia: number;
side: any; side: any;
identityShown: any; identityShown: boolean | undefined;
identityNode: (string | undefined)[]; identityNode: (string | undefined)[];
identity: any; identity: string;
dead: boolean; dead: boolean;
linked: boolean; linked: boolean;
turnedover: boolean; turnedover: boolean;
@ -806,31 +801,62 @@ export class Player extends HTMLDivElement {
countUsed(card: any, type: any): number; countUsed(card: any, type: any): number;
getCacheKey(): string; getCacheKey(): string;
countSkill(skill: any): any; 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 } [arg1='h']
* @param { string | Record<string, any> | ((card: Card) => boolean) } [arg2] * @param { string | Record<string, any> | ((card: Card) => boolean) } [arg2]
* @returns { Iterable<Card> } * @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 } [arg1='h']
* @param { string | Record<string, any> | ((card: Card) => boolean) } [arg2] * @param { string | Record<string, any> | ((card: Card) => boolean) } [arg2]
* @returns { Card[] } * @returns { Card[] }
*/ */
getCards(arg1?: string | undefined, arg2?: string | Record<string, any> | ((card: any) => boolean) | undefined): Card[]; getCards(arg1?: string | undefined, arg2?: string | Record<string, any> | ((card: Card) => boolean) | undefined): Card[];
iterableGetDiscardableCards(player: any, arg1: any, arg2: any): Generator<any, void, unknown>; 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): any[]; getDiscardableCards(player: any, arg1: any, arg2: any): import("noname-typings/nonameModules/noname/library/element/card.js").Card[];
iterableGetGainableCards(player: any, arg1: any, arg2: any): Generator<any, void, unknown>; /**
getGainableCards(player: any, arg1: any, arg2: any): any[]; * @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[]; 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; getCardIndex(arg1: any, name: any, card: any, max: any): number;
countDiscardableCards(player: any, arg1: any, arg2: 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[]; getOriginalSkills(): any[];
getModableSkills(): 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; get(arg1: any, arg2: any, arg3: any, arg4: any, ...args: any[]): any[] | ChildNode | undefined;
syncStorage(skill: any): void; syncStorage(skill: any): void;
syncSkills(): void; syncSkills(): void;
@ -879,7 +905,7 @@ export class Player extends HTMLDivElement {
useSkill(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; useSkill(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
drawTo(num: any, args: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; drawTo(num: any, args: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
draw(...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; randomGain(...args: any[]): any;
discard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; discard(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
loseToDiscardpile(...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; $addToExpansion(cards: any, broadcast: any, gaintag: any): this;
directgain(cards: any, broadcast: any, gaintag: any): this; directgain(cards: any, broadcast: any, gaintag: any): this;
directgains(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; gain(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
addToExpansion(...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; lose(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
damage(...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; recover(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
recoverTo(...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; 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; loseMaxHp(...args: any[]): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise;
gainMaxHp(...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; 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; wait(callback: any): void;
unwait(result: any): void; unwait(result: any): void;
tempUnwait(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; unprompt(): void;
prompt(str: any, nature: any): void; prompt(str: any, nature: any): void;
prompt_old(name2: any, className: 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_old(name: any, className: any): HTMLDivElement;
_popup(): void; _popup(): void;
showTimer(time: any): void; showTimer(time: any): void;
hideTimer(): void; hideTimer(): void;
markAuto(name: any, info: any): void; markAuto(name: any, info: any): void;
unmarkAuto(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; countExpansions(tag: any): number;
hasExpansions(tag: any): boolean; hasExpansions(tag: any): boolean;
setStorage(name: any, value: any, mark: any): any; setStorage(name: any, value: any, mark: any): any;
@ -961,7 +1013,14 @@ export class Player extends HTMLDivElement {
unmark(name: any, info: any): void; unmark(name: any, info: any): void;
addLink(): void; addLink(): void;
removeLink(): 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; hasUseTarget(card: any, distance: any, includecard: any): boolean;
hasValueTarget(card: any, distance: any, includecard: any): boolean; hasValueTarget(card: any, distance: any, includecard: any): boolean;
getUseValue(card: any, distance: any, includecard: any): number; getUseValue(card: any, distance: any, includecard: any): number;
@ -997,7 +1056,20 @@ export class Player extends HTMLDivElement {
removeSkillTrigger(skills: any, triggeronly: any): this; removeSkillTrigger(skills: any, triggeronly: any): this;
removeSkill(skill: any, ...args: any[]): any; removeSkill(skill: any, ...args: any[]): any;
addTempSkills(skillsToAdd: any, expire: any): import("./gameEvent.js").GameEvent & import("./gameEventPromise.js").GameEventPromise; addTempSkills(skillsToAdd: any, expire: any): import("./gameEvent.js").GameEvent & import("./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; tempBanSkill(skill: any, expire: any, log: any): any;
isTempBanned(skill: any): boolean; isTempBanned(skill: any): boolean;
attitudeTo(target: any): any; attitudeTo(target: any): any;
@ -1019,14 +1091,68 @@ export class Player extends HTMLDivElement {
* @param { string | function | number | boolean | object } map * @param { string | function | number | boolean | object } map
*/ */
getRoundHistory(key: any, filter: any, num: any, keep: any, last: any): any[]; 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; * @overload
hasHistory(key: any, filter: any, last: any): any; * @returns { ActionHistory }
getLastHistory(key: any, filter: any, last: any): any; */
checkAllHistory(key: any, filter: any, last: any): void; getHistory(): ActionHistory;
getAllHistory(key: any, filter: any, last: any): any[]; /**
hasAllHistory(key: any, filter: any, last: any): boolean; * @template { keyof ActionHistory } T
getLastUsed(num: any): any; * @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; getStat(key: any): any;
getLastStat(key: any): any; getLastStat(key: any): any;
queue(time: any): void; queue(time: any): void;
@ -1037,7 +1163,7 @@ export class Player extends HTMLDivElement {
getGlobalFrom(): number; getGlobalFrom(): number;
getGlobalTo(): number; getGlobalTo(): number;
getHandcardLimit(): 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[]; getFriends(func: any): any[];
isEnemyOf(...args: any[]): boolean; isEnemyOf(...args: any[]): boolean;
isFriendOf(player: any): boolean; isFriendOf(player: any): boolean;
@ -1067,27 +1193,63 @@ export class Player extends HTMLDivElement {
isOnline2(): boolean; isOnline2(): boolean;
isOffline(): boolean; isOffline(): boolean;
checkShow(skill: any, showonly: any): false | "main" | "vice"; 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; distanceTo(target: any, method: any): number;
distanceFrom(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; isZhu2(): boolean;
isInitFilter(tag: any): 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; 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; hasJudge(name: any): boolean;
hasFriend(): boolean; hasFriend(): boolean;
hasUnknown(num: any): boolean; hasUnknown(num: any): boolean;
isUnknown(player: any): boolean; isUnknown(player: any): boolean;
hasWuxie(info: 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; mayHaveSha(viewer: any, type: any, ignore: any, rvt: any): number | boolean;
mayHaveShan(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; 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; getJudge(name: any): ChildNode | null;
$drawAuto(cards: any, target: any): void; $drawAuto(cards: any, target: any): void;
$draw(num: any, init: any, config: any): void; $draw(num: any, init: any, config: any): void;
@ -1119,9 +1281,27 @@ export class Player extends HTMLDivElement {
$dust(): void; $dust(): void;
$recover(): void; $recover(): void;
$fullscreenpop(str: any, nature: any, avatar: any, broadcast: any): 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; $damage(source: any, ...args: any[]): void;
$die(): void; $die(): void;
$dieflip(type: any): void; $dieflip(type: any): void;
$phaseJudge(card: 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[];
};

View File

@ -5,7 +5,7 @@ export class VCard {
* @param { string } [name] * @param { string } [name]
* @param { string } [nature] * @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} * @type {string}
*/ */
@ -43,7 +43,7 @@ export class VCard {
/** /**
* @param { Player } player * @param { Player } player
*/ */
hasNature(nature: any, player: any): boolean; hasNature(nature: any, player: Player): boolean;
getCacheKey(): string; getCacheKey(): string;
hasGaintag(tag: any): any; hasGaintag(tag: any): any;
} }

View File

@ -62,7 +62,10 @@ export class Library {
onload: any[]; onload: any[];
onload2: any[]; onload2: any[];
onprepare: any[]; onprepare: any[];
arenaReady: any[]; /**
* @type { Function[] | undefined }
*/
arenaReady: Function[] | undefined;
onfree: any[]; onfree: any[];
inpile: any[]; inpile: any[];
inpile_nature: any[]; inpile_nature: any[];
@ -503,11 +506,11 @@ export class Library {
intro: string; intro: string;
init: string; init: string;
item: { item: {
'500': string; 500: string;
'700': string; 700: string;
'1000': string; 1000: string;
'1500': string; 1500: string;
'2500': string; 2500: string;
}; };
}; };
doubleclick_intro: { doubleclick_intro: {
@ -521,12 +524,12 @@ export class Library {
init: string; init: string;
intro: string; intro: string;
item: { item: {
'0': string; 0: string;
'5': string; 5: string;
'10': string; 10: string;
'20': string; 20: string;
'50': string; 50: string;
'10000': string; 10000: string;
}; };
unfrequent: boolean; unfrequent: boolean;
}; };
@ -719,10 +722,10 @@ export class Library {
init: string; init: string;
item: { item: {
off: string; off: string;
'30000': string; 30000: string;
'60000': string; 60000: string;
'120000': string; 120000: string;
'300000': string; 300000: string;
}; };
intro: string; intro: string;
onclick(item: any): void; onclick(item: any): void;
@ -889,17 +892,17 @@ export class Library {
name: string; name: string;
init: string; init: string;
item: { item: {
'-5x': string; "-5x": string;
'-4x': string; "-4x": string;
'-3x': string; "-3x": string;
'-2x': string; "-2x": string;
'-1x': string; "-1x": string;
'0x': string; "0x": string;
'1x': string; "1x": string;
'2x': string; "2x": string;
'3x': string; "3x": string;
'4x': string; "4x": string;
'5x': string; "5x": string;
}; };
unfrequent: boolean; unfrequent: boolean;
onclick(item: any): void; onclick(item: any): void;
@ -908,17 +911,17 @@ export class Library {
name: string; name: string;
init: string; init: string;
item: { item: {
'-5x': string; "-5x": string;
'-4x': string; "-4x": string;
'-3x': string; "-3x": string;
'-2x': string; "-2x": string;
'-1x': string; "-1x": string;
'0x': string; "0x": string;
'1x': string; "1x": string;
'2x': string; "2x": string;
'3x': string; "3x": string;
'4x': string; "4x": string;
'5x': string; "5x": string;
}; };
unfrequent: boolean; unfrequent: boolean;
onclick(item: any): void; onclick(item: any): void;
@ -927,17 +930,17 @@ export class Library {
name: string; name: string;
init: string; init: string;
item: { item: {
'-5x': string; "-5x": string;
'-4x': string; "-4x": string;
'-3x': string; "-3x": string;
'-2x': string; "-2x": string;
'-1x': string; "-1x": string;
'0x': string; "0x": string;
'1x': string; "1x": string;
'2x': string; "2x": string;
'3x': string; "3x": string;
'4x': string; "4x": string;
'5x': string; "5x": string;
}; };
unfrequent: boolean; unfrequent: boolean;
onclick(item: any): void; onclick(item: any): void;
@ -946,17 +949,17 @@ export class Library {
name: string; name: string;
init: string; init: string;
item: { item: {
'-5x': string; "-5x": string;
'-4x': string; "-4x": string;
'-3x': string; "-3x": string;
'-2x': string; "-2x": string;
'-1x': string; "-1x": string;
'0x': string; "0x": string;
'1x': string; "1x": string;
'2x': string; "2x": string;
'3x': string; "3x": string;
'4x': string; "4x": string;
'5x': string; "5x": string;
}; };
unfrequent: boolean; unfrequent: boolean;
onclick(item: any): void; onclick(item: any): void;
@ -1390,10 +1393,10 @@ export class Library {
intro: string; intro: string;
init: string; init: string;
item: { item: {
'6': string; 6: string;
'12': string; 12: string;
'20': string; 20: string;
'30': string; 30: string;
}; };
unfrequent: boolean; unfrequent: boolean;
}; };
@ -1624,15 +1627,15 @@ export class Library {
name: string; name: string;
init: number; init: number;
item: { item: {
'0': string; 0: string;
'1': string; 1: string;
'2': string; 2: string;
'3': string; 3: string;
'4': string; 4: string;
'5': string; 5: string;
'6': string; 6: string;
'7': string; 7: string;
'8': string; 8: string;
}; };
onclick(volume: any): void; onclick(volume: any): void;
}; };
@ -1640,15 +1643,15 @@ export class Library {
name: string; name: string;
init: number; init: number;
item: { item: {
'0': string; 0: string;
'1': string; 1: string;
'2': string; 2: string;
'3': string; 3: string;
'4': string; 4: string;
'5': string; 5: string;
'6': string; 6: string;
'7': string; 7: string;
'8': string; 8: string;
}; };
onclick(volume: any): void; onclick(volume: any): void;
}; };
@ -1722,108 +1725,108 @@ export class Library {
name: string; name: string;
init: string; init: string;
item: { item: {
'1': string; 1: string;
'0.5': string; 0.5: string;
'0': string; 0: string;
}; };
}; };
huosha: { huosha: {
name: string; name: string;
init: string; init: string;
item: { item: {
'1': string; 1: string;
'0.5': string; 0.5: string;
'0': string; 0: string;
}; };
}; };
leisha: { leisha: {
name: string; name: string;
init: string; init: string;
item: { item: {
'1': string; 1: string;
'0.5': string; 0.5: string;
'0': string; 0: string;
}; };
}; };
shan: { shan: {
name: string; name: string;
init: string; init: string;
item: { item: {
'1': string; 1: string;
'0.5': string; 0.5: string;
'0': string; 0: string;
}; };
}; };
tao: { tao: {
name: string; name: string;
init: string; init: string;
item: { item: {
'1': string; 1: string;
'0.5': string; 0.5: string;
'0': string; 0: string;
}; };
}; };
jiu: { jiu: {
name: string; name: string;
init: string; init: string;
item: { item: {
'1': string; 1: string;
'0.5': string; 0.5: string;
'0': string; 0: string;
}; };
}; };
wuxie: { wuxie: {
name: string; name: string;
init: string; init: string;
item: { item: {
'1': string; 1: string;
'0.5': string; 0.5: string;
'0': string; 0: string;
}; };
}; };
nanman: { nanman: {
name: string; name: string;
init: string; init: string;
item: { item: {
'1': string; 1: string;
'0.5': string; 0.5: string;
'0': string; 0: string;
}; };
}; };
wanjian: { wanjian: {
name: string; name: string;
init: string; init: string;
item: { item: {
'1': string; 1: string;
'0.5': string; 0.5: string;
'0': string; 0: string;
}; };
}; };
guohe: { guohe: {
name: string; name: string;
init: string; init: string;
item: { item: {
'1': string; 1: string;
'0.5': string; 0.5: string;
'0': string; 0: string;
}; };
}; };
shunshou: { shunshou: {
name: string; name: string;
init: string; init: string;
item: { item: {
'1': string; 1: string;
'0.5': string; 0.5: string;
'0': string; 0: string;
}; };
}; };
tiesuo: { tiesuo: {
name: string; name: string;
init: string; init: string;
item: { item: {
'1': string; 1: string;
'0.5': string; 0.5: string;
'0': string; 0: string;
}; };
}; };
hide: { hide: {
@ -1869,10 +1872,10 @@ export class Library {
name: string; name: string;
init: string; init: string;
item: { item: {
'0.1': string; 0.1: string;
'0.2': string; 0.2: string;
'0.3': string; 0.3: string;
'0.5': string; 0.5: string;
}; };
}; };
hide: { hide: {
@ -1946,9 +1949,9 @@ export class Library {
item: { item: {
off: string; off: string;
group: string; group: string;
'4': string; 4: string;
'6': string; 6: string;
'8': string; 8: string;
}; };
}; };
connect_zhong_card: { connect_zhong_card: {
@ -2221,12 +2224,12 @@ export class Library {
init: string; init: string;
restart: boolean; restart: boolean;
item: { item: {
'3': string; 3: string;
'4': string; 4: string;
'5': string; 5: string;
'6': string; 6: string;
'8': string; 8: string;
'10': string; 10: string;
}; };
}; };
limit_zhu: { limit_zhu: {
@ -2236,9 +2239,9 @@ export class Library {
item: { item: {
off: string; off: string;
group: string; group: string;
'4': string; 4: string;
'6': string; 6: string;
'8': string; 8: string;
}; };
}; };
choice_zhong: { choice_zhong: {
@ -2246,12 +2249,12 @@ export class Library {
init: string; init: string;
restart: boolean; restart: boolean;
item: { item: {
'3': string; 3: string;
'4': string; 4: string;
'5': string; 5: string;
'6': string; 6: string;
'8': string; 8: string;
'10': string; 10: string;
}; };
}; };
choice_nei: { choice_nei: {
@ -2259,12 +2262,12 @@ export class Library {
init: string; init: string;
restart: boolean; restart: boolean;
item: { item: {
'3': string; 3: string;
'4': string; 4: string;
'5': string; 5: string;
'6': string; 6: string;
'8': string; 8: string;
'10': string; 10: string;
}; };
}; };
choice_fan: { choice_fan: {
@ -2272,12 +2275,12 @@ export class Library {
init: string; init: string;
restart: boolean; restart: boolean;
item: { item: {
'3': string; 3: string;
'4': string; 4: string;
'5': string; 5: string;
'6': string; 6: string;
'8': string; 8: string;
'10': string; 10: string;
}; };
}; };
enable_commoner: { enable_commoner: {
@ -2292,12 +2295,12 @@ export class Library {
init: string; init: string;
restart: boolean; restart: boolean;
item: { item: {
'3': string; 3: string;
'4': string; 4: string;
'5': string; 5: string;
'6': string; 6: string;
'8': string; 8: string;
'10': string; 10: string;
}; };
}; };
enable_year_limit: { enable_year_limit: {
@ -2552,12 +2555,12 @@ export class Library {
init: string; init: string;
restart: boolean; restart: boolean;
item: { item: {
'5': string; 5: string;
'6': string; 6: string;
'7': string; 7: string;
'8': string; 8: string;
'9': string; 9: string;
'10': string; 10: string;
}; };
}; };
}; };
@ -2570,10 +2573,10 @@ export class Library {
name: string; name: string;
init: string; init: string;
item: { item: {
'1v1': string; "1v1": string;
'2v2': string; "2v2": string;
'3v3': string; "3v3": string;
'4v4': string; "4v4": string;
guandu: string; guandu: string;
}; };
frequent: boolean; frequent: boolean;
@ -2595,11 +2598,11 @@ export class Library {
init: string; init: string;
frequent: boolean; frequent: boolean;
item: { item: {
'12': string; 12: string;
'16': string; 16: string;
'20': string; 20: string;
'24': string; 24: string;
'40': string; 40: string;
}; };
}; };
connect_replace_number: { connect_replace_number: {
@ -2607,12 +2610,12 @@ export class Library {
init: string; init: string;
frequent: boolean; frequent: boolean;
item: { item: {
'0': string; 0: string;
'1': string; 1: string;
'2': string; 2: string;
'3': string; 3: string;
'4': string; 4: string;
'5': string; 5: string;
}; };
}; };
}; };
@ -2949,12 +2952,12 @@ export class Library {
init: string; init: string;
restart: boolean; restart: boolean;
item: { item: {
'3': string; 3: string;
'4': string; 4: string;
'5': string; 5: string;
'6': string; 6: string;
'8': string; 8: string;
'10': string; 10: string;
}; };
}; };
choice_fan: { choice_fan: {
@ -2962,12 +2965,12 @@ export class Library {
init: string; init: string;
restart: boolean; restart: boolean;
item: { item: {
'3': string; 3: string;
'4': string; 4: string;
'5': string; 5: string;
'6': string; 6: string;
'8': string; 8: string;
'10': string; 10: string;
}; };
}; };
edit_character: { edit_character: {
@ -3089,10 +3092,10 @@ export class Library {
name: string; name: string;
init: string; init: string;
item: { item: {
'0': string; 0: string;
'0.2': string; 0.2: string;
'0.333': string; 0.333: string;
'0.5': string; 0.5: string;
}; };
frequent: boolean; frequent: boolean;
}; };
@ -3129,10 +3132,10 @@ export class Library {
init: string; init: string;
intro: string; intro: string;
item: { item: {
'0': string; 0: string;
'10': string; 10: string;
'20': string; 20: string;
'30': string; 30: string;
}; };
}; };
}; };
@ -3145,10 +3148,10 @@ export class Library {
init: string; init: string;
frequent: boolean; frequent: boolean;
item: { item: {
'10': string; 10: string;
'20': string; 20: string;
'30': string; 30: string;
'1000': string; 1000: string;
}; };
}; };
tafang_difficulty: { tafang_difficulty: {
@ -3156,9 +3159,9 @@ export class Library {
init: string; init: string;
frequent: boolean; frequent: boolean;
item: { item: {
'1': string; 1: string;
'2': string; 2: string;
'3': string; 3: string;
}; };
}; };
show_range: { show_range: {
@ -3174,10 +3177,10 @@ export class Library {
intro: string; intro: string;
init: string; init: string;
item: { item: {
'0': string; 0: string;
'10': string; 10: string;
'20': string; 20: string;
'30': string; 30: string;
}; };
}; };
}; };
@ -3255,13 +3258,13 @@ export class Library {
init: string; init: string;
frequent: boolean; frequent: boolean;
item: { item: {
'1': string; 1: string;
'2': string; 2: string;
'3': string; 3: string;
'4': string; 4: string;
'6': string; 6: string;
'8': string; 8: string;
'10': string; 10: string;
}; };
onclick(num: any): void; onclick(num: any): void;
}; };
@ -3992,7 +3995,7 @@ export class Library {
link: () => void; link: () => void;
chooseToGuanxing: () => 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; Player: typeof Element.Player;
Card: typeof Element.Card; Card: typeof Element.Card;
VCard: typeof Element.VCard; VCard: typeof Element.VCard;
@ -4243,7 +4246,7 @@ export class Library {
attackFrom: (card: any, player: any, target: any) => boolean; attackFrom: (card: any, player: any, target: any) => boolean;
globalFrom: (card: any, player: any, target: any) => boolean; globalFrom: (card: any, player: any, target: any) => boolean;
selectCard: () => number[]; 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; judge: (card: any, player: any, target: any) => any;
autoRespondSha: () => boolean; autoRespondSha: () => boolean;
autoRespondShan: () => boolean; autoRespondShan: () => boolean;

View File

@ -1,3 +1,6 @@
/**
* github授权的token
*/
export function gainAuthorization(): Promise<void>; export function gainAuthorization(): Promise<void>;
/** /**
* *
@ -6,9 +9,10 @@ export function gainAuthorization(): Promise<void>;
export function parseSize(limit: number): string; export function parseSize(limit: number): string;
/** /**
* *
* @param { string } ver1 * @param { string } ver1 1
* @param { string } ver2 * @param { string } ver2 2
* @returns { -1 | 0 | 1 } * @returns { -1 | 0 | 1 } -1ver1 < ver2, 0ver1 == ver2, 1ver1 > ver2
* @throws {Error}
*/ */
export function checkVersion(ver1: string, ver2: string): -1 | 0 | 1; 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 } [path = ''] ()
* @param { string } [branch = ''] * @param { string } [branch = '']
* @param { Object } options * @param { Object } options
@ -128,6 +132,9 @@ export function getRepoFilesList(path?: string | undefined, branch?: string | un
/** /**
* *
* () * ()
*
* ** api可能会大幅度消耗请求次数使**
*
* @param { string } [path = ''] () * @param { string } [path = ''] ()
* @param { string } [branch = ''] * @param { string } [branch = '']
* @param { Object } options * @param { Object } options
@ -155,7 +162,7 @@ export function flattenRepositoryFiles(path?: string | undefined, branch?: strin
type: 'file'; type: 'file';
}[]>; }[]>;
/** /**
* *
* @param { string } url * @param { string } url
* @param { (receivedBytes: number, total?:number, filename?: string) => void } [onProgress] * @param { (receivedBytes: number, total?:number, filename?: string) => void } [onProgress]
* @param { RequestInit } [options={}] * @param { RequestInit } [options={}]
@ -174,3 +181,37 @@ export function request(url: string, onProgress?: ((receivedBytes: number, total
* @returns { progress } * @returns { progress }
*/ */
export function createProgress(title?: string | undefined, max?: string | number | undefined, fileName?: string | undefined, value?: string | number | undefined): progress; export function createProgress(title?: string | undefined, max?: string | number | undefined, fileName?: string | undefined, value?: string | number | undefined): progress;
/**
* GitHub存储库检索最新版本(tag)tag
*
* GitHub存储库中获取由所有者和存储库名称指定的tags列表v1998tag名称
* @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;
}[][]>;

View File

@ -8,7 +8,7 @@ export class status {
/** /**
* @type { GameEventPromise } * @type { GameEventPromise }
*/ */
event: any; event: GameEventPromise;
ai: {}; ai: {};
lastdragchange: any[]; lastdragchange: any[];
skillaudio: any[]; skillaudio: any[];
@ -30,39 +30,43 @@ export class status {
prehidden_skills: any[]; prehidden_skills: any[];
postReconnect: {}; 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>[]; [key: string]: Promise<any>[];
}; } | undefined;
/**
* @type { Function | boolean | undefined }
*/
new_tutorial: Function | boolean | undefined;
} }
export let _status: status; export let _status: status;
export function setStatus(instance?: status | undefined): void; export function setStatus(instance?: status | undefined): void;

View File

@ -7,6 +7,10 @@ export class Click {
* @type {(arg0: string) => void} * @type {(arg0: string) => void}
*/ */
menuTab: (arg0: string) => void; menuTab: (arg0: string) => void;
/**
* @type {() => void}
*/
configMenu: () => void;
identitycircle(): void; identitycircle(): void;
connectEvents(): void; connectEvents(): void;
connectClients(): void; connectClients(): void;

View File

@ -2,7 +2,7 @@ export class Create {
/** /**
* @type {(video: Videos, before: boolean) => void} * @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; caption(str: any, position: any): HTMLDivElement;
control(...args: any[]): import("../../library/element/control.js").Control; control(...args: any[]): import("../../library/element/control.js").Control;
confirm(str: any, func: any): void; confirm(str: any, func: any): void;
skills(skills: any): any; skills(skills: any): import("noname-typings/nonameModules/noname/library/element/control.js").Control | undefined;
skills2(skills: any): any; skills2(skills: any): import("noname-typings/nonameModules/noname/library/element/control.js").Control | undefined;
skills3(skills: any): any; skills3(skills: any): import("noname-typings/nonameModules/noname/library/element/control.js").Control | undefined;
arena(): void; arena(): void;
system(str: any, func: any, right: any, before: any): HTMLDivElement; system(str: any, func: any, right: any, before: any): HTMLDivElement;
pause(): HTMLDivElement | undefined; pause(): HTMLDivElement | undefined;
@ -104,7 +104,7 @@ export class Create {
textbuttons(list: any, dialog: any, noclick: any): void; textbuttons(list: any, dialog: any, noclick: any): void;
player(position: any, noclick: any): import("../../library/element/player.js").Player; player(position: any, noclick: any): import("../../library/element/player.js").Player;
connectPlayers(ip: any): void; 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; me(hasme: any): void;
card(position: any, info: any, noclick: any): import("../../library/element/card.js").Card; card(position: any, info: any, noclick: any): import("../../library/element/card.js").Card;
cardsAsync(...args: any[]): void; cardsAsync(...args: any[]): void;

View File

@ -30,7 +30,7 @@ export class UI {
/** /**
* @type { Dialog } * @type { Dialog }
*/ */
dialog: any; dialog: Dialog;
/** /**
* @type { HTMLDivElement } * @type { HTMLDivElement }
*/ */
@ -42,7 +42,7 @@ export class UI {
/** /**
* @type { Control } * @type { Control }
*/ */
control: any; control: Control;
/** /**
* @type { Control | undefined } * @type { Control | undefined }
*/ */
@ -129,6 +129,10 @@ export class UI {
* @type {HTMLDivElement} * @type {HTMLDivElement}
*/ */
tempnowuxie: HTMLDivElement; tempnowuxie: HTMLDivElement;
/**
* @type {HTMLDivElement}
*/
cardPile: HTMLDivElement;
refresh(node: any): void; refresh(node: any): void;
clear(): void; clear(): void;
updatec(): void; updatec(): void;

View File

@ -7,4 +7,4 @@
*/ */
export const promiseErrorHandlerMap: Record<"firefox" | "chrome" | "safari" | "other", new () => PromiseErrorHandler>; export const promiseErrorHandlerMap: Record<"firefox" | "chrome" | "safari" | "other", new () => PromiseErrorHandler>;
export type PromiseErrorHandler = import('./struct/interface/promise-error-handler.js').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.

View File

@ -1,8 +1,10 @@
export { GNC, gnc, setGNC } from './noname/gnc/index.js'; export const rootURL = new URL(import.meta.url);
export { AI, ai, setAI } from './noname/ai/index.js';
export { Game, game, setGame } from './noname/game/index.js'; export { GNC, gnc, setGNC } from "./noname/gnc/index.js";
export { Get, get, setGet } from './noname/get/index.js'; export { AI, ai, setAI } from "./noname/ai/index.js";
export { Library, lib, setLibrary } from './noname/library/index.js'; export { Game, game, setGame } from "./noname/game/index.js";
export { status, _status, setStatus } from './noname/status/index.js'; export { Get, get, setGet } from "./noname/get/index.js";
export { UI, ui, setUI } from './noname/ui/index.js'; export { Library, lib, setLibrary } from "./noname/library/index.js";
export { boot } from './noname/init/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";

View File

@ -53,18 +53,19 @@ export class Game {
/** /**
* @type { string } * @type { string }
*/ */
// @ts-ignore
layout; layout;
/** /**
* @type { Player } * @type { Player }
*/ */
// @ts-ignore
me; me;
/** /**
* @type { boolean } * @type { boolean }
*/ */
// @ts-ignore
chess; chess;
/**
* @type { Player }
*/
zhu;
globalEventHandlers = new (class { globalEventHandlers = new (class {
constructor() { constructor() {
this._handlers = {}; this._handlers = {};
@ -408,7 +409,9 @@ export class Game {
style.transform = "scale(1.05)"; style.transform = "scale(1.05)";
} }
document.body.insertBefore(uiBackground, document.body.firstChild); document.body.insertBefore(uiBackground, document.body.firstChild);
if (background.startsWith("db:")) uiBackground.setBackgroundDB(background.slice(3)); if (background.startsWith("blob:") || background.startsWith("data:")) {
uiBackground.setBackgroundImage(background);
} else if (background.startsWith("db:")) uiBackground.setBackgroundDB(background.slice(3));
else if (background.startsWith("ext:")) else if (background.startsWith("ext:"))
uiBackground.setBackgroundImage(`extension/${background.slice(4)}`); uiBackground.setBackgroundImage(`extension/${background.slice(4)}`);
else if (background == "default") { else if (background == "default") {
@ -557,8 +560,8 @@ export class Game {
/** /**
* @template { keyof GameHistory } T * @template { keyof GameHistory } T
* @param { T } key * @param { T } key
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter * @param { (event: GameEventPromise) => boolean } filter
* @param { import('../library/index.js').GameEventPromise } [last] * @param { GameEventPromise } [last]
* @returns { boolean } * @returns { boolean }
*/ */
hasGlobalHistory(key, filter, last) { hasGlobalHistory(key, filter, last) {
@ -580,8 +583,8 @@ export class Game {
/** /**
* @template { keyof GameHistory } T * @template { keyof GameHistory } T
* @param { T } key * @param { T } key
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter * @param { (event: GameEventPromise) => boolean } filter
* @param { import('../library/index.js').GameEventPromise } [last] * @param { GameEventPromise } [last]
* @returns { void } * @returns { void }
*/ */
checkGlobalHistory(key, filter, last) { checkGlobalHistory(key, filter, last) {
@ -608,8 +611,8 @@ export class Game {
* @template { keyof GameHistory } T * @template { keyof GameHistory } T
* @overload * @overload
* @param { T } key * @param { T } key
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } [filter] * @param { (event: GameEventPromise) => boolean } [filter]
* @param { import('../library/index.js').GameEventPromise } [last] * @param { GameEventPromise } [last]
* @returns { GameHistory[T] } * @returns { GameHistory[T] }
*/ */
getGlobalHistory(key, filter, last) { getGlobalHistory(key, filter, last) {
@ -630,8 +633,8 @@ export class Game {
/** /**
* @template { keyof GameHistory } T * @template { keyof GameHistory } T
* @param { T } key * @param { T } key
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter * @param { (event: GameEventPromise) => boolean } filter
* @param { import('../library/index.js').GameEventPromise } [last] * @param { GameEventPromise } [last]
* @returns { boolean } * @returns { boolean }
*/ */
hasAllGlobalHistory(key, filter, last) { hasAllGlobalHistory(key, filter, last) {
@ -656,8 +659,8 @@ export class Game {
/** /**
* @template { keyof GameHistory } T * @template { keyof GameHistory } T
* @param { T } key * @param { T } key
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } filter * @param { (event: GameEventPromise) => boolean } filter
* @param { import('../library/index.js').GameEventPromise } [last] * @param { GameEventPromise } [last]
* @returns { void } * @returns { void }
*/ */
checkAllGlobalHistory(key, filter, last) { checkAllGlobalHistory(key, filter, last) {
@ -686,8 +689,8 @@ export class Game {
* @template { keyof GameHistory } T * @template { keyof GameHistory } T
* @overload * @overload
* @param { T } key * @param { T } key
* @param { (event: import('../library/index.js').GameEventPromise) => boolean } [filter] * @param { (event: GameEventPromise) => boolean } [filter]
* @param { import('../library/index.js').GameEventPromise } [last] * @param { GameEventPromise } [last]
* @returns { GameHistory[T] } * @returns { GameHistory[T] }
*/ */
getAllGlobalHistory(key, filter, last) { getAllGlobalHistory(key, filter, last) {
@ -718,12 +721,12 @@ export class Game {
/** /**
* @overload * @overload
* @param { Card } cards * @param { Card } cards
* @returns { import('../library/index.js').GameEventPromise } * @returns { GameEventPromise }
*/ */
/** /**
* @overload * @overload
* @param {Card[]} cards * @param {Card[]} cards
* @returns { import('../library/index.js').GameEventPromise } * @returns { GameEventPromise }
*/ */
cardsDiscard(cards) { cardsDiscard(cards) {
/** @type { 'cards' | 'card' | void } */ /** @type { 'cards' | 'card' | void } */
@ -746,12 +749,12 @@ export class Game {
/** /**
* @overload * @overload
* @param { Card } cards * @param { Card } cards
* @returns { import('../library/index.js').GameEventPromise } * @returns { GameEventPromise }
*/ */
/** /**
* @overload * @overload
* @param {Card[]} cards * @param {Card[]} cards
* @returns { import('../library/index.js').GameEventPromise } * @returns { GameEventPromise }
*/ */
cardsGotoOrdering(cards) { cardsGotoOrdering(cards) {
/** @type { 'cards' | 'card' | void } */ /** @type { 'cards' | 'card' | void } */
@ -771,13 +774,13 @@ export class Game {
* @overload * @overload
* @param { Card } cards * @param { Card } cards
* @param { 'toRenku' | false } [bool] 为false时不触发trigger'toRenku'时牌放到仁库 * @param { 'toRenku' | false } [bool] 为false时不触发trigger'toRenku'时牌放到仁库
* @returns { import('../library/index.js').GameEventPromise } * @returns { GameEventPromise }
*/ */
/** /**
* @overload * @overload
* @param {Card[]} cards * @param {Card[]} cards
* @param { 'toRenku' | false } [bool] 为false时不触发trigger'toRenku'时牌放到仁库 * @param { 'toRenku' | false } [bool] 为false时不触发trigger'toRenku'时牌放到仁库
* @returns { import('../library/index.js').GameEventPromise } * @returns { GameEventPromise }
*/ */
cardsGotoSpecial(cards, bool) { cardsGotoSpecial(cards, bool) {
/** @type { 'cards' | 'card' | void } */ /** @type { 'cards' | 'card' | void } */
@ -836,7 +839,7 @@ export class Game {
return next; return next;
} }
/** /**
* @param { import('../library/index.js').GameEventPromise } event * @param { GameEventPromise } event
*/ */
$cardsGotoPile(event) { $cardsGotoPile(event) {
const cards = event.cards; const cards = event.cards;
@ -1440,7 +1443,8 @@ export class Game {
if (_status.video) break; if (_status.video) break;
} }
if (path.startsWith("ext:")) path = path.replace(/^ext:/, "extension/"); if (path.startsWith("ext:")) path = path.replace(/^ext:/, "extension/");
else if (!path.startsWith("db:")) path = `audio/${path}`; else if (!["db:", "blob:", "data:"].some((prefix) => path.startsWith(prefix)))
path = `audio/${path}`;
if (!lib.config.repeat_audio && _status.skillaudio.includes(path)) return; if (!lib.config.repeat_audio && _status.skillaudio.includes(path)) return;
} }
const audio = document.createElement("audio"); const audio = document.createElement("audio");
@ -1465,6 +1469,7 @@ export class Game {
reject reject
); );
else if (lib.path.extname(path)) resolve(`${lib.assetURL}${path}`); else if (lib.path.extname(path)) resolve(`${lib.assetURL}${path}`);
else if (URL.canParse(path)) resolve(path);
else resolve(`${lib.assetURL}${path}.mp3`); else resolve(`${lib.assetURL}${path}.mp3`);
}).then((resolvedPath) => { }).then((resolvedPath) => {
audio.src = resolvedPath; audio.src = resolvedPath;
@ -1599,7 +1604,11 @@ export class Game {
let path = "", let path = "",
format = ""; format = "";
if (!/^db:|^ext:|\//.test(audioInfo)) path = "skill/"; if (!/^db:|^ext:|\//.test(audioInfo)) path = "skill/";
if (!/\.\w+$/.test(audioInfo)) format = ".mp3"; if (
!/\.\w+$/.test(audioInfo) &&
!["data:", "blob:"].some((name) => audioInfo.startsWith(name))
)
format = ".mp3";
if (path && format) return parseAudio(audioInfo, options, [true, 2]); if (path && format) return parseAudio(audioInfo, options, [true, 2]);
return [`${path}${audioInfo}${format}`]; return [`${path}${audioInfo}${format}`];
} }
@ -1733,7 +1742,9 @@ export class Game {
const audio = get.dynamicVariable(lib.card[card.name].audio, card, sex); const audio = get.dynamicVariable(lib.card[card.name].audio, card, sex);
if (typeof audio == "string") { if (typeof audio == "string") {
const audioInfo = audio.split(":"); const audioInfo = audio.split(":");
if (audio.startsWith("db:")) if (["blob:", "data:"].some((prefix) => audio.startsWith(prefix))) {
game.playAudio(audio);
} else if (audio.startsWith("db:"))
game.playAudio( game.playAudio(
`${audioInfo[0]}:${audioInfo[1]}`, `${audioInfo[0]}:${audioInfo[1]}`,
audioInfo[2], audioInfo[2],
@ -1765,7 +1776,9 @@ export class Game {
_status.currentAozhan _status.currentAozhan
); );
_status.currentAozhan = aozhan; _status.currentAozhan = aozhan;
if (aozhan.startsWith("db:")) if (["blob:", "data:"].some((prefix) => aozhan.startsWith(prefix))) {
ui.backgroundMusic.src = aozhan;
} else if (aozhan.startsWith("db:"))
game.getDB("image", aozhan.slice(3)).then((result) => (ui.backgroundMusic.src = result)); game.getDB("image", aozhan.slice(3)).then((result) => (ui.backgroundMusic.src = result));
else if (aozhan.startsWith("ext:")) else if (aozhan.startsWith("ext:"))
ui.backgroundMusic.src = `${lib.assetURL}extension/${aozhan.slice(4)}`; ui.backgroundMusic.src = `${lib.assetURL}extension/${aozhan.slice(4)}`;
@ -1788,7 +1801,9 @@ export class Game {
ui.backgroundMusic.src = backgroundMusicSourceConfiguration; ui.backgroundMusic.src = backgroundMusicSourceConfiguration;
return; return;
} }
if (music.startsWith("db:")) if (["blob:", "data:"].some((prefix) => music.startsWith(prefix))) {
ui.backgroundMusic.src = music;
} else if (music.startsWith("db:"))
game.getDB("image", music.slice(3)).then((result) => (ui.backgroundMusic.src = result)); game.getDB("image", music.slice(3)).then((result) => (ui.backgroundMusic.src = result));
else if (music.startsWith("ext:")) else if (music.startsWith("ext:"))
ui.backgroundMusic.src = `${lib.assetURL}extension/${music.slice(4)}`; ui.backgroundMusic.src = `${lib.assetURL}extension/${music.slice(4)}`;
@ -4651,8 +4666,8 @@ export class Game {
* @param { string } name * @param { string } name
* @param { string } skill * @param { string } skill
* @param { Player } player * @param { Player } player
* @param { import('../library/index.js').GameEventPromise } event * @param { GameEventPromise } event
* @returns { import('../library/index.js').GameEventPromise } * @returns { GameEventPromise }
*/ */
createTrigger(name, skill, player, event, indexedData) { createTrigger(name, skill, player, event, indexedData) {
let info = get.info(skill); let info = get.info(skill);
@ -4675,7 +4690,7 @@ export class Game {
* *
* @param { string } name * @param { string } name
* @param { false } [trigger] * @param { false } [trigger]
* @param { import('../library/index.js').GameEventPromise } [triggerEvent] * @param { GameEventPromise } [triggerEvent]
*/ */
createEvent(name, trigger, triggerEvent) { createEvent(name, trigger, triggerEvent) {
const next = new lib.element.GameEvent(name, trigger).toPromise(); const next = new lib.element.GameEvent(name, trigger).toPromise();
@ -4736,7 +4751,8 @@ export class Game {
const audiosrc = "die:ext:" + extname + "/" + j + ".mp3"; const audiosrc = "die:ext:" + extname + "/" + j + ".mp3";
if ( if (
!pack[i][j][4].some( !pack[i][j][4].some(
(str) => typeof str == "string" && /^(?:db:extension-|ext:):(?:.+)/.test(str) (str) =>
typeof str == "string" && /^(?:db:extension-.+?|ext|img):(?:.+)/.test(str)
) )
) )
pack[i][j][4].add(imgsrc); pack[i][j][4].add(imgsrc);
@ -4785,6 +4801,7 @@ export class Game {
if (info.audio == true) { if (info.audio == true) {
info.audio = "ext:" + extname; info.audio = "ext:" + extname;
} }
if (!info.image || typeof info.image !== "string") {
if (info.fullskin) { if (info.fullskin) {
if (_status.evaluatingExtension) { if (_status.evaluatingExtension) {
info.image = "db:extension-" + extname + ":" + name + ".png"; info.image = "db:extension-" + extname + ":" + name + ".png";
@ -4798,6 +4815,7 @@ export class Game {
info.image = "ext:" + extname + "/" + name + ".jpg"; info.image = "ext:" + extname + "/" + name + ".jpg";
} }
} }
}
lib.card[name] = info; lib.card[name] = info;
lib.translate[name] = info2.translate; lib.translate[name] = info2.translate;
lib.translate[name + "_info"] = info2.description; lib.translate[name + "_info"] = info2.description;
@ -4915,11 +4933,15 @@ export class Game {
lib.translate[name] = info2.translate; lib.translate[name] = info2.translate;
let imgsrc; let imgsrc;
let extname = _status.extension || info2.extension; let extname = _status.extension || info2.extension;
if (info.splash) {
imgsrc = info.splash;
} else {
if (_status.evaluatingExtension) { if (_status.evaluatingExtension) {
imgsrc = "extension-" + extname + ":" + name + ".jpg"; imgsrc = "extension-" + extname + ":" + name + ".jpg";
} else { } else {
imgsrc = "ext:" + extname + "/" + name + ".jpg"; imgsrc = "ext:" + extname + "/" + name + ".jpg";
} }
}
lib.mode[name] = { lib.mode[name] = {
name: info2.translate, name: info2.translate,
config: info2.config, config: info2.config,
@ -5832,11 +5854,11 @@ export class Game {
*/ */
executingAsyncEventMap = new Map(); executingAsyncEventMap = new Map();
/** /**
* @type { import('../library/index.js').GameEventPromise[] } * @type { GameEventPromise[] }
*/ */
belongAsyncEventList = []; belongAsyncEventList = [];
/** /**
* @param { import('../library/index.js').GameEventPromise } [belongAsyncEvent] * @param { GameEventPromise } [belongAsyncEvent]
*/ */
async loop(belongAsyncEvent) { async loop(belongAsyncEvent) {
if (belongAsyncEvent) { if (belongAsyncEvent) {
@ -6017,7 +6039,7 @@ export class Game {
} }
} }
/** /**
* @param { import('../library/index.js').GameEventPromise } [belongAsyncEvent] * @param { GameEventPromise } [belongAsyncEvent]
*/ */
runContent(belongAsyncEvent) { runContent(belongAsyncEvent) {
return new Promise((resolve) => { return new Promise((resolve) => {
@ -6331,7 +6353,7 @@ export class Game {
return game.asyncDelay(time, time2); return game.asyncDelay(time, time2);
} }
/** /**
* @param { import('../library/index.js').GameEventPromise } [event] * @param { GameEventPromise } [event]
*/ */
check(event = _status.event) { check(event = _status.event) {
game.callHook("checkBegin", [event]); game.callHook("checkBegin", [event]);
@ -7486,20 +7508,21 @@ export class Game {
} }
/** /**
* @param { Player[] } players * @param { Player[] } players
* @param { number | number[] | (player: Player) => number } num * @param { number | number[] | (player: Player) => number } [num]
* @param { { drawDeck: boolean } } [drawDeck] * @param { { drawDeck: boolean } } [drawDeck]
* @param { boolean } [bottom] * @param { boolean } [bottom]
*/ */
asyncDraw(players, num, drawDeck, bottom) { async asyncDraw(players, num, drawDeck, bottom) {
return players.forEach((value, index) => { for (let index = 0; index < players.length; index++) {
const value = players[index];
let num2 = 1; let num2 = 1;
if (typeof num == "number") num2 = num; if (typeof num == "number") num2 = num;
else if (Array.isArray(num)) num2 = num[index]; else if (Array.isArray(num)) num2 = num[index];
else if (typeof num == "function") num2 = num(value); else if (typeof num == "function") num2 = num(value);
if (drawDeck && drawDeck.drawDeck) value.draw(num2, false, drawDeck); if (drawDeck && drawDeck.drawDeck) await value.draw(num2, false, drawDeck);
else if (bottom) value.draw(num2, "nodelay", "bottom"); else if (bottom) await value.draw(num2, "nodelay", "bottom");
else value.draw(num2, "nodelay"); else await value.draw(num2, "nodelay");
}); }
} }
/** /**
* @param { Player[] } players * @param { Player[] } players
@ -7936,7 +7959,7 @@ export class Game {
* @param { Player } player * @param { Player } player
* @param { string | Card[] } card * @param { string | Card[] } card
* @param { Player[] } [targets] * @param { Player[] } [targets]
* @param { import('../library/index.js').GameEventPromise } [event] * @param { GameEventPromise } [event]
* @param { boolean } [forced] * @param { boolean } [forced]
* @param { string } [logvid] * @param { string } [logvid]
*/ */

View File

@ -126,4 +126,17 @@ export class GamePromises {
}) })
); );
} }
/**
* 获取文件列表
*
* @param { string } dir 目录
* @returns { Promise<[string[], string[]]> } 返回一个数组第一个元素是文件夹列表第二个元素是文件列表
*/
getFileList(dir) {
return new Promise((resolve, reject) => {
// @ts-ignore
game.getFileList(dir, (folders, files) => resolve([folders, files]), reject);
});
}
} }

View File

@ -916,21 +916,30 @@ export class Get {
"[object Date]": true, "[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 // @ts-ignore
if (map.has(obj)) return map.get(obj); if (map.has(obj)) return map.get(obj);
const constructor = obj.constructor; const constructor = obj.constructor;
// @ts-ignore // @ts-ignore
const target = constructor // 这四类数据处理单独处理
? // 这四类数据处理单独处理
// 实际上需要处理的只有Map和Set // 实际上需要处理的只有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 ? // @ts-ignore
new constructor() new constructor()
: constructor.name in window && /\[native code\]/.test(constructor.toString()) : constructor.name in window &&
/\[native code\]/.test(constructor.toString())
? // @ts-ignore ? // @ts-ignore
new constructor(obj) new constructor(obj)
: obj : obj
@ -959,7 +968,11 @@ export class Get {
if (obj.hasOwnProperty(key)) { if (obj.hasOwnProperty(key)) {
const result = { enumerable, configurable }; const result = { enumerable, configurable };
if (descriptor.hasOwnProperty("value")) { if (descriptor.hasOwnProperty("value")) {
result.value = get.copy(descriptor.value, copyKeyDeep, map); result.value = get.copy(
descriptor.value,
copyKeyDeep,
map
);
result.writable = descriptor.writable; result.writable = descriptor.writable;
} else { } else {
const { get, set } = descriptor; const { get, set } = descriptor;

View File

@ -11,10 +11,13 @@ export const importCardPack = generateImportFunction("card", (name) => `../../ca
* @param {string} name - 武将包名 * @param {string} name - 武将包名
* @returns {Promise<void>} * @returns {Promise<void>}
*/ */
export const importCharacterPack = generateImportFunction( export const importCharacterPack = generateImportFunction("character", (name) => {
"character", const alreadyModernCharacterPack = ["key"];
(name) => `../../character/${name}.js`
); return alreadyModernCharacterPack.includes(name)
? `../../character/${name}/index.js`
: `../../character/${name}.js`;
});
/** /**
* @param {string} name - 扩展名 * @param {string} name - 扩展名

View File

@ -165,9 +165,13 @@ Reflect.defineProperty(HTMLDivElement.prototype, "setBackground", {
nameinfo = get.character(name); nameinfo = get.character(name);
} }
} }
if (!modeimage && nameinfo && nameinfo[4]) let imgPrefixUrl;
if (!modeimage && nameinfo && nameinfo[4]) {
for (const value of nameinfo[4]) { for (const value of nameinfo[4]) {
if (value.startsWith("ext:")) { if (value.startsWith("img:")) {
imgPrefixUrl = value.slice(4);
break;
} else if (value.startsWith("ext:")) {
extimage = value; extimage = value;
break; break;
} else if (value.startsWith("db:")) { } else if (value.startsWith("db:")) {
@ -181,7 +185,9 @@ Reflect.defineProperty(HTMLDivElement.prototype, "setBackground", {
break; break;
} }
} }
if (extimage) src = extimage.replace(/^ext:/, "extension/"); }
if (imgPrefixUrl) src = imgPrefixUrl;
else if (extimage) src = extimage.replace(/^ext:/, "extension/");
else if (dbimage) { else if (dbimage) {
this.setBackgroundDB(dbimage.slice(3)); this.setBackgroundDB(dbimage.slice(3));
return this; return this;
@ -225,6 +231,8 @@ HTMLDivElement.prototype.setBackgroundImage = function (img) {
.unique() .unique()
.map((v) => `url("${lib.assetURL}${v}")`) .map((v) => `url("${lib.assetURL}${v}")`)
.join(","); .join(",");
} else if (URL.canParse(img)) {
this.style.backgroundImage = `url("${img}")`;
} else { } else {
this.style.backgroundImage = `url("${lib.assetURL}${img}")`; this.style.backgroundImage = `url("${lib.assetURL}${img}")`;
} }

View File

@ -6,6 +6,7 @@ export class Button extends HTMLDivElement {
/** /**
* @type { string | undefined } * @type { string | undefined }
*/ */
// eslint-disable-next-line no-unreachable
buttonid; buttonid;
/** /**
* @param {{}} item * @param {{}} item
@ -21,13 +22,26 @@ export class Button extends HTMLDivElement {
// @ts-ignore // @ts-ignore
[item, type, position, noClick, button] = other._args; [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]) 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) { if (button) {
Object.setPrototypeOf(button, (lib.element.Button || Button).prototype); Object.setPrototypeOf(
button,
(lib.element.Button || Button).prototype
);
if (!noClick) if (!noClick)
button.addEventListener(lib.config.touchscreen ? "touchend" : "click", ui.click.button); button.addEventListener(
lib.config.touchscreen ? "touchend" : "click",
ui.click.button
);
else { else {
button.classList.add("noclick"); button.classList.add("noclick");
const intro = button.querySelector(".intro"); const intro = button.querySelector(".intro");

View File

@ -40,7 +40,10 @@ export class Card extends HTMLDivElement {
buildEventListener(info) { buildEventListener(info) {
let card = this; let card = this;
if (info != "noclick") { 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) { if (lib.config.touchscreen) {
card.addEventListener("touchstart", ui.click.cardtouchstart); card.addEventListener("touchstart", ui.click.cardtouchstart);
card.addEventListener("touchmove", ui.click.cardtouchmove); card.addEventListener("touchmove", ui.click.cardtouchmove);
@ -75,6 +78,7 @@ export class Card extends HTMLDivElement {
if (!noclick) lib.setIntro(this); if (!noclick) lib.setIntro(this);
} }
/** @type { SMap<HTMLDivElement> } */ /** @type { SMap<HTMLDivElement> } */
// eslint-disable-next-line no-unreachable
node; node;
/** /**
* @type { string } * @type { string }
@ -96,6 +100,10 @@ export class Card extends HTMLDivElement {
* @type { any[] } * @type { any[] }
*/ */
_uncheck; _uncheck;
/**
* @type { boolean }
*/
isCard;
//执行销毁一张牌的钩子函数 //执行销毁一张牌的钩子函数
selfDestroy(event) { selfDestroy(event) {
if (this._selfDestroyed) return; if (this._selfDestroyed) return;
@ -192,7 +200,10 @@ export class Card extends HTMLDivElement {
} }
removeGaintag(tag) { removeGaintag(tag) {
if (tag === true) { 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([]); this.addGaintag([]);
} else if (this.hasGaintag(tag)) { } else if (this.hasGaintag(tag)) {
this.gaintag.remove(tag); this.gaintag.remove(tag);
@ -260,7 +271,11 @@ export class Card extends HTMLDivElement {
this.number = parseInt(card[1]) || 0; this.number = parseInt(card[1]) || 0;
this.name = card[2]; 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; this.destroyed = info.destroy;
} }
@ -291,7 +306,21 @@ export class Card extends HTMLDivElement {
var cardnum = card[1] || ""; var cardnum = card[1] || "";
if (parseInt(cardnum) == cardnum) cardnum = parseInt(cardnum); if (parseInt(cardnum) == cardnum) cardnum = parseInt(cardnum);
if (cardnum > 0 && cardnum < 14) { 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) { if (this.name) {
this.classList.remove("epic"); this.classList.remove("epic");
@ -338,14 +367,20 @@ export class Card extends HTMLDivElement {
this.classList.add("fullskin"); this.classList.add("fullskin");
if (img) { if (img) {
if (img.startsWith("ext:")) { if (img.startsWith("ext:")) {
this.node.image.setBackgroundImage(img.replace(/^ext:/, "extension/")); this.node.image.setBackgroundImage(
img.replace(/^ext:/, "extension/")
);
} else { } else {
this.node.image.setBackgroundDB(img); this.node.image.setBackgroundDB(img);
} }
} else { } else {
if (lib.card[bg].modeimage) { if (lib.card[bg].modeimage) {
this.node.image.setBackgroundImage( this.node.image.setBackgroundImage(
"image/mode/" + lib.card[bg].modeimage + "/card/" + bg + ".png" "image/mode/" +
lib.card[bg].modeimage +
"/card/" +
bg +
".png"
); );
} else { } else {
do { do {
@ -353,18 +388,29 @@ export class Card extends HTMLDivElement {
if (bg == "sha" && typeof nature == "string") { if (bg == "sha" && typeof nature == "string") {
let natures = get.natureList(nature), let natures = get.natureList(nature),
_bg; _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) { if (_bg) {
this.node.image.setBackgroundImage(lib.natureBg.get(_bg)); this.node.image.setBackgroundImage(
lib.natureBg.get(_bg)
);
break; break;
} }
} }
this.node.image.setBackgroundImage("image/card/" + bg + ".png"); this.node.image.setBackgroundImage(
"image/card/" + bg + ".png"
);
} while (0); } while (0);
} }
} }
} else if (get.dynamicVariable(lib.card[bg].image, this) == "background") { } else if (
if (card[3]) this.node.background.setBackground(bg + "_" + get.natureList(card[3])[0], "card"); 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 this.node.background.setBackground(bg, "card");
} else if (lib.card[bg].fullimage) { } else if (lib.card[bg].fullimage) {
this.classList.add("fullimage"); this.classList.add("fullimage");
@ -376,10 +422,19 @@ export class Card extends HTMLDivElement {
this.setBackgroundDB(img); this.setBackgroundDB(img);
} }
} else if (get.dynamicVariable(lib.card[bg].image, this)) { } else if (get.dynamicVariable(lib.card[bg].image, this)) {
if (get.dynamicVariable(lib.card[bg].image, this).startsWith("character:")) { if (
this.setBackground(get.dynamicVariable(lib.card[bg].image, this).slice(10), "character"); get
.dynamicVariable(lib.card[bg].image, this)
.startsWith("character:")
) {
this.setBackground(
get.dynamicVariable(lib.card[bg].image, this).slice(10),
"character"
);
} else { } else {
this.setBackground(get.dynamicVariable(lib.card[bg].image, this)); this.setBackground(
get.dynamicVariable(lib.card[bg].image, this)
);
} }
} else { } else {
var cardPack = lib.cardPack["mode_" + get.mode()]; var cardPack = lib.cardPack["mode_" + get.mode()];
@ -407,30 +462,44 @@ export class Card extends HTMLDivElement {
} }
if (img) { if (img) {
if (img.startsWith("ext:")) { 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"; this.node.avatar.style.backgroundSize = "cover";
} else { } else {
this.node.avatar.setBackgroundDB(img); this.node.avatar.setBackgroundDB(img);
} }
} else if (get.dynamicVariable(lib.card[bg].image, this)) { } 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( this.node.avatar.setBackground(
get.dynamicVariable(lib.card[bg].image, this).slice(10), get.dynamicVariable(lib.card[bg].image, this).slice(10),
"character" "character"
); );
} else { } else {
this.node.avatar.setBackground(get.dynamicVariable(lib.card[bg].image, this)); this.node.avatar.setBackground(
get.dynamicVariable(lib.card[bg].image, this)
);
} }
} else { } else {
var cardPack = lib.cardPack["mode_" + get.mode()]; var cardPack = lib.cardPack["mode_" + get.mode()];
if (Array.isArray(cardPack) && cardPack.includes(bg)) { 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 { } else {
this.node.avatar.setBackground("card/" + bg); this.node.avatar.setBackground("card/" + bg);
} }
} }
} else if (get.dynamicVariable(lib.card[bg].image, this) == "card") { } 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 this.setBackground(bg, "card");
} else if ( } else if (
typeof get.dynamicVariable(lib.card[bg].image, this) == "string" && typeof get.dynamicVariable(lib.card[bg].image, this) == "string" &&
@ -444,13 +513,18 @@ export class Card extends HTMLDivElement {
this.setBackgroundDB(img); this.setBackgroundDB(img);
} }
} else { } else {
this.setBackground(get.dynamicVariable(lib.card[bg].image, this)); this.setBackground(
get.dynamicVariable(lib.card[bg].image, this)
);
} }
} else { } else {
this.node.background.innerHTML = 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; // 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"); else this.node.background.classList.remove("tight");
} }
if (!lib.card[bg].fullborder && this.node.avatar && this.node.framebg) { 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); let natures = get.natureList(nature);
natures.sort(lib.sort.nature); natures.sort(lib.sort.nature);
for (let nature of natures) { 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); 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.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"); this.classList.add("card");
if (card[3]) { if (card[3]) {
let natures = get.natureList(card[3]); let natures = get.natureList(card[3]);
@ -539,7 +617,8 @@ export class Card extends HTMLDivElement {
var dist = lib.card[this.name].distance; var dist = lib.card[this.name].distance;
if (dist.attackFrom) { if (dist.attackFrom) {
added = true; added = true;
this.node.range.innerHTML = "范围: " + (-dist.attackFrom + 1); this.node.range.innerHTML =
"范围: " + (-dist.attackFrom + 1);
} }
} }
if (!added) { if (!added) {
@ -548,13 +627,15 @@ export class Card extends HTMLDivElement {
break; break;
case "equip3": case "equip3":
if (info.distance && info.distance.globalTo) { if (info.distance && info.distance.globalTo) {
this.node.range.innerHTML = "防御: " + info.distance.globalTo; this.node.range.innerHTML =
"防御: " + info.distance.globalTo;
this.node.name2.innerHTML += "+"; this.node.name2.innerHTML += "+";
} }
break; break;
case "equip4": case "equip4":
if (info.distance && info.distance.globalFrom) { if (info.distance && info.distance.globalFrom) {
this.node.range.innerHTML = "进攻: " + -info.distance.globalFrom; this.node.range.innerHTML =
"进攻: " + -info.distance.globalFrom;
this.node.name2.innerHTML += "-"; this.node.name2.innerHTML += "-";
} }
break; break;
@ -608,7 +689,8 @@ export class Card extends HTMLDivElement {
game.layout == "nova") game.layout == "nova")
) { ) {
if (bool) { if (bool) {
this.style.transform = this._transform + " translateY(-20px)"; this.style.transform =
this._transform + " translateY(-20px)";
} else { } else {
this.style.transform = this._transform || ""; this.style.transform = this._transform || "";
} }
@ -659,12 +741,16 @@ export class Card extends HTMLDivElement {
let owner = get.owner(this); let owner = get.owner(this);
if (owner) { if (owner) {
if (owner == player) return true; //是牌主,必知情。 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 (owner.isUnderControl(true, player)) return true; //被操控,必知情。
} }
if (get.is.shownCard(this)) return true; //此牌是明置牌,必知情。 if (get.is.shownCard(this)) return true; //此牌是明置牌,必知情。
if (this._knowers) { 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; return false;
} }
@ -702,8 +788,13 @@ export class Card extends HTMLDivElement {
this.style.left = this.offsetLeft + "px"; this.style.left = this.offsetLeft + "px";
this.style.top = this.offsetTop + "px"; this.style.top = this.offsetTop + "px";
dx = player.getLeft() + player.offsetWidth / 2 - 52 - this.offsetLeft; dx =
dy = player.getTop() + player.offsetHeight / 2 - 52 - this.offsetTop; player.getLeft() +
player.offsetWidth / 2 -
52 -
this.offsetLeft;
dy =
player.getTop() + player.offsetHeight / 2 - 52 - this.offsetTop;
} }
if (get.is.mobileMe(player)) { if (get.is.mobileMe(player)) {
dx += get.cardOffset(); dx += get.cardOffset();
@ -753,8 +844,10 @@ export class Card extends HTMLDivElement {
var clone = true; var clone = true;
var position; var position;
for (var i = 0; i < arguments.length; i++) { for (var i = 0; i < arguments.length; i++) {
if (typeof arguments[i] == "string") node.classList.add(arguments[i]); if (typeof arguments[i] == "string")
else if (["div", "fragment"].includes(get.objtype(arguments[i]))) position = arguments[i]; 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]; else if (typeof arguments[i] == "boolean") clone = arguments[i];
} }
node.moveTo = lib.element.Card.prototype.moveTo; node.moveTo = lib.element.Card.prototype.moveTo;
@ -780,7 +873,9 @@ export class Card extends HTMLDivElement {
* @returns {boolean} 是否包含class * @returns {boolean} 是否包含class
*/ */
classListContains(className) { classListContains(className) {
return Array.from(arguments).some((name) => this.classList.contains(className)); return Array.from(arguments).some((name) =>
this.classList.contains(className)
);
} }
/** /**
* 判断此牌是否包含class样式参数有多个时需全部满足 * 判断此牌是否包含class样式参数有多个时需全部满足
@ -790,7 +885,9 @@ export class Card extends HTMLDivElement {
* @returns {boolean} 是否包含class * @returns {boolean} 是否包含class
*/ */
classListContainsAll() { 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) { if (bool === false) {
ui.cardPile.insertBefore( ui.cardPile.insertBefore(
this, this,
ui.cardPile.childNodes[Math.floor(Math.random() * ui.cardPile.childNodes.length)] ui.cardPile.childNodes[
Math.floor(Math.random() * ui.cardPile.childNodes.length)
]
); );
} else { } else {
if (_status.discarded) { if (_status.discarded) {

View File

@ -5,6 +5,7 @@ import { ui } from "../../ui/index.js";
export class Dialog extends HTMLDivElement { export class Dialog extends HTMLDivElement {
/** @type { HTMLDivElement } */ /** @type { HTMLDivElement } */
// eslint-disable-next-line no-unreachable
contentContainer; contentContainer;
/** @type { HTMLDivElement } */ /** @type { HTMLDivElement } */
content; content;
@ -51,7 +52,8 @@ export class Dialog extends HTMLDivElement {
else dialog.add(argument); else dialog.add(argument);
}); });
//if (!hidden) dialog.open(); //if (!hidden) dialog.open();
if (!lib.config.touchscreen) dialog.contentContainer.onscroll = ui.update; if (!lib.config.touchscreen)
dialog.contentContainer.onscroll = ui.update;
if (!noTouchScroll) { if (!noTouchScroll) {
dialog.contentContainer.ontouchstart = ui.click.dialogtouchStart; dialog.contentContainer.ontouchstart = ui.click.dialogtouchStart;
dialog.contentContainer.ontouchmove = ui.click.touchScroll; dialog.contentContainer.ontouchmove = ui.click.touchScroll;
@ -98,21 +100,27 @@ export class Dialog extends HTMLDivElement {
const buttons = ui.create.div(".buttons", this.content); const buttons = ui.create.div(".buttons", this.content);
if (zoom) buttons.classList.add("smallzoom"); if (zoom) buttons.classList.add("smallzoom");
// @ts-ignore // @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 // @ts-ignore
else if (get.itemtype(item) == "players") { else if (get.itemtype(item) == "players") {
var buttons = ui.create.div(".buttons", this.content); var buttons = ui.create.div(".buttons", this.content);
if (zoom) buttons.classList.add("smallzoom"); if (zoom) buttons.classList.add("smallzoom");
// @ts-ignore // @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") { } else if (item[1] == "textbutton") {
ui.create.textbuttons(item[0], this, noclick); ui.create.textbuttons(item[0], this, noclick);
} else { } else {
var buttons = ui.create.div(".buttons", this.content); var buttons = ui.create.div(".buttons", this.content);
if (zoom) buttons.classList.add("smallzoom"); if (zoom) buttons.classList.add("smallzoom");
// @ts-ignore // @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.buttons.length) {
if (this.forcebutton !== false) this.forcebutton = true; if (this.forcebutton !== false) this.forcebutton = true;
@ -166,10 +174,19 @@ export class Dialog extends HTMLDivElement {
} }
ui.dialog = this; ui.dialog = this;
let translate; 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; translate = lib.config.dialog_transform;
this._dragtransform = translate; 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 { } else {
this.style.transform = "scale(0.8)"; this.style.transform = "scale(0.8)";
} }
@ -179,8 +196,17 @@ export class Dialog extends HTMLDivElement {
ui.dialogs.unshift(this); ui.dialogs.unshift(this);
ui.update(); ui.update();
ui.refresh(this); ui.refresh(this);
if (lib.config.remember_dialog && lib.config.dialog_transform && !this.classList.contains("fixed")) { if (
this.style.transform = "translate(" + translate[0] + "px," + translate[1] + "px) scale(1)"; 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 { } else {
this.style.transform = "scale(1)"; this.style.transform = "scale(1)";
} }

View File

@ -67,37 +67,30 @@ export class GameEvent {
/** /**
* @type { Player } * @type { Player }
*/ */
// @ts-ignore
source; source;
/** /**
* @type { Player } * @type { Player }
*/ */
// @ts-ignore
player; player;
/** /**
* @type { Player[] } * @type { Player[] }
*/ */
// @ts-ignore
players; players;
/** /**
* @type { Player } * @type { Player }
*/ */
// @ts-ignore
target; target;
/** /**
* @type { Player[] } * @type { Player[] }
*/ */
// @ts-ignore
targets; targets;
/** /**
* @type { Card } * @type { Card }
*/ */
// @ts-ignore
card; card;
/** /**
* @type { Card[] } * @type { Card[] }
*/ */
// @ts-ignore
cards; cards;
/** /**
* @type { string } * @type { string }
@ -114,7 +107,6 @@ export class GameEvent {
/** /**
* @type { GameEvent } * @type { GameEvent }
*/ */
// @ts-ignore
_trigger; _trigger;
/** /**
* @type { Result } * @type { Result }
@ -123,61 +115,79 @@ export class GameEvent {
/** /**
* @type { number } * @type { number }
*/ */
// @ts-ignore
baseDamage; baseDamage;
/** /**
* @type { Player } * @type { Player }
*/ */
// @ts-ignore
customSource; customSource;
/** /**
* @type { number } * @type { number }
*/ */
// @ts-ignore
extraDamage; extraDamage;
/** /**
* @type { string } * @type { string }
*/ */
// @ts-ignore
nature; nature;
/** /**
* @type { boolean } * @type { boolean }
*/ */
// @ts-ignore
notrigger; notrigger;
/** /**
* @type { number } * @type { number }
*/ */
// @ts-ignore
original_num; original_num;
/** /**
* @type { boolean } * @type { boolean }
*/ */
// @ts-ignore
unreal; unreal;
/** /**
* @type { Button[] } * @type { Button[] }
*/ */
// @ts-ignore
excludeButton; excludeButton;
/** /**
* @type { Result } * @type { Result }
*/ */
// @ts-ignore
result; result;
/** /**
* @type { GameEventPromise | void | null } * @type { GameEventPromise | void | null }
*/ */
// @ts-ignore
parent; parent;
/** /**
* @type { string } * @type { string }
*/ */
name; name;
/** /**
* @type { Function | void | null } * @type { (this: GameEventPromise) => any | undefined | void | null }
*/ */
filterStop; 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 {keyof this} key
* @param {number} [value] * @param {number} [value]

View File

@ -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 { ai } from "../../ai/index.js";
import { get } from "../../get/index.js"; import { get } from "../../get/index.js";
import { game } from "../../game/index.js"; import { game } from "../../game/index.js";
@ -165,6 +179,7 @@ export class Player extends HTMLDivElement {
} }
} }
/** @type { SMap<HTMLDivElement> } */ /** @type { SMap<HTMLDivElement> } */
// eslint-disable-next-line no-unreachable
node; node;
/** /**
* @type { number } * @type { number }
@ -223,17 +238,7 @@ export class Player extends HTMLDivElement {
*/ */
stat; stat;
/** /**
* @type { { * @type { ActionHistory[] }
* useCard: GameEventPromise[],
* respond: GameEventPromise[],
* skipped: GameEventPromise[],
* lose: GameEventPromise[],
* gain: GameEventPromise[],
* sourceDamage: GameEventPromise[],
* damage: GameEventPromise[],
* custom: GameEventPromise[],
* useSkill: GameEventPromise[],
* }[] }
*/ */
actionHistory; actionHistory;
/** /**
@ -261,7 +266,8 @@ export class Player extends HTMLDivElement {
* friend: [], * friend: [],
* enemy: [], * enemy: [],
* neutral: [], * neutral: [],
* handcards: { * shown?: number,
* handcards?: {
* global: [], * global: [],
* source: [], * source: [],
* viewed: [] * viewed: []
@ -341,6 +347,18 @@ export class Player extends HTMLDivElement {
* @type { ((player: this) => any)[] } * @type { ((player: this) => any)[] }
*/ */
_inits; _inits;
/**
* @type { boolean }
*/
isZhu;
/**
* @type { string }
*/
identity;
/**
* @type { boolean | undefined }
*/
identityShown;
//新函数 //新函数
/** /**
* 怒气 * 怒气
@ -1401,7 +1419,7 @@ export class Player extends HTMLDivElement {
/** /**
* 向target发起协力 * 向target发起协力
* @param { Player } target * @param { Player } target
* @param {*} type * @param { string } type
* @param {*} reason * @param {*} reason
*/ */
cooperationWith(target, type, reason) { cooperationWith(target, type, reason) {
@ -2022,6 +2040,7 @@ export class Player extends HTMLDivElement {
/** /**
* @param { string } name * @param { string } name
* @param { string } type * @param { string } type
* @returns { boolean }
*/ */
hasUsableCard(name, type) { hasUsableCard(name, type) {
if (typeof type !== "string") type = type ? "limit" : "all"; if (typeof type !== "string") type = type ? "limit" : "all";
@ -3697,6 +3716,12 @@ export class Player extends HTMLDivElement {
if (num == undefined) return 0; if (num == undefined) return 0;
return num; return num;
} }
/**
* @param {*} [unowned]
* @param {*} [unique]
* @param {*} [hidden]
* @returns { string[] }
*/
getStockSkills(unowned, unique, hidden) { getStockSkills(unowned, unique, hidden) {
var list = []; var list = [];
if (lib.character[this.name] && (hidden || !this.isUnseen(0))) { if (lib.character[this.name] && (hidden || !this.isUnseen(0))) {
@ -3841,6 +3866,11 @@ export class Player extends HTMLDivElement {
getDiscardableCards(player, arg1, arg2) { getDiscardableCards(player, arg1, arg2) {
return Array.from(this.iterableGetDiscardableCards(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) { *iterableGetGainableCards(player, arg1, arg2) {
for (let card of this.iterableGetCards(arg1, arg2)) { for (let card of this.iterableGetCards(arg1, arg2)) {
if (lib.filter.canBeGained(card, player, this)) { 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) { getGainableCards(player, arg1, arg2) {
return Array.from(this.iterableGetGainableCards(player, arg1, arg2)); return Array.from(this.iterableGetGainableCards(player, arg1, arg2));
} }
@ -3859,6 +3895,10 @@ export class Player extends HTMLDivElement {
} }
return list; return list;
} }
/**
* @param { Parameters<typeof this['iterableGetCards']>[0] } [arg1]
* @param { Parameters<typeof this['iterableGetCards']>[1] } [arg2]
*/
countCards(arg1, arg2) { countCards(arg1, arg2) {
let count = 0; let count = 0;
for (let item of this.iterableGetCards(arg1, arg2)) { for (let item of this.iterableGetCards(arg1, arg2)) {
@ -3882,6 +3922,11 @@ export class Player extends HTMLDivElement {
countDiscardableCards(player, arg1, arg2) { countDiscardableCards(player, arg1, arg2) {
return this.getDiscardableCards(player, arg1, arg2).length; 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) { countGainableCards(player, arg1, arg2) {
return this.getGainableCards(player, arg1, arg2).length; 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)); skills.sort((a, b) => get.priority(a) - get.priority(b));
return skills; return skills;
} }
/**
* @param { string | boolean | null } [arg2]
* @param { boolean | null} [arg3]
* @param {boolean} [arg4]
*/
getSkills(arg2, arg3, arg4) { getSkills(arg2, arg3, arg4) {
var skills = this.skills.slice(0); var skills = this.skills.slice(0);
var es = []; var es = [];
@ -5780,7 +5830,12 @@ export class Player extends HTMLDivElement {
); );
return this; return this;
} }
gainMultiple(targets, position) { /**
*
* @param { Player[] } targets
* @param { string } [position]
*/
gainMultiple(targets, position = "h") {
var next = game.createEvent("gainMultiple", false); var next = game.createEvent("gainMultiple", false);
next.setContent("gainMultiple"); next.setContent("gainMultiple");
next.player = this; next.player = this;
@ -5944,6 +5999,12 @@ export class Player extends HTMLDivElement {
next.gaintag = []; next.gaintag = [];
return next; return next;
} }
/**
*
* @param { Card | Card[] } cards
* @param { Player } target
* @param { boolean } [visible]
*/
give(cards, target, visible) { give(cards, target, visible) {
var next = target.gain(cards, this); var next = target.gain(cards, this);
next.animate = visible ? "give" : "giveAuto"; next.animate = visible ? "give" : "giveAuto";
@ -6135,6 +6196,9 @@ export class Player extends HTMLDivElement {
next.setContent("doubleDraw"); next.setContent("doubleDraw");
return next; return next;
} }
/**
* @param { number } [num]
*/
loseHp(num) { loseHp(num) {
var next = game.createEvent("loseHp"); var next = game.createEvent("loseHp");
next.num = num; next.num = num;
@ -6786,6 +6850,12 @@ export class Player extends HTMLDivElement {
} }
if (typeof proceed == "function") proceed(); 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) { logSkill(name, targets, nature, logv) {
if (get.itemtype(targets) == "player") targets = [targets]; if (get.itemtype(targets) == "player") targets = [targets];
var nopop = false; var nopop = false;
@ -6979,7 +7049,13 @@ export class Player extends HTMLDivElement {
node.classList.add(className); 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); var name2 = get.translation(name);
if (!name2) return; if (!name2) return;
this.$damagepop(name2, className || "water", true, nobroadcast); this.$damagepop(name2, className || "water", true, nobroadcast);
@ -7402,6 +7478,13 @@ export class Player extends HTMLDivElement {
this.classList.remove("linked"); 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) { canUse(card, target, distance, includecard) {
if (typeof card == "string") card = { name: card, isCard: true }; if (typeof card == "string") card = { name: card, isCard: true };
var info = get.info(card); 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) { addTempSkill(skill, expire, checkConflict) {
if (Array.isArray(skill)) { if (Array.isArray(skill)) {
for (var i = 0; i < skill.length; i++) { for (var i = 0; i < skill.length; i++) {
@ -8416,6 +8511,18 @@ export class Player extends HTMLDivElement {
} }
return evts; 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) { getHistory(key, filter, last) {
if (!key) return this.actionHistory[this.actionHistory.length - 1]; if (!key) return this.actionHistory[this.actionHistory.length - 1];
if (!filter) return this.actionHistory[this.actionHistory.length - 1][key]; if (!filter) return this.actionHistory[this.actionHistory.length - 1][key];
@ -8431,6 +8538,12 @@ export class Player extends HTMLDivElement {
return history.filter(filter); return history.filter(filter);
} }
} }
/**
* @template { keyof ActionHistory } T
* @param { T } key
* @param { (event: GameEventPromise) => boolean } filter
* @param { GameEventPromise } [last]
*/
checkHistory(key, filter, last) { checkHistory(key, filter, last) {
if (!key || !filter) return; if (!key || !filter) return;
else { 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); const history = this.getHistory(key);
if (!filter || typeof filter != "function") filter = lib.filter.all; if (!filter || typeof filter != "function") filter = lib.filter.all;
if (last) { if (last) {
@ -8458,6 +8578,14 @@ export class Player extends HTMLDivElement {
} }
return history.some(filter); 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) { getLastHistory(key, filter, last) {
let history = false; let history = false;
for (let i = this.actionHistory.length - 1; i >= 0; i--) { for (let i = this.actionHistory.length - 1; i >= 0; i--) {
@ -8480,6 +8608,12 @@ export class Player extends HTMLDivElement {
return history.filter(filter); return history.filter(filter);
} }
} }
/**
* @template { keyof ActionHistory } T
* @param { T } key
* @param { (event: GameEventPromise) => boolean } filter
* @param { GameEventPromise } [last]
*/
checkAllHistory(key, filter, last) { checkAllHistory(key, filter, last) {
if (!key || !filter) return; if (!key || !filter) return;
this.actionHistory.forEach((value) => { 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) { getAllHistory(key, filter, last) {
const history = []; const history = [];
this.actionHistory.forEach((value) => { this.actionHistory.forEach((value) => {
@ -8516,6 +8657,13 @@ export class Player extends HTMLDivElement {
} }
return history; return history;
} }
/**
* @template { keyof ActionHistory } T
* @param { T } key
* @param { (event: GameEventPromise) => boolean } filter
* @param { GameEventPromise } [last]
* @returns { boolean }
*/
hasAllHistory(key, filter, last) { hasAllHistory(key, filter, last) {
return this.actionHistory.some((value) => { return this.actionHistory.some((value) => {
let history = value[key]; let history = value[key];
@ -9095,6 +9243,12 @@ export class Player extends HTMLDivElement {
} }
return false; return false;
} }
/**
*
* @param { number | Card[] | Card } [add]
* @param { (card?: Card, player?: Player) => boolean } [filter]
* @param { boolean } [pure]
*/
needsToDiscard(add, filter, pure) { needsToDiscard(add, filter, pure) {
/** /**
* add: (逻辑上)同时考虑获得的这张/些牌 * add: (逻辑上)同时考虑获得的这张/些牌
@ -9123,9 +9277,23 @@ export class Player extends HTMLDivElement {
distanceFrom(target, method) { distanceFrom(target, method) {
return get.distance(target, this, 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) { hasSkill(skill, arg2, arg3, arg4) {
return game.expandSkills(this.getSkills(arg2, arg3, arg4)).includes(skill); 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) { hasStockSkill(skill, arg1, arg2, arg3) {
return game.expandSkills(this.getStockSkills(arg1, arg2, arg3)).includes(skill); return game.expandSkills(this.getStockSkills(arg1, arg2, arg3)).includes(skill);
} }
@ -9152,6 +9320,11 @@ export class Player extends HTMLDivElement {
} }
return false; return false;
} }
/**
*
* @param {string} skill
* @param {Player} [player]
*/
hasZhuSkill(skill, player) { hasZhuSkill(skill, player) {
if (!this.hasSkill(skill)) return false; if (!this.hasSkill(skill)) return false;
if (player) { if (player) {
@ -9186,6 +9359,12 @@ export class Player extends HTMLDivElement {
} }
return false; 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) { hasSkillTag(tag, hidden, arg, globalskill) {
var skills = this.getSkills(hidden); var skills = this.getSkills(hidden);
if (globalskill) { if (globalskill) {
@ -9280,6 +9459,11 @@ export class Player extends HTMLDivElement {
} }
return false; return false;
} }
/**
*
* @param {string|boolean} [respond]
* @param {boolean} [noauto]
*/
hasSha(respond, noauto) { hasSha(respond, noauto) {
if (this.countCards("hs", "sha")) return true; if (this.countCards("hs", "sha")) return true;
if (this.countCards("hs", "hufu")) return true; if (this.countCards("hs", "hufu")) return true;
@ -10847,7 +11031,14 @@ export class Player extends HTMLDivElement {
avatar ? 1600 : 1000 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") { if (typeof num == "number" || typeof num == "string") {
game.addVideo("damagepop", this, [num, nature, font]); game.addVideo("damagepop", this, [num, nature, font]);
if (nobroadcast !== false) if (nobroadcast !== false)

View File

@ -724,7 +724,7 @@ export class LibInit {
let k = 0; let k = 0;
let result; let result;
//去除99个step的限制 //去除99个step的限制
while ((result = str.slice(skip).match(new RegExp(`['"]step ${k}['"]`))) != null) { while ((result = str.slice(skip).match(new RegExp(`\\(?['"]step ${k}['"]\\)?;?`))) != null) {
let insertStr; let insertStr;
if (k == 0) { if (k == 0) {
insertStr = `switch(step){case 0:`; insertStr = `switch(step){case 0:`;

File diff suppressed because it is too large Load Diff

View File

@ -439,11 +439,11 @@ export const otherMenu = function (/** @type { boolean | undefined } */ connectM
* @param { (value: T) => Promise<boolean> } predicate * @param { (value: T) => Promise<boolean> } predicate
*/ */
const asyncFilter = async (arr, predicate) => { const asyncFilter = async (arr, predicate) => {
//将arr每10个分为一个数组分别使用Promise.all //将arr每20个分为一个数组分别使用Promise.all
/** @type { boolean[] } */ /** @type { boolean[] } */
const results = []; const results = [];
for (let i = 0; i < arr.length; i += 10) { for (let i = 0; i < arr.length; i += 20) {
const pushArr = arr.slice(i, i + 10); const pushArr = arr.slice(i, i + 20);
results.push( results.push(
...await Promise.all(pushArr.map(predicate)) ...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 => { const result = await asyncFilter(files.flat(), async v => {
return game.promises.readFile(v.path).then(data => { return game.promises.readFile(v.path).then(data => {
// 有设置就不进行对比直接返回false
if (lib.config.asset_notReplaceExistingFiles) return false;
return v.size != data.byteLength; return v.size != data.byteLength;
}).catch(()=>true) // 报错了就是没有文件
}).catch(() => true);
}).then(arr => arr.map((v) => v.path)); }).then(arr => arr.map((v) => v.path));
console.log("需要更新的文件有:", result); console.log("需要更新的文件有:", result);
@ -463,6 +466,22 @@ export const otherMenu = function (/** @type { boolean | undefined } */ connectM
await lib.init.promises.js("game", "asset"); await lib.init.promises.js("game", "asset");
if (Array.isArray(window.noname_asset_list)) { if (Array.isArray(window.noname_asset_list)) {
game.saveConfig("asset_version", window.noname_asset_list[0]); 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; delete window.noname_asset_list;
} }
if (confirm("更新完成,是否重启?")) { if (confirm("更新完成,是否重启?")) {
@ -655,7 +674,10 @@ export const otherMenu = function (/** @type { boolean | undefined } */ connectM
if (!this.classList.toggle("on")) { if (!this.classList.toggle("on")) {
game.saveConfig("asset_toggle_off", true); game.saveConfig("asset_toggle_off", true);
[ [
/* span2, span2_br, span2_check,*/ span114514_br,
span7,
span7_br,
span7_check,
span3, span3,
span3_br, span3_br,
span3_check, span3_check,
@ -674,7 +696,10 @@ export const otherMenu = function (/** @type { boolean | undefined } */ connectM
} else { } else {
game.saveConfig("asset_toggle_off"); game.saveConfig("asset_toggle_off");
[ [
/* span2, span2_br, span2_check,*/ span114514_br,
span7,
span7_br,
span7_check,
span3, span3,
span3_br, span3_br,
span3_check, span3_check,
@ -698,6 +723,25 @@ export const otherMenu = function (/** @type { boolean | undefined } */ connectM
// var span6_br = ui.create.node('br'); // var span6_br = ui.create.node('br');
// li2.lastChild.appendChild(span6_br); // li2.lastChild.appendChild(span6_br);
// var span2_br = ui.create.node('br'); // var span2_br = ui.create.node('br');
var span114514_br = ui.create.node('br');
li2.lastChild.appendChild(span114514_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"}`); var span4 = ui.create.div("", `字体素材(${lib.config.asset_font_size || "23.4MB"}`);
span4.style.fontSize = "small"; span4.style.fontSize = "small";

View File

@ -136,6 +136,15 @@ export class UI {
* @type {HTMLDivElement} * @type {HTMLDivElement}
*/ */
tempnowuxie; tempnowuxie;
/**
* @type {HTMLDivElement[]}
*/
toastQueue = [];
/**
* @type {HTMLDivElement}
*/
cardPile;
refresh(node) { refresh(node) {
void window.getComputedStyle(node, null).getPropertyValue("opacity"); void window.getComputedStyle(node, null).getPropertyValue("opacity");
} }

View File

@ -43,6 +43,7 @@
// "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */ // "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
/* JavaScript Support */ /* JavaScript Support */
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */ "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
"allowImportingTsExtensions": true,
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
/* Emit */ /* Emit */