noname/character/clan.js

4296 lines
141 KiB
JavaScript
Raw Normal View History

2024-04-15 18:10:02 +00:00
import { lib, game, ui, get, ai, _status } from "../noname.js";
game.import("character", function () {
2023-01-24 13:26:41 +00:00
return {
//clan n.宗派;(尤指苏格兰的)宗族,氏族,家族;庞大的家族;帮派;小集团
2024-04-15 18:10:02 +00:00
name: "clan",
connect: true,
character: {
2024-04-15 18:31:36 +00:00
clan_wuxian: ["female", "shu", 3, ["clanyirong", "clanguixiang", "clanmuyin"], ["clan:陈留吴氏"]],
clan_wuban: ["male", "shu", 4, ["clanzhanding", "clanmuyin"], ["clan:陈留吴氏"]],
clan_xunshu: ["male", "qun", 3, ["clanshenjun", "clanbalong", "clandaojie"], ["clan:颍川荀氏"]],
clan_xunchen: ["male", "qun", 3, ["clansankuang", "clanbeishi", "clandaojie"], ["clan:颍川荀氏"]],
2024-04-15 18:10:02 +00:00
clan_xuncai: [
"female",
"qun",
3,
["clanlieshi", "clandianzhan", "clanhuanyin", "clandaojie"],
["clan:颍川荀氏"],
],
clan_xuncan: [
"male",
"wei",
3,
["clanyunshen", "clanshangshen", "clanfenchai", "clandaojie"],
["clan:颍川荀氏"],
],
2024-04-15 18:31:36 +00:00
clan_hanshao: ["male", "qun", 3, ["clanfangzhen", "clanliuju", "clanxumin"], ["clan:颍川韩氏"]],
clan_hanrong: ["male", "qun", 3, ["clanlianhe", "clanhuanjia", "clanxumin"], ["clan:颍川韩氏"]],
clan_wukuang: ["male", "qun", 4, ["clanlianzhu", "clanmuyin"], ["clan:陈留吴氏"]],
clan_wangling: ["male", "wei", 4, ["clanbolong", "clanzhongliu"], ["clan:太原王氏"]],
2024-04-15 18:10:02 +00:00
clan_zhongyan: [
"female",
"jin",
3,
["clanguangu", "clanxiaoyong", "clanbaozu"],
["clan:颍川钟氏"],
],
clan_wangyun: [
"male",
"qun",
3,
["clanjiexuan", "clanmingjie", "clanzhongliu"],
["clan:太原王氏"],
],
2024-04-15 18:31:36 +00:00
clan_wanghun: ["male", "jin", 3, ["clanfuxun", "clanchenya", "clanzhongliu"], ["clan:太原王氏"]],
2024-04-15 18:10:02 +00:00
clan_zhonghui: [
"male",
"wei",
"3/4",
["clanyuzhi", "clanxieshu", "clanbaozu"],
["clan:颍川钟氏"],
],
2024-04-15 18:31:36 +00:00
clan_zhongyu: ["male", "wei", 3, ["clanjiejian", "clanhuanghan", "clanbaozu"], ["clan:颍川钟氏"]],
2024-04-15 18:10:02 +00:00
clan_wanglun: [
"male",
"jin",
3,
["clanqiuxin", "clanjianyuan", "clanzhongliu"],
["clan:太原王氏"],
],
2024-04-15 18:31:36 +00:00
clan_xunyou: ["male", "wei", 3, ["clanbaichu", "clandaojie"], ["clan:颍川荀氏"]],
clan_wuqiao: ["male", "jin", 4, ["clanqiajue", "clanmuyin"], ["clan:陈留吴氏"]],
2024-04-15 18:10:02 +00:00
clan_wangguang: [
"male",
"wei",
3,
["clanlilun", "clanjianji", "clanzhongliu"],
["clan:太原王氏"],
],
clan_wangmingshan: [
"male",
"wei",
3,
["clantanque", "clanshengmo", "clanzhongliu"],
["clan:太原王氏"],
],
2023-01-24 13:26:41 +00:00
},
2024-04-15 18:10:02 +00:00
characterSort: {
clan: {
2024-04-15 18:31:36 +00:00
clan_wu: ["clan_wuxian", "clan_wuban", "clan_wukuang", "clan_wuqiao"],
clan_xun: ["clan_xunshu", "clan_xunchen", "clan_xuncai", "clan_xuncan", "clan_xunyou"],
2024-04-15 18:10:02 +00:00
clan_han: ["clan_hanshao", "clan_hanrong"],
clan_wang: [
"clan_wangling",
"clan_wangyun",
"clan_wanghun",
"clan_wanglun",
"clan_wangguang",
"clan_wangmingshan",
],
clan_zhong: ["clan_zhongyan", "clan_zhonghui", "clan_zhongyu"],
2023-01-24 13:26:41 +00:00
},
},
2024-02-05 16:26:11 +00:00
/** @type { importCharacterConfig['skill'] } */
2024-04-15 18:10:02 +00:00
skill: {
2024-04-07 21:58:54 +00:00
//族王明山
2024-04-15 18:10:02 +00:00
clantanque: {
audio: 2,
trigger: { player: "useCardAfter" },
usable: 1,
filter(event, player) {
const evt = lib.skill.dcjianying.getLastUsed(player, event);
if (!evt || !evt.card) return false;
const curCard = event.card,
prevCard = evt.card;
const curNum = get.number(curCard),
prevNum = get.number(prevCard);
2024-04-15 18:31:36 +00:00
if (typeof curNum != "number" || typeof prevNum != "number") return false;
2024-04-15 18:10:02 +00:00
const delNum = Math.abs(curNum - prevNum);
if (delNum === 0) return false;
return game.hasPlayer((current) => {
return current.getHp() === delNum;
2024-04-07 21:58:54 +00:00
});
},
2024-04-15 18:10:02 +00:00
locked: false,
async cost(event, trigger, player) {
2024-04-15 18:31:36 +00:00
const evt = lib.skill.dcjianying.getLastUsed(player, trigger);
2024-04-15 18:10:02 +00:00
const curCard = trigger.card,
prevCard = evt.card;
const curNum = get.number(curCard),
prevNum = get.number(prevCard);
const delNum = Math.abs(curNum - prevNum);
event.result = await player
.chooseTarget(
get.prompt("clantanque"),
`对一名体力值为${delNum}的角色造成1点伤害`,
(card, player, target) => {
return target.getHp() === get.event("delNum");
}
)
.set("delNum", delNum)
.set("ai", (target) => {
2024-04-15 18:31:36 +00:00
return get.damageEffect(target, get.player(), get.player());
2024-04-15 18:10:02 +00:00
})
.forResult();
},
async content(event, trigger, player) {
const target = event.targets[0];
2024-04-07 21:58:54 +00:00
await target.damage();
await game.asyncDelayx();
},
2024-04-15 18:10:02 +00:00
mod: {
aiOrder(player, card, num) {
if (typeof card != "object") return;
const evt = lib.skill.dcjianying.getLastUsed(player);
if (!evt || !evt.card) return;
const curNum = get.number(card),
prevNum = get.number(evt.card);
2024-04-15 18:31:36 +00:00
if (typeof curNum != "number" || typeof prevNum != "number") return;
2024-04-15 18:10:02 +00:00
const pairs = game
.filterPlayer()
.map((current) => {
2024-04-15 18:31:36 +00:00
return [current.getHp(), get.damageEffect(current, player, player)];
2024-04-15 18:10:02 +00:00
})
.filter((pair) => pair[1] > 0);
if (!pairs.length) return;
const delNum = Math.abs(curNum - prevNum);
for (const [hp, eff] of pairs) {
if (hp != delNum) continue;
return (
num +
10 +
2024-04-15 18:31:36 +00:00
pairs.filter((pair) => pair[0] === hp).sort((a, b) => b[1] - a[1])[0][1] / 20
2024-04-15 18:10:02 +00:00
);
2024-04-07 21:58:54 +00:00
}
},
2024-04-15 18:10:02 +00:00
},
2024-04-07 21:58:54 +00:00
},
2024-04-15 18:10:02 +00:00
clanshengmo: {
audio: 2,
enable: "chooseToUse",
hiddenCard(player, name) {
if (get.type(name) != "basic") return false;
if (
!player.getStorage("clanshengmo").includes(name) &&
(get.event("clanshengmo_cards") || []).length > 0
)
return true;
2024-04-07 21:58:54 +00:00
},
2024-04-15 18:10:02 +00:00
filter(event, player) {
if (event.responded) return false;
const names = lib.inpile.filter(
(name) =>
2024-04-15 18:31:36 +00:00
get.type(name) == "basic" && !player.getStorage("clanshengmo").includes(name)
2024-04-15 18:10:02 +00:00
),
cards = get.event("clanshengmo_cards") || [];
return (
cards.length > 0 &&
names.some((name) => {
2024-04-15 18:31:36 +00:00
return event.filterCard({ name, isCard: true }, player, event);
2024-04-15 18:10:02 +00:00
})
);
},
onChooseToUse(event) {
if (game.online) return;
if (!event.clanshengmo_cards) {
let cards = [];
game.checkGlobalHistory("cardMove", (evt) => {
if (
evt.name != "cardsDiscard" &&
2024-04-15 18:31:36 +00:00
(evt.name != "lose" || evt.position != ui.discardPile)
2024-04-15 18:10:02 +00:00
)
return;
2024-04-15 18:31:36 +00:00
cards.addArray(evt.cards.filter((card) => get.position(card, true) == "d"));
2024-04-07 21:58:54 +00:00
});
2024-04-15 18:31:36 +00:00
const numbers = cards.map((card) => get.number(card, false)).unique();
const [min, max] = [Math.min(...numbers), Math.max(...numbers)];
2024-04-15 18:10:02 +00:00
event.set(
"clanshengmo_cards",
cards.filter((card) => {
const num = get.number(card, false);
return num > min && num < max;
})
);
2024-04-07 21:58:54 +00:00
}
},
2024-04-15 18:10:02 +00:00
async content(event, trigger, player) {
2024-04-07 21:58:54 +00:00
const evt = event.getParent(2);
2024-04-15 18:10:02 +00:00
const names = lib.inpile.filter(
(name) =>
2024-04-15 18:31:36 +00:00
get.type(name) == "basic" && !player.getStorage("clanshengmo").includes(name)
2024-04-15 18:10:02 +00:00
),
cards = evt.clanshengmo_cards;
const links = await player
.chooseButton(["剩墨:获得其中一张牌", cards], true)
.set("ai", (button) => {
return get.value(button.link);
})
.forResultLinks();
2024-04-07 21:58:54 +00:00
if (!links || !links.length) return;
const list = [];
for (const name of names) {
const card = { name, isCard: true };
if (evt.filterCard(card, player, evt)) {
2024-04-15 18:10:02 +00:00
list.push(["基本", "", name]);
2024-04-07 21:58:54 +00:00
}
2024-04-15 18:10:02 +00:00
if (name == "sha") {
2024-04-07 21:58:54 +00:00
for (const nature of lib.inpile_nature) {
card.nature = nature;
if (evt.filterCard(card, player, evt)) {
2024-04-15 18:10:02 +00:00
list.push(["基本", "", name, nature]);
2024-04-07 21:58:54 +00:00
}
}
}
}
if (!list.length) return;
2024-04-15 18:10:02 +00:00
const links2 = await player
2024-04-15 18:31:36 +00:00
.chooseButton(["视为使用一张未以此法使用过的基本牌", [list, "vcard"]], true)
2024-04-15 18:10:02 +00:00
.set("ai", (button) => {
return get.player().getUseValue(button.link) + 1;
})
.forResultLinks();
const name = links2[0][2],
nature = links2[0][3];
game.broadcastAll(
(name, nature, toGain) => {
lib.skill.clanshengmo_backup.viewAs = {
name,
nature,
isCard: true,
};
lib.skill.clanshengmo_backup.prompt = `选择${get.translation(
nature
)}${get.translation(name)}的目标`;
lib.skill.clanshengmo_backup.cardToGain = toGain;
},
name,
nature,
links[0]
);
evt.set("_backupevent", "clanshengmo_backup");
evt.backup("clanshengmo_backup");
evt.set(
"openskilldialog",
2024-04-15 18:31:36 +00:00
`选择${get.translation(nature)}${get.translation(name)}】的目标`
2024-04-15 18:10:02 +00:00
);
evt.set("norestore", true);
evt.set("custom", {
2024-04-07 21:58:54 +00:00
add: {},
2024-04-15 18:10:02 +00:00
replace: { window() {} },
2024-04-07 21:58:54 +00:00
});
evt.goto(0);
},
2024-04-15 18:10:02 +00:00
marktext: "墨",
intro: {
content: "已以此法使用过$",
2024-04-08 18:39:59 +00:00
},
2024-04-15 18:10:02 +00:00
subSkill: {
backup: {
precontent() {
2024-04-07 21:58:54 +00:00
delete event.result.skill;
event.result.card.storage.clanshengmo = true;
2024-04-15 18:31:36 +00:00
player.markAuto("clanshengmo", event.result.card.name);
player.gain(lib.skill.clanshengmo_backup.cardToGain, "gain2");
2024-04-07 21:58:54 +00:00
},
2024-04-15 18:10:02 +00:00
filterCard: () => false,
selectCard: -1,
2024-04-07 21:58:54 +00:00
},
},
2024-04-15 18:10:02 +00:00
ai: {
order: 3,
result: {
player(player) {
2024-04-15 18:31:36 +00:00
if (get.event().dying) return get.attitude(player, get.event().dying);
2024-04-15 18:10:02 +00:00
if (get.event().type != "phase") return 1;
const names = lib.inpile.filter(
(name) =>
get.type(name) == "basic" &&
2024-04-15 18:31:36 +00:00
!player.getStorage("clanshengmo").includes(name)
2024-04-15 18:10:02 +00:00
);
if (Array.isArray(names)) {
return names.some((name) => {
return player.getUseValue({ name }) > 0;
2024-04-13 17:10:49 +00:00
});
}
return 0;
2024-04-15 18:10:02 +00:00
},
},
},
2024-04-07 21:58:54 +00:00
},
2024-03-28 13:40:23 +00:00
//族贝斯塔[doge]
2024-04-15 18:10:02 +00:00
clanlilun: {
audio: 2,
enable: "phaseUse",
filter(event, player) {
2024-04-15 18:31:36 +00:00
return player.hasCard((card) => get.info("clanlilun").filterCard(card, player), "h");
2024-04-15 18:10:02 +00:00
},
filterCard(card, player) {
2024-04-15 18:31:36 +00:00
if (player.getStorage("clanlilun").includes(card.name)) return false;
if (ui.selected.cards.length && ui.selected.cards[0].name != card.name) return false;
const cards = player.getCards("h", (cardx) => player.canRecast(cardx));
return cards.includes(card) && cards.filter((i) => i.name == card.name).length > 1;
2024-04-15 18:10:02 +00:00
},
selectCard: 2,
position: "h",
check(card) {
const player = get.event("player");
const value = function (card, player) {
const num = player.getUseValue(card);
2024-04-15 18:31:36 +00:00
return num > 0 ? num + 1 / (get.value(card) || 0.5) + 7 : 7 - get.value(card);
2024-03-28 13:40:23 +00:00
};
2024-04-15 18:31:36 +00:00
if (ui.selected.cards.length && value(card, player) < value(ui.selected.cards[0], player))
2024-04-15 18:10:02 +00:00
return 20 - get.value(card);
return value(card, player);
},
complexCard: true,
discard: false,
lose: false,
delay: 0,
usable: 1,
async content(event, trigger, player) {
2024-03-28 13:40:23 +00:00
await player.recast(event.cards);
2024-04-15 18:10:02 +00:00
if (!player.storage.clanlilun) {
player.when({ global: "phaseAfter" }).then(() => {
player.unmarkSkill("clanlilun");
2024-03-28 13:58:54 +00:00
delete player.storage.clanlilun;
});
2024-03-28 13:40:23 +00:00
}
2024-04-15 18:10:02 +00:00
player.markAuto(
"clanlilun",
event.cards.slice().map((card) => card.name)
);
const cards = event.cards.filterInD("d");
if (cards.some((card) => player.hasUseTarget(card))) {
const {
result: { bool, links },
} = await player
2024-04-15 18:31:36 +00:00
.chooseButton(["离论:是否使用其中的一张牌?", cards])
2024-04-15 18:10:02 +00:00
.set("filterButton", (button) => {
2024-04-15 18:31:36 +00:00
return get.event("player").hasUseTarget(button.link);
2024-04-15 18:10:02 +00:00
})
.set("ai", (button) => {
2024-04-15 18:31:36 +00:00
return get.event("player").getUseValue(button.link);
2024-04-15 18:10:02 +00:00
});
if (bool) {
const card = links[0];
player.$gain2(card, false);
2024-03-28 13:40:23 +00:00
await game.asyncDelayx();
2024-04-15 18:10:02 +00:00
await player.chooseUseTarget(true, card, false);
2024-03-28 13:40:23 +00:00
}
}
},
2024-04-15 18:10:02 +00:00
onremove: true,
intro: { content: "本回合已重铸过$" },
ai: {
order(item, player) {
let cards = player.getCards(
"h",
(card) =>
2024-04-15 18:31:36 +00:00
get.info("clanlilun").filterCard(card, player) && player.getUseValue(card) > 0
2024-04-15 18:10:02 +00:00
);
2024-04-15 18:31:36 +00:00
cards = cards.filter((card) => cards.filter((i) => i.name == card.name).length > 1);
2024-04-15 18:10:02 +00:00
if (!cards.length) return 1;
cards.sort((a, b) => get.order(b) - get.order(a));
return get.order(cards[0]) - 0.001;
2024-03-28 13:40:23 +00:00
},
2024-04-15 18:10:02 +00:00
result: { player: 1 },
2024-03-28 13:40:23 +00:00
},
},
2024-04-15 18:10:02 +00:00
clanjianji: {
unique: true,
limited: true,
audio: 2,
trigger: { global: "phaseJieshuBegin" },
filter(event, player) {
if (!event.player.isIn()) return false;
const targets = game.filterPlayer((target) => {
2024-04-15 18:31:36 +00:00
return event.player.getPrevious() == target || event.player.getNext() == target;
2024-03-28 13:40:23 +00:00
});
2024-04-15 18:10:02 +00:00
if (!targets.length) return false;
const card = new lib.element.VCard({ name: "sha" });
return (
!targets.some((target) => {
return target.getHistory("useCard").length;
}) ||
(player.hasUseTarget(card) &&
!targets.some((target) => {
return game.hasPlayer2((current) => {
2024-04-15 18:31:36 +00:00
return current.getHistory("useCard", (evt) => {
return evt.targets && evt.targets.includes(target);
}).length;
2024-04-15 18:10:02 +00:00
});
}))
);
},
skillAnimation: true,
animationColor: "watar",
prompt2(event, player) {
let str = "";
const card = new lib.element.VCard({ name: "sha" });
const targets = game.filterPlayer((target) => {
2024-04-15 18:31:36 +00:00
return event.player.getPrevious() == target || event.player.getNext() == target;
2024-04-15 18:10:02 +00:00
}),
bool = !targets.some((target) => {
return target.getHistory("useCard").length;
}),
goon =
player.hasUseTarget(card) &&
!targets.some((target) => {
return game.hasPlayer2((current) => {
2024-04-15 18:31:36 +00:00
return current.getHistory("useCard", (evt) => {
return evt.targets && evt.targets.includes(target);
}).length;
2024-04-15 18:10:02 +00:00
});
});
if (bool) {
if (goon) str += "你可以";
2024-04-15 18:31:36 +00:00
str += "与" + get.translation(get.translation(event.player)) + "各摸一张牌";
2024-03-28 13:40:23 +00:00
}
2024-04-15 18:10:02 +00:00
if (goon) {
if (bool) str += ",然后你可以";
str += "视为使用一张【杀】";
2024-03-28 13:40:23 +00:00
}
return str;
},
2024-04-15 18:10:02 +00:00
check(event, player) {
const card = new lib.element.VCard({ name: "sha" });
const targets = game.filterPlayer((target) => {
2024-04-15 18:31:36 +00:00
return event.player.getPrevious() == target || event.player.getNext() == target;
2024-04-15 18:10:02 +00:00
}),
bool = !targets.some((target) => {
return target.getHistory("useCard").length;
}),
goon =
player.hasUseTarget(card) &&
!targets.some((target) => {
return game.hasPlayer2((current) => {
2024-04-15 18:31:36 +00:00
return current.getHistory("useCard", (evt) => {
return evt.targets && evt.targets.includes(target);
}).length;
2024-04-15 18:10:02 +00:00
});
});
return (
(bool &&
(get.attitude(player, event.player) > 0 ||
2024-04-15 18:31:36 +00:00
event.player.countCards("h") > player.countCards("h"))) ||
2024-04-15 18:10:02 +00:00
(goon && player.hasValueTarget(card))
);
},
logTarget: "player",
async content(event, trigger, player) {
player.awakenSkill("clanjianji");
const card = new lib.element.VCard({ name: "sha" });
const targets = game.filterPlayer((target) => {
return (
2024-04-15 18:31:36 +00:00
trigger.player.getPrevious() == target || trigger.player.getNext() == target
2024-04-15 18:10:02 +00:00
);
}),
boolx = !targets.some((target) => {
return target.getHistory("useCard").length;
}),
goon =
player.hasUseTarget(card) &&
!targets.some((target) => {
return game.hasPlayer2((current) => {
2024-04-15 18:31:36 +00:00
return current.getHistory("useCard", (evt) => {
return evt.targets && evt.targets.includes(target);
}).length;
2024-04-15 18:10:02 +00:00
});
});
if (boolx) {
let draw = false;
if (goon) {
const {
result: { bool },
} = await player
2024-04-15 18:31:36 +00:00
.chooseBool("是否与" + get.translation(trigger.player) + "各摸一张牌?")
2024-04-15 18:10:02 +00:00
.set(
"choice",
get.attitude(player, trigger.player) > 0 ||
2024-04-15 18:31:36 +00:00
trigger.player.countCards("h") > player.countCards("h")
2024-04-15 18:10:02 +00:00
);
if (bool) draw = true;
} else draw = true;
if (draw) {
await player.draw("nodelay");
2024-03-28 13:40:23 +00:00
await trigger.player.draw();
}
}
2024-04-15 18:10:02 +00:00
if (goon) await player.chooseUseTarget(card, false, !boolx);
2024-03-28 13:40:23 +00:00
},
},
2024-01-27 18:32:56 +00:00
//族吴乔
2024-04-15 18:10:02 +00:00
clanqiajue: {
audio: 2,
trigger: { player: "phaseDrawBegin" },
filter(event, player) {
return (
player.countCards("he", (card) => {
2024-04-15 18:31:36 +00:00
if (_status.connectMode && get.position(card) == "h") return true;
2024-04-15 18:10:02 +00:00
return (
2024-04-15 18:31:36 +00:00
get.color(card, player) == "black" && lib.filter.cardDiscardable(card, player)
2024-04-15 18:10:02 +00:00
);
}) > 0
);
},
direct: true,
async content(event, trigger, player) {
const {
result: { bool },
} = await player
.chooseToDiscard((card, player) => {
return (
2024-04-15 18:31:36 +00:00
get.color(card, player) == "black" && lib.filter.cardDiscardable(card, player)
2024-04-15 18:10:02 +00:00
);
}, "he")
.set(
"prompt",
"当前手牌点数和为" +
2024-04-15 18:31:36 +00:00
player.getCards("h").reduce((sum, card) => sum + get.number(card), 0) +
2024-04-15 18:10:02 +00:00
"" +
get.prompt("clanqiajue")
)
.set(
"prompt2",
lib.translate.clanqiajue_info
2024-04-15 18:31:36 +00:00
.slice(lib.translate.clanqiajue_info.indexOf("弃置"))
2024-04-15 18:10:02 +00:00
.slice(0, -1)
)
.set("ai", (card) => {
const player = get.event("player"),
goon = get.position(card) == "h";
2024-04-15 18:31:36 +00:00
let num = player.getCards("h").reduce((sum, card) => sum + get.number(card), 0);
if (num - (goon ? get.number(card) : 0) > 30) return 0;
return goon ? get.number(card) : 1 / (get.value(card) || 0.5);
2024-01-27 18:32:56 +00:00
})
2024-04-15 18:10:02 +00:00
.set("logSkill", "clanqiajue");
if (bool) {
player
.when({
2024-04-15 18:31:36 +00:00
player: ["phaseDrawEnd", "phaseDrawCancelled", "phaseUseSkipped"],
2024-04-15 18:10:02 +00:00
})
.filter((evt) => evt == trigger)
.then(() => {
const cards = player.getCards("h"),
2024-04-15 18:31:36 +00:00
num = cards.reduce((sum, card) => sum + get.number(card), 0);
2024-04-15 18:10:02 +00:00
if (cards.length)
2024-04-15 18:31:36 +00:00
player.showCards(cards, get.translation(player) + "【跒倔】展示");
2024-04-15 18:10:02 +00:00
if (num > 30) {
player.popup("杯具");
lib.skill.chenliuwushi.change(player, -2);
} else {
player.popup("洗具");
const next = player.phaseDraw();
event.next.remove(next);
trigger.getParent("phase").next.push(next);
}
});
2024-01-27 18:32:56 +00:00
}
},
},
2023-10-26 06:19:55 +00:00
//族荀攸
2024-04-15 18:10:02 +00:00
clanbaichu: {
derivation: "qice",
audio: 2,
trigger: { player: "useCardAfter" },
filter(event, player) {
const storage = player.storage.clanbaichu || {};
2024-04-15 18:31:36 +00:00
if (Object.values(storage).includes(event.card.name)) return true;
2024-04-15 18:10:02 +00:00
const suit = get.suit(event.card);
if (suit == "none") return false;
if (!player.hasSkill("qice")) return true;
const key = `${suit}+${get.type2(event.card)}`;
return !(key in storage);
},
forced: true,
content() {
"step 0";
var storage = player.storage.clanbaichu || {},
suit = get.suit(trigger.card);
if (suit != "none") {
var key = `${suit}+${get.type2(trigger.card)}`;
if (key in storage) {
if (!player.hasSkill("qice")) {
player.addTempSkills("qice", "roundStart");
player.popup("奇策");
2024-02-18 09:31:56 +00:00
// game.log(player,'获得了技能','#g【奇策】');
}
event.goto(2);
2024-04-15 18:10:02 +00:00
} else {
2024-04-15 18:31:36 +00:00
var list = lib.inpile.filter((name) => get.type(name) == "trick");
2023-10-27 13:06:21 +00:00
list.removeArray(Object.values(storage));
2024-04-15 18:10:02 +00:00
if (list.length > 0) {
2024-04-15 18:31:36 +00:00
var dialog = ["百出:选择记录一种普通锦囊牌", [list, "vcard"]];
player.chooseButton(dialog, true).set("ai", function (button) {
var player = _status.event.player,
name = button.link[2];
if (name == _status.event.getTrigger().card.name) return 1919810;
if (name == "wuxie") return 114514;
return (
get.effect(player, { name: name }, player, player) *
(1 + player.countCards("hs", name))
);
});
2024-04-15 18:10:02 +00:00
} else event.goto(2);
2023-10-26 06:31:21 +00:00
}
2024-04-15 18:10:02 +00:00
} else event.goto(2);
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
2024-04-15 18:31:36 +00:00
var key = `${get.suit(trigger.card)}+${get.type2(trigger.card)}`,
2024-04-15 18:10:02 +00:00
name = result.links[0][2];
2024-04-15 18:31:36 +00:00
if (!player.storage.clanbaichu) player.storage.clanbaichu = {};
2024-04-15 18:10:02 +00:00
player.storage.clanbaichu[key] = name;
player.markSkill("clanbaichu");
2024-04-15 18:31:36 +00:00
game.log(player, "记录了", "#y" + get.translation(name));
2023-10-26 06:19:55 +00:00
game.delayx();
}
2024-04-15 18:31:36 +00:00
"step 2";
if (Object.values(player.getStorage("clanbaichu")).includes(trigger.card.name)) {
2023-10-27 13:06:21 +00:00
player.chooseDrawRecover(true);
}
2023-10-26 06:19:55 +00:00
},
2024-04-15 18:10:02 +00:00
intro: {
markcount(storage) {
2023-10-27 13:06:21 +00:00
return Object.keys(storage).length;
},
2024-04-15 18:10:02 +00:00
content(storage) {
if (!storage) return "当前暂无记录";
2024-04-15 18:31:36 +00:00
const keys = Object.keys(storage).map((i) => i.split("+"));
2024-04-15 18:10:02 +00:00
keys.sort((a, b) => {
2024-04-15 18:31:36 +00:00
if (a[0] != b[0]) return lib.suit.indexOf(b[0]) - lib.suit.indexOf(a[0]);
2024-04-15 18:10:02 +00:00
return lib.sort.name(a[1], b[1]);
2023-10-27 13:06:21 +00:00
});
2024-04-15 18:10:02 +00:00
return keys
.map((item) => {
2024-04-15 18:31:36 +00:00
return `<li>${get.translation(item[0])}+${get.translation(
2024-04-15 18:10:02 +00:00
item[1]
2024-04-15 18:31:36 +00:00
)}:${get.translation(storage[item.join("+")])}`;
2024-04-15 18:10:02 +00:00
})
.join("<br>");
2023-10-26 06:19:55 +00:00
},
},
},
2023-10-16 03:41:56 +00:00
//族王沦
2024-04-15 18:10:02 +00:00
clanqiuxin: {
audio: 2,
enable: "phaseUse",
filterTarget: lib.filter.notMe,
usable: 1,
content() {
"step 0";
var str = get.translation(player);
target
.chooseControl()
.set("choiceList", [
2024-04-15 18:31:36 +00:00
str + "下次对你使用【杀】后,其视为对你使用任意普通锦囊牌",
str + "下次对你使用任意普通锦囊牌后,其视为对你使用【杀】",
2024-04-15 18:10:02 +00:00
])
.set("ai", function () {
var target = _status.event.player;
var player = _status.event.target;
var num1 = get.effect(
target,
get.autoViewAs({ name: "sha" }, []),
player,
player
);
2024-04-15 18:31:36 +00:00
if (!player.canUse(get.autoViewAs({ name: "sha" }, []), target)) num1 = 0;
2024-04-15 18:10:02 +00:00
var num2 = 0;
for (var name of lib.inpile) {
if (get.type(name) != "trick") continue;
2024-04-15 18:31:36 +00:00
if (!player.canUse(get.autoViewAs({ name: name }, []), target)) continue;
2024-04-15 18:10:02 +00:00
if (
num2 <
2024-04-15 18:31:36 +00:00
get.effect(target, get.autoViewAs({ name: name }, []), player, player)
2024-04-15 18:10:02 +00:00
)
num2 = get.effect(
target,
get.autoViewAs({ name: name }, []),
player,
player
);
}
return num1 >= num2 ? 1 : 0;
})
.set("target", player);
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
player.addSkill("clanqiuxin_effect");
2024-04-15 18:31:36 +00:00
player.markAuto("clanqiuxin_effect", [[target, result.index]]);
2024-04-15 18:10:02 +00:00
},
ai: {
order: 9,
result: {
target(player, target) {
var cards = player.getCards("hs", (card) => {
2024-04-15 18:31:36 +00:00
if (get.name(card, player) != "sha" && get.type(card, player) != "trick")
2024-04-15 18:10:02 +00:00
return false;
2023-10-16 03:41:56 +00:00
return player.hasValueTarget(card);
});
2024-04-15 18:10:02 +00:00
if (
cards.some(
(card) =>
player.canUse(card, target) &&
2024-04-15 18:31:36 +00:00
get.effect(target, card, player, player) > 0
2024-04-15 18:10:02 +00:00
)
) {
var att = get.attitude(player, target);
if (att > 0) return 9;
if (att < 0) return -6;
2023-10-16 03:41:56 +00:00
return 0;
2024-04-15 18:10:02 +00:00
} else {
var att = get.attitude(player, target);
if (att < 0) return -3;
if (att > 0) return 1;
2023-10-16 03:41:56 +00:00
return 2;
}
},
},
},
2024-04-15 18:10:02 +00:00
subSkill: {
effect: {
charlotte: true,
onremove: true,
intro: {
content(storage, player) {
var str = "";
for (var i = 0; i < storage.length; i++) {
var list = storage[i];
var strx = ["【杀】", "任意普通锦囊牌"];
if (list[1]) strx.reverse();
str +=
"对" +
get.translation(list[0]) +
"使用" +
strx[0] +
"后,视为对其使用" +
strx[1];
str += "<br>";
2023-10-16 03:41:56 +00:00
}
2024-04-15 18:10:02 +00:00
str = str.slice(0, -4);
2023-10-16 03:41:56 +00:00
return str;
},
},
2024-04-15 18:10:02 +00:00
trigger: { player: "useCardAfter" },
filter(event, player) {
2024-04-15 18:31:36 +00:00
if (!event.targets || !event.targets.length) return false;
2024-04-15 18:10:02 +00:00
if (event.card.name == "sha")
return event.targets.some((target) => {
return player
.getStorage("clanqiuxin_effect")
2024-04-15 18:31:36 +00:00
.some((list) => list[0] == target && list[1] == 0);
2024-04-15 18:10:02 +00:00
});
if (get.type(event.card) == "trick")
return event.targets.some((target) => {
return player
.getStorage("clanqiuxin_effect")
2024-04-15 18:31:36 +00:00
.some((list) => list[0] == target && list[1] == 1);
2024-04-15 18:10:02 +00:00
});
2023-10-16 03:41:56 +00:00
return false;
},
2024-04-15 18:10:02 +00:00
forced: true,
popup: false,
content() {
"step 0";
2023-10-16 03:41:56 +00:00
var list;
2024-04-15 18:10:02 +00:00
if (trigger.card.name == "sha")
list = player
.getStorage("clanqiuxin_effect")
2024-04-15 18:31:36 +00:00
.filter((listx) => trigger.targets.includes(listx[0]) && listx[1] == 0);
2024-04-15 18:10:02 +00:00
if (get.type(trigger.card) == "trick")
list = player
.getStorage("clanqiuxin_effect")
2024-04-15 18:31:36 +00:00
.filter((listx) => trigger.targets.includes(listx[0]) && listx[1] == 1);
2024-04-15 18:10:02 +00:00
player.unmarkAuto("clanqiuxin_effect", list);
var targets = list.map((listx) => listx[0]);
event.targets = targets;
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
var target = event.targets.shift();
event.target = target;
var list = [];
for (var name of lib.inpile) {
2024-04-15 18:31:36 +00:00
if (name != "sha" && get.type(name) != "trick") continue;
if (trigger.card.name == "sha" && get.type(name) != "trick") continue;
if (name == "sha" && get.type(trigger.card) != "trick") continue;
if (!player.canUse(get.autoViewAs({ name: name }, []), target)) continue;
list.push([get.translation(get.type(name)), "", name]);
2023-10-16 03:41:56 +00:00
}
2024-04-15 18:10:02 +00:00
if (!list.length) event.goto(3);
else {
player
.chooseButton(
[
2024-04-15 18:31:36 +00:00
"求心:视为对" + get.translation(target) + "使用一张牌",
2024-04-15 18:10:02 +00:00
[list, "vcard"],
],
true
)
.set("ai", function (button) {
var player = _status.event.player;
var target = _status.event.target;
return get.effect(
target,
{
name: button.link[2],
nature: button.link[3],
},
player,
player
);
})
.set("target", target);
2023-10-16 03:41:56 +00:00
}
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var card = {
name: result.links[0][2],
nature: result.links[0][3],
2023-10-16 03:41:56 +00:00
};
2024-04-15 18:10:02 +00:00
player.useCard(card, target, false);
2023-10-16 03:41:56 +00:00
}
2024-04-15 18:31:36 +00:00
"step 3";
2024-04-15 18:10:02 +00:00
if (event.targets.length) event.goto(1);
2024-04-15 18:31:36 +00:00
else if (!player.getStorage("clanqiuxin_effect").length)
2024-04-15 18:10:02 +00:00
player.removeSkill("clanqiuxin_effect");
2023-10-16 03:41:56 +00:00
},
},
},
},
2024-04-15 18:10:02 +00:00
clanjianyuan: {
inherit: "clanchenya",
filter(event, player) {
for (var phase of lib.phaseName) {
var evt = event.getParent(phase);
if (evt && evt.name == phase) {
if (
2024-04-15 18:31:36 +00:00
event.player.getHistory("useCard", (evtx) => evtx.getParent(phase) == evt)
.length
2024-04-15 18:10:02 +00:00
)
2024-04-15 18:31:36 +00:00
return lib.skill.clanchenya.filter(event, player);
2023-10-16 03:41:56 +00:00
}
}
return false;
},
2024-04-15 18:10:02 +00:00
content() {
"step 0";
var num = 0;
for (var phase of lib.phaseName) {
var evt = trigger.getParent(phase);
if (evt && evt.name == phase) {
num += trigger.player.getHistory(
"useCard",
(evtx) => evtx.getParent(phase) == evt
).length;
2023-10-16 03:41:56 +00:00
}
}
2024-04-15 18:10:02 +00:00
trigger.player
.chooseCard(
"是否重铸任意张牌名字数为" + num + "的牌?",
[1, Infinity],
"he",
2024-04-15 18:31:36 +00:00
(card, player) => _status.event.cards.includes(card) && player.canRecast(card)
2024-04-15 18:10:02 +00:00
)
.set("ai", (card) => {
var val = get.value(card);
return 6 - val;
})
.set(
"cards",
trigger.player.getCards("he", (card) => {
return get.cardNameLength(card) == num;
})
);
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) trigger.player.recast(result.cards);
2023-10-16 03:41:56 +00:00
},
},
2023-09-03 09:09:11 +00:00
//族钟毓
2024-04-15 18:10:02 +00:00
clanjiejian: {
audio: 2,
trigger: { player: "useCardToPlayered" },
filter(event, player) {
2024-04-15 18:31:36 +00:00
if (!event.isFirstTarget || get.type(event.card) == "equip") return false;
2024-04-15 18:10:02 +00:00
return (
get.cardNameLength(event.card) ==
2024-04-15 18:31:36 +00:00
player.getHistory("useCard").indexOf(event.getParent()) + 1
2024-04-15 18:10:02 +00:00
);
},
direct: true,
locked: false,
content() {
"step 0";
var num = get.cardNameLength(trigger.card);
event.num = num;
player
.chooseTarget(
get.prompt("clanjiejian"),
"令一名目标角色摸" + get.cnNumber(num) + "张牌",
function (card, player, target) {
2024-04-15 18:31:36 +00:00
return _status.event.getTrigger().targets.includes(target);
2024-04-15 18:10:02 +00:00
}
)
2024-04-15 18:31:36 +00:00
.set("ai", (target) => get.attitude(_status.event.player, target));
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var target = result.targets[0];
player.logSkill("clanjiejian", target);
2023-09-03 09:09:11 +00:00
target.draw(num);
}
},
2024-04-15 18:10:02 +00:00
ai: {
threaten: 3,
effect: {
player(card, player, target) {
if (
!target ||
typeof card !== "object" ||
player._clanjiejian_mod_temp ||
get.type(card) === "equip" ||
get.attitude(player, target) <= 0 ||
2024-04-15 18:31:36 +00:00
get.cardNameLength(card) !== player.getHistory("useCard").length + 1
2024-04-15 18:10:02 +00:00
)
return;
let targets = [target],
evt = _status.event.getParent("useCard");
2024-01-06 16:43:35 +00:00
targets.addArray(ui.selected.targets);
2024-04-15 18:31:36 +00:00
if (evt && evt.card == card) targets.addArray(evt.targets);
return [1, (0.8 * get.cardNameLength(card)) / targets.length];
2024-04-15 18:10:02 +00:00
},
},
2024-01-06 16:43:35 +00:00
},
2024-04-15 18:10:02 +00:00
mod: {
aiOrder(player, card, num) {
2024-04-15 18:31:36 +00:00
if (typeof card == "object" && get.type(card) !== "equip") {
let cs = get.cardNameLength(card) - player.getHistory("useCard").length - 1;
2024-04-15 18:10:02 +00:00
if (cs < 0) return num;
if (cs > 0) return num / 3;
player._clanjiejian_mod_temp = true;
let bool = game.hasPlayer((target) => {
if (
get.attitude(player, target) <= 0 ||
!player.canUse(card, target, null, true)
)
return false;
return (
get.effect(target, card, player, player) +
2024-04-15 18:31:36 +00:00
get.effect(target, { name: "draw" }, player, player) >
2024-04-15 18:10:02 +00:00
0
);
2024-01-06 16:43:35 +00:00
});
delete player._clanjiejian_mod_temp;
2024-04-15 18:10:02 +00:00
if (bool) return num + 15;
}
},
},
2023-09-03 09:09:11 +00:00
},
2024-04-15 18:10:02 +00:00
clanhuanghan: {
audio: 2,
trigger: { player: "damageEnd" },
filter(event, player) {
if (!event.card) return false;
var num = get.cardNameLength(event.card);
return typeof num == "number" && num > 0;
},
check(event, player) {
2024-04-15 18:31:36 +00:00
let num = get.cardNameLength(event.card) - player.getDamagedHp();
2024-04-15 18:10:02 +00:00
if (num >= 0) return true;
if (num < -1) return false;
if (
player.hasSkill("clanbaozu", null, false, false) &&
player.awakenedSkills.includes("clanbaozu") &&
player.getHistory("useSkill", (evt) => {
return evt.skill == "clanhuanghan";
}).length
)
return true;
return false;
2023-09-03 09:09:11 +00:00
},
2024-04-15 18:10:02 +00:00
content() {
"step 0";
2023-09-05 05:17:59 +00:00
player.draw(get.cardNameLength(trigger.card));
2024-04-15 18:31:36 +00:00
if (player.isDamaged()) player.chooseToDiscard(player.getDamagedHp(), "he", true);
"step 1";
2024-04-15 18:10:02 +00:00
if (
2024-04-15 18:31:36 +00:00
player.getHistory("useSkill", (evt) => evt.skill == "clanhuanghan").length > 1 &&
2024-04-15 18:10:02 +00:00
player.hasSkill("clanbaozu", null, false, false) &&
player.awakenedSkills.includes("clanbaozu")
) {
player.restoreSkill("clanbaozu");
player.popup("保族");
game.log(player, "恢复了技能", "#【保族】");
2023-09-03 09:09:11 +00:00
}
},
2024-04-15 18:10:02 +00:00
ai: {
threaten: 3,
effect: {
target(card, player, target) {
2024-04-15 18:31:36 +00:00
if (!get.tag(card, "damage") || player.hasSkillTag("jueqing", false, target))
2024-04-15 18:10:02 +00:00
return;
2024-04-15 18:31:36 +00:00
let num = get.cardNameLength(card) - target.getDamagedHp();
2024-04-15 18:10:02 +00:00
if (num > 0) return [1, num + 0.1];
},
},
},
2023-09-03 09:09:11 +00:00
},
2023-08-13 14:23:37 +00:00
//族钟会
2024-04-15 18:10:02 +00:00
clanyuzhi: {
mod: {
aiOrder(player, card, num) {
if (card.name == "tao") return num / 114514;
2023-08-13 14:23:37 +00:00
},
},
2024-04-15 18:10:02 +00:00
audio: 2,
trigger: { global: "roundStart" },
direct: true,
locked: true,
content() {
"step 0";
player.unmarkSkill("clanyuzhi");
if (
player.countCards("h", (card) => {
2024-04-15 18:31:36 +00:00
return card.hasGaintag("clanyuzhi") && lib.filter.cardDiscardable(card, player);
2024-04-15 18:10:02 +00:00
})
) {
event.logged = true;
player.chooseToDiscard(
player.countCards("h"),
"h",
(card, player) => {
return card.hasGaintag("clanyuzhi");
},
true
).logSkill = "clanyuzhi";
2024-04-13 16:50:56 +00:00
}
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
player.removeGaintag("clanyuzhi");
var num1 = player
.getRoundHistory(
"gain",
(evt) => {
2024-04-15 18:31:36 +00:00
return evt.getParent().name == "draw" && evt.getParent(2).name == "clanyuzhi";
2024-04-15 18:10:02 +00:00
},
1
)
.reduce((sum, evt) => sum + evt.cards.length, 0);
var num2 = player
.getRoundHistory(
"gain",
(evt) => {
2024-04-15 18:31:36 +00:00
return evt.getParent().name == "draw" && evt.getParent(2).name == "clanyuzhi";
2024-04-15 18:10:02 +00:00
},
2
)
.reduce((sum, evt) => sum + evt.cards.length, 0);
var num3 = player
.getRoundHistory(
"useCard",
(evt) => {
return evt.cards && evt.cards.length;
},
1
)
.reduce((sum, evt) => sum + evt.cards.length, 0);
event.num1 = num1;
if ((num1 > 0 && num2 > 0 && num1 > num2) || num1 > num3) {
if (!event.logged) player.logSkill("clanyuzhi");
if (num2 > 0 && num1 > num2)
2024-04-15 18:31:36 +00:00
game.log(player, "的野心已开始膨胀", "#y(" + num1 + "张>" + num2 + "张)");
2024-04-15 18:10:02 +00:00
if (num1 > num3)
2024-04-15 18:31:36 +00:00
game.log(player, "的行动未达到野心", "#y(" + num3 + "张<" + num1 + "张)");
2024-04-15 18:10:02 +00:00
if (player.hasSkill("clanbaozu", null, false, false))
player
2024-04-15 18:31:36 +00:00
.chooseBool("迂志:是否失去〖保族〗?", "若选择“否”则你受到1点雷属性伤害")
.set("choice", player.awakenedSkills.includes("clanbaozu"));
2024-04-15 18:10:02 +00:00
else event._result = { bool: false };
} else event.goto(3);
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
if (result.bool) {
player.removeSkills("clanbaozu");
} else player.damage(1, "thunder");
2024-04-15 18:31:36 +00:00
"step 3";
2024-04-15 18:10:02 +00:00
if (player.countCards("h")) {
player
.chooseCard(
"迂志:请展示一张手牌",
"摸此牌牌名字数的牌。下一轮开始时弃置此牌若本轮你使用的牌数或上一轮你以此法摸的牌数小于此牌牌名字数则你受到1点雷属性伤害或失去〖保族〗。",
function (card, player) {
var num = get.cardNameLength(card);
return typeof num == "number" && num > 0;
},
true
)
.set("ai", function (card) {
if (
_status.event.dying &&
_status.event.num > 0 &&
get.cardNameLength(card) > _status.event.num
)
return 1 / get.cardNameLength(card); //怂
return get.cardNameLength(card); //勇
})
.set(
"dying",
player.hp +
player.countCards("hs", {
name: ["tao", "jiu"],
}) <
1
)
.set("num", event.num1);
} else event.finish();
2024-04-15 18:31:36 +00:00
"step 4";
2024-04-15 18:10:02 +00:00
if (result.bool) {
player.logSkill("clanyuzhi");
2024-04-15 18:31:36 +00:00
player.showCards(result.cards, get.translation(player) + "发动了【迂志】");
2024-04-15 18:10:02 +00:00
player.addGaintag(result.cards, "clanyuzhi");
2023-09-05 05:17:59 +00:00
player.draw(get.cardNameLength(result.cards[0]));
2024-04-15 18:31:36 +00:00
player.storage.clanyuzhi = get.cardNameLength(result.cards[0]);
2024-04-15 18:10:02 +00:00
player.markSkill("clanyuzhi");
2023-08-13 14:23:37 +00:00
}
},
2024-04-15 18:10:02 +00:00
ai: {
threaten: 3,
nokeep: true,
2023-08-13 14:23:37 +00:00
},
2024-04-15 18:10:02 +00:00
onremove: true,
intro: { content: "本轮野心:#张" },
2023-08-13 14:23:37 +00:00
},
2024-04-15 18:10:02 +00:00
clanxieshu: {
audio: 2,
trigger: { player: "damageEnd", source: "damageSource" },
filter(event, player) {
if (!event.card || player.isLinked()) return false;
var num = get.cardNameLength(event.card);
2024-04-15 18:31:36 +00:00
return typeof num == "number" && num > 0 && player.countCards("he") > 0;
2024-04-15 18:10:02 +00:00
},
async content(event, trigger, player) {
var num = get.cardNameLength(trigger.card),
str = "";
if (player.getDamagedHp() > 0)
2024-04-15 18:31:36 +00:00
str += ",然后摸" + get.cnNumber(player.getDamagedHp()) + "张牌";
2024-04-15 18:10:02 +00:00
player
.chooseToDiscard(
get.prompt("clanxieshu"),
2024-04-15 18:31:36 +00:00
"横置武将牌并弃置" + get.cnNumber(num) + "张牌" + str,
2024-04-15 18:10:02 +00:00
"he",
num
)
.set("ai", function (card) {
var player = _status.event.player;
var num = _status.event.num;
var num2 = player.getDamagedHp();
if (!num2) return 0;
if (num < num2) return 8 - get.value(card);
2024-04-15 18:31:36 +00:00
if (num == num2 || num2 >= 2 + num - num2) return lib.skill.zhiheng.check(card);
2024-04-15 18:10:02 +00:00
return 0;
})
.set("num", num)
.set("logSkill", "clanxieshu")
.forResult();
2024-04-13 16:50:56 +00:00
},
2024-04-15 18:10:02 +00:00
popup: false,
content() {
2024-04-13 16:50:56 +00:00
player.link(true);
2024-04-15 18:31:36 +00:00
if (player.getDamagedHp() > 0) player.draw(player.getDamagedHp());
2024-04-15 18:10:02 +00:00
},
ai: { threaten: 3 },
group: "clanxieshu_ban",
subSkill: {
ban: {
audio: "clanxieshu",
trigger: { global: "dyingAfter" },
filter(event, player) {
return !player.isTempBanned("clanxieshu");
2024-04-13 16:50:56 +00:00
},
2024-04-15 18:10:02 +00:00
forced: true,
locked: false,
content() {
player.tempBanSkill("clanxieshu");
2024-04-13 16:50:56 +00:00
},
},
},
2023-08-13 14:23:37 +00:00
},
2023-08-11 14:41:10 +00:00
//族王浑
2024-04-15 18:10:02 +00:00
clanfuxun: {
mod: {
aiOrder(player, card, num) {
if (
player.isPhaseUsing() &&
get.type(card) == "equip" &&
get.equipValue(card, player) > 0
)
return num + 3;
2023-10-07 10:14:49 +00:00
},
},
2024-04-15 18:10:02 +00:00
locked: false,
audio: 2,
enable: "phaseUse",
usable: 1,
filterCard: true,
position: "h",
discard: false,
lose: false,
delay: false,
selectCard() {
var player = _status.event.player;
2024-04-15 18:31:36 +00:00
if (ui.selected.targets.length && !ui.selected.targets[0].countGainableCards(player, "h"))
2024-04-15 18:10:02 +00:00
return 1;
return [0, 1];
},
filterTarget(card, player, target) {
if (player == target) return false;
2024-04-15 18:31:36 +00:00
if (!ui.selected.cards.length) return target.countGainableCards(player, "h") > 0;
2023-08-11 14:41:10 +00:00
return true;
},
2024-04-15 18:10:02 +00:00
check(card) {
var player = _status.event.player;
var evtx = _status.event.getParent("phaseUse");
var targets = game.filterPlayer(
(target) =>
2024-04-15 18:31:36 +00:00
target != player && lib.skill.clanfuxun.ai.result.target(player, target) != 0
2024-04-15 18:10:02 +00:00
);
targets.sort(
(a, b) =>
2024-04-15 18:31:36 +00:00
Math.abs(lib.skill.clanfuxun.ai.result.target(player, b)) -
Math.abs(lib.skill.clanfuxun.ai.result.target(player, a))
2024-04-15 18:10:02 +00:00
);
if (evtx && targets.length) {
var target = targets[0];
if (
!target.hasHistory("lose", (evt) => {
return (
evt.getParent(3).name != "clanfuxun" &&
evt.getParent("phaseUse") == evtx &&
evt.cards2.length
);
}) &&
!target.hasHistory("gain", (evt) => {
return (
evt.getParent().name != "clanfuxun" &&
evt.getParent("phaseUse") == evtx &&
evt.cards.length
);
}) &&
2024-04-15 18:31:36 +00:00
Math.abs(player.countCards("h") - target.countCards("h")) == 2
2024-04-15 18:10:02 +00:00
) {
if (player.countCards("h") > target.countCards("h"))
return 1 / (get.value(card) || 0.5);
2023-10-07 10:14:49 +00:00
return -1;
}
2024-04-15 18:10:02 +00:00
if (card.name == "du") return 20;
2023-10-07 10:14:49 +00:00
return -1;
}
2024-04-15 18:10:02 +00:00
if (card.name == "du") return 20;
2023-10-07 10:14:49 +00:00
return -1;
},
2024-04-15 18:10:02 +00:00
content() {
"step 0";
if (cards.length) {
player.give(cards, target);
} else {
player.gainPlayerCard(target, "h", true);
2023-08-11 14:41:10 +00:00
}
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
var evtx = event.getParent("phaseUse");
if (
player.countCards("h") == target.countCards("h") &&
evtx &&
!target.hasHistory("lose", (evt) => {
return (
evt.getParent(3).name != "clanfuxun" &&
evt.getParent("phaseUse") == evtx &&
evt.cards2.length
);
}) &&
!target.hasHistory("gain", (evt) => {
return (
evt.getParent().name != "clanfuxun" &&
evt.getParent("phaseUse") == evtx &&
evt.cards.length
);
}) &&
player.countCards("he")
) {
var list = [];
for (var name of lib.inpile) {
if (get.type(name) != "basic") continue;
2024-04-15 18:31:36 +00:00
if (player.hasUseTarget({ name: name })) list.push(["基本", "", name]);
2024-04-15 18:10:02 +00:00
if (name == "sha") {
for (var nature of lib.inpile_nature) {
if (
player.hasUseTarget({
name: name,
nature: nature,
})
)
list.push(["基本", "", name, nature]);
2023-08-11 14:41:10 +00:00
}
}
}
2024-04-15 18:10:02 +00:00
if (list.length) {
player
2024-04-15 18:31:36 +00:00
.chooseButton(["是否将一张牌当做一种基本牌使用?", [list, "vcard"]])
2024-04-15 18:10:02 +00:00
.set("ai", (button) => {
return _status.event.player.getUseValue({
name: button.link[2],
nature: button.link[3],
});
});
} else event.finish();
} else event.finish();
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var card = {
name: result.links[0][2],
nature: result.links[0][3],
2023-08-11 14:41:10 +00:00
};
2024-04-15 18:10:02 +00:00
game.broadcastAll(function (card) {
lib.skill.clanfuxun_backup.viewAs = card;
}, card);
var next = player.chooseToUse();
2024-04-15 18:31:36 +00:00
next.set("openskilldialog", "将一张牌当做" + get.translation(card) + "使用");
2024-04-15 18:10:02 +00:00
next.set("norestore", true);
next.set("addCount", false);
next.set("_backupevent", "clanfuxun_backup");
next.set("custom", {
add: {},
replace: { window() {} },
2023-08-11 14:41:10 +00:00
});
2024-04-15 18:10:02 +00:00
next.backup("clanfuxun_backup");
2023-08-11 14:41:10 +00:00
}
},
2024-04-15 18:10:02 +00:00
ai: {
order(item, player) {
var evtx = _status.event.getParent("phaseUse");
if (
game.hasPlayer((current) => {
2024-04-15 18:31:36 +00:00
if (current == player || !evtx || get.attitude(player, current) == 0)
2024-04-15 18:10:02 +00:00
return false;
return (
!current.hasHistory("lose", (evt) => {
return (
2024-04-15 18:31:36 +00:00
evt.getParent(3).name != "clanfuxun" &&
2024-04-15 18:10:02 +00:00
evt.getParent("phaseUse") == evtx &&
evt.cards2.length
);
}) &&
!current.hasHistory("gain", (evt) => {
return (
2024-04-15 18:31:36 +00:00
evt.getParent().name != "clanfuxun" &&
2024-04-15 18:10:02 +00:00
evt.getParent("phaseUse") == evtx &&
evt.cards.length
);
}) &&
2024-04-15 18:31:36 +00:00
Math.abs(player.countCards("h") - current.countCards("h")) == 2
2024-04-15 18:10:02 +00:00
);
})
)
return 10;
2023-10-07 10:14:49 +00:00
return 2;
},
2024-04-15 18:10:02 +00:00
result: {
target(player, target) {
var evtx = _status.event.getParent("phaseUse");
var num = get.sgn(get.attitude(player, target));
var targets = game.filterPlayer((current) => {
2024-04-15 18:31:36 +00:00
if (current == player || !evtx || get.attitude(player, current) == 0)
2024-04-15 18:10:02 +00:00
return false;
return (
!current.hasHistory("lose", (evt) => {
return (
2024-04-15 18:31:36 +00:00
evt.getParent(3).name != "clanfuxun" &&
2024-04-15 18:10:02 +00:00
evt.getParent("phaseUse") == evtx &&
evt.cards2.length
);
}) &&
!current.hasHistory("gain", (evt) => {
return (
2024-04-15 18:31:36 +00:00
evt.getParent().name != "clanfuxun" &&
2024-04-15 18:10:02 +00:00
evt.getParent("phaseUse") == evtx &&
evt.cards.length
);
}) &&
2024-04-15 18:31:36 +00:00
Math.abs(player.countCards("h") - current.countCards("h")) == 2
2024-04-15 18:10:02 +00:00
);
2023-10-07 10:14:49 +00:00
});
2024-04-15 18:10:02 +00:00
if (targets.includes(target)) {
2024-04-15 18:31:36 +00:00
if (player.countCards("h") < target.countCards("h"))
return get.sgn(num + 0.5) * Math.sqrt(2 - num);
2024-04-15 18:10:02 +00:00
else return num * (2 + num);
2023-10-07 10:14:49 +00:00
}
2024-04-15 18:10:02 +00:00
return get.sgn(num + 0.5) * (1 - num) * 0.25;
2023-10-07 10:14:49 +00:00
},
2023-08-11 15:43:48 +00:00
},
},
2024-04-15 18:10:02 +00:00
subSkill: {
backup: {
filterCard(card) {
return get.itemtype(card) == "card";
2023-08-11 14:41:10 +00:00
},
2024-04-15 18:10:02 +00:00
position: "hes",
filterTarget: lib.filter.filterTarget,
selectCard: 1,
check(card) {
var player = _status.event.player;
2024-04-15 18:31:36 +00:00
if (player.hasSkill("clanzhongliu") && get.position(card) != "h")
2024-04-15 18:10:02 +00:00
return 10 - get.value(card);
return 5 - get.value(card);
2023-10-07 10:14:49 +00:00
},
2024-04-15 18:10:02 +00:00
log: false,
precontent() {
2023-08-11 14:41:10 +00:00
delete event.result.skill;
},
},
2024-04-15 18:10:02 +00:00
},
2023-08-11 14:41:10 +00:00
},
2024-04-15 18:10:02 +00:00
clanchenya: {
audio: 2,
trigger: {
global: ["useSkillAfter", "logSkill"],
},
filter(event, player) {
if (event.type != "player") return false;
var skill = event.sourceSkill || event.skill;
var info = get.info(skill);
if (info.charlotte) return false;
2024-04-15 18:31:36 +00:00
var translation = get.skillInfoTranslation(skill, event.player);
2024-04-15 18:10:02 +00:00
if (!translation) return false;
var match = translation.match(/“?出牌阶段限一次/g);
2024-04-15 18:31:36 +00:00
if (!match || match.every((value) => value != "出牌阶段限一次")) return false;
2024-04-15 18:10:02 +00:00
return event.player.countCards("h") > 0;
},
check(event, player) {
return get.attitude(player, event.player) > 0;
},
logTarget: "player",
content() {
"step 0";
var num = trigger.player.countCards("h");
trigger.player
.chooseCard(
"是否重铸任意张牌名字数为" + num + "的牌?",
[1, Infinity],
"he",
2024-04-15 18:31:36 +00:00
(card, player) => _status.event.cards.includes(card) && player.canRecast(card)
2024-04-15 18:10:02 +00:00
)
.set("ai", (card) => {
var val = get.value(card);
return 6 - val;
})
.set(
"cards",
trigger.player.getCards("he", (card) => {
return get.cardNameLength(card) == num;
})
);
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) trigger.player.recast(result.cards);
},
2023-08-11 14:41:10 +00:00
},
2023-07-30 07:28:41 +00:00
//族王允
2024-04-15 18:10:02 +00:00
clanjiexuan: {
audio: 2,
enable: "phaseUse",
limited: true,
zhuanhuanji: "number",
mark: true,
marktext: "☯",
intro: {
markcount: () => 0,
content(storage) {
return (
"限定技,转换技。你可以将一张" +
2024-04-15 18:31:36 +00:00
((storage || 0) % 2 ? "黑色牌当【过河拆桥】" : "红色牌当【顺手牵羊】") +
2024-04-15 18:10:02 +00:00
"使用。"
);
2023-07-30 07:28:41 +00:00
},
},
2024-04-15 18:10:02 +00:00
viewAs(cards, player) {
var storage = player.storage.clanjiexuan;
var name = (storage || 0) % 2 ? "guohe" : "shunshou";
return { name: name };
},
check(card) {
var player = _status.event.player;
var storage = player.storage.clanjiexuan;
var name = (storage || 0) % 2 ? "guohe" : "shunshou";
2024-04-15 18:31:36 +00:00
var fix = player.hasSkill("clanzhongliu") && get.position(card) != "h" ? 2 : 1;
return (get.value({ name: name }, player) - get.value(card)) * fix;
2024-04-15 18:10:02 +00:00
},
position: "hes",
filterCard(card, player) {
var storage = player.storage.clanjiexuan;
2024-04-15 18:31:36 +00:00
return get.color(card) == ((storage || 0) % 2 ? "black" : "red");
2024-04-15 18:10:02 +00:00
},
prompt() {
var storage = _status.event.player.storage.clanjiexuan;
2024-04-15 18:31:36 +00:00
if ((storage || 0) % 2) return "将一张黑色牌当【过河拆桥】使用";
2024-04-15 18:10:02 +00:00
return "将一张红色牌当【顺手牵羊】使用";
},
skillAnimation: true,
animationColor: "thunder",
precontent() {
"step 0";
var skill = "clanjiexuan";
2023-07-30 07:28:41 +00:00
player.logSkill(skill);
player.changeZhuanhuanji(skill);
2024-04-15 18:10:02 +00:00
player.awakenSkill(skill, true);
2023-07-30 07:28:41 +00:00
delete event.result.skill;
},
2024-04-15 18:10:02 +00:00
ai: {
order(item, player) {
player = player || _status.event.player;
var storage = _status.event.player.storage.clanjiexuan;
var name = (storage || 0) % 2 ? "guohe" : "shunshou";
return get.order({ name: name }) + 0.1;
2023-07-30 07:28:41 +00:00
},
},
},
2024-04-15 18:10:02 +00:00
clanmingjie: {
init(player) {
player.addSkill("clanmingjie_record");
},
initSkill(skill) {
if (!lib.skill[skill]) {
lib.skill[skill] = {
charlotte: true,
mark: true,
marktext: "戒",
intro: { content: "已被$指定为【铭戒】目标" },
2023-12-02 05:29:43 +00:00
};
2024-04-15 18:10:02 +00:00
lib.translate[skill] = "铭戒";
lib.translate[skill + "_bg"] = "戒";
2023-12-02 05:29:43 +00:00
}
},
2024-04-15 18:10:02 +00:00
onremove(player) {
player.removeSkill("clanmingjie_record");
},
audio: 2,
enable: "phaseUse",
limited: true,
filterTarget(card, player, target) {
return !target.hasSkill("clanmingjie_" + player.playerid);
},
skillAnimation: true,
animationColor: "thunder",
content() {
player.awakenSkill("clanmingjie");
player.addSkill("clanmingjie_effect");
var skill = "clanmingjie_" + player.playerid;
game.broadcastAll(lib.skill.clanmingjie.initSkill, skill);
target.addTempSkill(skill, { player: "phaseAfter" });
target.storage[skill] = player;
},
ai: {
order: 10,
result: {
target(player, target) {
2024-04-15 18:31:36 +00:00
if (player.hasSkill("clanzhongliu") || player.hp == 1) {
2024-04-15 18:10:02 +00:00
if (
!player.hasCard((card) => {
var info = get.info(card);
2024-04-15 18:31:36 +00:00
if (info.allowMultiple == false) return false;
if (!lib.filter.targetEnabled2(card, player, target)) return false;
2024-04-15 18:10:02 +00:00
return game.hasPlayer((current) => {
return (
player.canUse(card, current) &&
2024-04-15 18:31:36 +00:00
get.effect(current, card, player, player) > 0 &&
2024-04-15 18:10:02 +00:00
current != target &&
2024-04-15 18:31:36 +00:00
get.effect(target, card, player, player) > 0
2024-04-15 18:10:02 +00:00
);
});
}, "hs")
)
return 0;
} else {
if (
player.countCards("hs", (card) => {
var info = get.info(card);
2024-04-15 18:31:36 +00:00
if (info.allowMultiple == false) return false;
if (!lib.filter.targetEnabled2(card, player, target)) return false;
2024-04-15 18:10:02 +00:00
return game.hasPlayer((current) => {
return (
player.canUse(card, current) &&
2024-04-15 18:31:36 +00:00
get.effect(current, card, player, player) > 0 &&
2024-04-15 18:10:02 +00:00
current != target &&
2024-04-15 18:31:36 +00:00
get.effect(target, card, player, player) > 0
2024-04-15 18:10:02 +00:00
);
});
}) < 3
)
return 0;
2023-07-30 07:28:41 +00:00
}
2024-04-15 18:10:02 +00:00
return get.sgnAttitude(player, target);
2023-07-30 07:28:41 +00:00
},
2023-12-02 05:29:43 +00:00
},
2023-07-30 07:28:41 +00:00
},
2024-04-15 18:10:02 +00:00
subSkill: {
effect: {
charlotte: true,
audio: "clanmingjie",
trigger: { player: "useCard2" },
filter(event, player) {
var card = event.card;
var info = get.info(card);
if (info.allowMultiple == false) return false;
if (event.targets && !info.multitarget) {
return game.filterPlayer().some((current) => {
2024-04-15 18:31:36 +00:00
if (!current.hasSkill("clanmingjie_" + player.playerid)) return false;
2024-04-15 18:10:02 +00:00
return (
!event.targets.includes(current) &&
2024-04-15 18:31:36 +00:00
lib.filter.targetEnabled2(card, player, current) &&
lib.filter.targetInRange(card, player, current)
2024-04-15 18:10:02 +00:00
);
});
2023-07-30 07:28:41 +00:00
}
return false;
},
2024-04-15 18:10:02 +00:00
direct: true,
content() {
"step 0";
player
.chooseTarget(
get.prompt("clanmingjie_effect"),
2024-04-15 18:31:36 +00:00
"令任意【铭戒】目标角色成为" + get.translation(trigger.card) + "的目标",
2024-04-15 18:10:02 +00:00
function (card, player, target) {
2024-04-15 18:31:36 +00:00
var trigger = _status.event.getTrigger();
2024-04-15 18:10:02 +00:00
if (
trigger.targets.includes(target) ||
!target.isIn() ||
2024-04-15 18:31:36 +00:00
!target.hasSkill("clanmingjie_" + player.playerid)
2024-04-15 18:10:02 +00:00
)
return false;
return (
2024-04-15 18:31:36 +00:00
lib.filter.targetEnabled2(trigger.card, player, target) &&
lib.filter.targetInRange(trigger.card, player, target)
2024-04-15 18:10:02 +00:00
);
},
[1, Infinity]
)
.set("ai", function (target) {
var player = _status.event.player;
var trigger = _status.event.getTrigger();
2024-04-15 18:31:36 +00:00
return get.effect(target, trigger.card, player, player);
2024-04-15 18:10:02 +00:00
});
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var targets = result.targets.sortBySeat();
player.logSkill("clanmingjie_effect", targets);
trigger.targets.addArray(targets);
2024-04-15 18:31:36 +00:00
game.log(targets, "成为了", trigger.card, "的额外目标");
2023-07-30 07:28:41 +00:00
}
},
2024-04-15 18:10:02 +00:00
group: "clanmingjie_targeted",
2023-07-30 07:28:41 +00:00
},
2024-04-15 18:10:02 +00:00
targeted: {
charlotte: true,
trigger: { global: "phaseEnd" },
filter(event, player) {
2024-04-15 18:31:36 +00:00
var cards = player.getStorage("clanmingjie_record").slice();
2024-04-15 18:10:02 +00:00
cards = cards.filterInD("d");
if (!cards.length) return false;
2024-04-15 18:31:36 +00:00
var history = player.getHistory("useSkill", (evt) => evt.skill == "clanmingjie");
2024-04-15 18:10:02 +00:00
if (history.length) {
2024-04-15 18:31:36 +00:00
var targets = history.reduce((list, evt) => list.addArray(evt.targets), []);
if (event.player != player && targets.includes(event.player)) return true;
2023-12-02 05:29:43 +00:00
}
2024-04-15 18:10:02 +00:00
if (player.actionHistory.length >= 2) {
2024-04-15 18:31:36 +00:00
for (var i = player.actionHistory.length - 2; i >= 0; i--) {
2024-04-15 18:10:02 +00:00
if (!player.actionHistory[i].isMe) continue;
2024-04-15 18:31:36 +00:00
var history2 = player.actionHistory[i].useSkill.filter(
2024-04-15 18:10:02 +00:00
(evt) => evt.skill == "clanmingjie"
);
if (history2.length) {
var targets2 = history2.reduce(
2024-04-15 18:31:36 +00:00
(list, evt) => list.addArray(evt.targets),
2024-04-15 18:10:02 +00:00
[]
);
2024-04-15 18:31:36 +00:00
if (targets2.includes(event.player)) return true;
2023-12-02 05:29:43 +00:00
}
break;
}
}
return false;
2023-07-30 07:28:41 +00:00
},
2024-04-15 18:10:02 +00:00
forced: true,
popup: false,
content() {
"step 0";
2024-04-15 18:31:36 +00:00
var cards = player.getStorage("clanmingjie_record").slice();
2024-04-15 18:10:02 +00:00
cards = cards.filterInD("d");
event.cards = cards;
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
player
.chooseButton(["铭戒:是否使用这些牌?", cards])
.set("filterButton", (button) => {
2024-04-15 18:31:36 +00:00
return _status.event.player.hasUseTarget(button.link);
2024-04-15 18:10:02 +00:00
})
.set("ai", (button) => {
2024-04-15 18:31:36 +00:00
return _status.event.player.getUseValue(button.link);
2024-04-15 18:10:02 +00:00
});
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var card = result.links[0];
event.cards.remove(card);
2024-04-15 18:10:02 +00:00
player.$gain2(card, false);
2023-07-30 07:28:41 +00:00
game.delayx();
2024-04-15 18:10:02 +00:00
player.chooseUseTarget(card, true);
} else event.finish();
2024-04-15 18:31:36 +00:00
"step 3";
2024-04-15 18:10:02 +00:00
if (
event.cards.filter((card) => {
2024-04-15 18:31:36 +00:00
return get.position(card, true) == "d" && player.hasUseTarget(card);
2024-04-15 18:10:02 +00:00
}).length
)
event.goto(1);
2023-07-30 07:28:41 +00:00
},
},
2024-04-15 18:10:02 +00:00
record: {
charlotte: true,
trigger: {
2024-04-15 18:31:36 +00:00
global: ["shaMiss", "eventNeutralized", "useCard1", "phaseAfter"],
2023-07-30 07:28:41 +00:00
},
2024-04-15 18:10:02 +00:00
filter(event, player) {
if (event.name == "useCard") {
return get.suit(event.card) == "spade";
2023-07-30 07:28:41 +00:00
}
2024-04-15 18:10:02 +00:00
if (event.name == "phase") return true;
if (event.type != "card") return false;
2023-07-30 07:28:41 +00:00
return true;
},
2024-04-15 18:10:02 +00:00
silent: true,
forced: true,
content() {
"step 0";
if (trigger.name == "phase") {
2023-07-30 07:28:41 +00:00
delete player.storage.clanmingjie_record;
return;
}
2024-04-15 18:31:36 +00:00
player.markAuto("clanmingjie_record", trigger.cards);
2024-04-15 18:10:02 +00:00
},
},
2024-04-15 18:10:02 +00:00
},
2023-07-30 07:28:41 +00:00
},
//族钟琰
2024-04-15 18:10:02 +00:00
clanguangu: {
audio: 2,
enable: "phaseUse",
usable: 1,
zhuanhuanji: true,
mark: true,
marktext: "☯",
intro: {
content(storage) {
return (
"转换技。出牌阶段限一次,你可以观看" +
2024-04-15 18:31:36 +00:00
(storage ? "一名角色的至多四张手" : "牌堆顶的至多四张") +
2024-04-15 18:10:02 +00:00
"牌,然后可以使用其中的一张牌。"
);
},
},
2024-04-15 18:10:02 +00:00
filter(event, player) {
if (player.storage.clanguangu)
return game.hasPlayer((current) => {
return current.countCards("h");
});
return true;
},
2024-04-15 18:10:02 +00:00
chooseButton: {
dialog(event, player) {
2024-04-15 18:31:36 +00:00
var dialog = ui.create.dialog("观骨:选择观看牌堆的牌数", "hidden");
if (player.storage.clanguangu) dialog.forceDirect = true;
return dialog;
},
2024-04-15 18:10:02 +00:00
chooseControl(event, player) {
var list = [1, 2, 3, 4].map((i) => {
return get.cnNumber(i, true);
});
2024-04-15 18:10:02 +00:00
list.push("cancel2");
return list;
},
2024-04-15 18:10:02 +00:00
check(button, player) {
var ret;
2024-04-15 18:10:02 +00:00
if (!player.hasSkill("clanxiaoyong")) ret = 4;
else {
var list = [4, 3, 2, 1];
player.getHistory("useCard", (evt) => {
var len = get.cardNameLength(evt.card);
list.remove(len);
});
2024-04-15 18:10:02 +00:00
if (list.length) ret = list[0];
else ret = 4;
}
2024-04-15 18:10:02 +00:00
return get.cnNumber(ret, true);
},
2024-04-15 18:10:02 +00:00
backup(result, player) {
return {
2024-04-15 18:10:02 +00:00
audio: "clanguangu",
filterCard: () => false,
selectCard: -1,
filterTarget(card, player, target) {
if (player.storage.clanguangu) return true;
return false;
},
2024-04-15 18:10:02 +00:00
selectTarget() {
var player = _status.event.player;
if (player.storage.clanguangu) return 1;
return -1;
},
2024-04-15 18:10:02 +00:00
num: result.index + 1,
content() {
"step 0";
player.changeZhuanhuanji("clanguangu");
if (!targets.length) {
var num = lib.skill.clanguangu_backup.num;
var cards = get.cards(num);
event.cards = cards.slice(0);
while (cards.length)
2024-04-15 18:31:36 +00:00
ui.cardPile.insertBefore(cards.pop().fix(), ui.cardPile.firstChild);
2023-08-22 14:54:05 +00:00
game.updateRoundNumber();
event.goto(2);
2024-04-15 18:10:02 +00:00
} else {
var ret;
2024-04-15 18:31:36 +00:00
if (!player.hasSkill("clanxiaoyong")) ret = 4;
2024-04-15 18:10:02 +00:00
else {
var list = [4, 3, 2, 1];
player.getHistory("useCard", (evt) => {
2024-04-15 18:31:36 +00:00
var len = get.cardNameLength(evt.card);
list.remove(len);
});
2024-04-15 18:10:02 +00:00
if (list.length) ret = list[0];
else ret = 4;
}
2024-04-15 18:10:02 +00:00
player
2024-04-15 18:31:36 +00:00
.choosePlayerCard(target, "h", true, [1, 4])
2024-04-15 18:10:02 +00:00
.set(
"prompt",
2024-04-15 18:31:36 +00:00
"观骨:观看" + get.translation(target) + "的至多四张牌"
2024-04-15 18:10:02 +00:00
)
.set("ai", (button) => {
2024-04-15 18:31:36 +00:00
if (ui.selected.buttons.length >= _status.event.num) return 0;
2024-04-15 18:10:02 +00:00
return Math.random();
})
.set("num", ret);
}
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
event.cards = result.links;
} else {
event.finish();
}
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
var count = cards.length;
event.getParent().viewedCount = count;
player
2024-04-15 18:31:36 +00:00
.chooseButton(["观骨:是否使用其中一张牌?", cards])
2024-04-15 18:10:02 +00:00
.set("filterButton", (button) => {
var player = _status.event.player;
var card = button.link;
var cardx = {
2024-04-15 18:31:36 +00:00
name: get.name(card, get.owner(card)),
nature: get.nature(card, get.owner(card)),
2024-04-15 18:10:02 +00:00
cards: [card],
};
2024-04-15 18:31:36 +00:00
return player.hasUseTarget(cardx, null, false);
2024-04-15 18:10:02 +00:00
})
.set("ai", (button) => {
var len = _status.event.len;
var card = button.link;
var fix = 1;
2024-04-15 18:31:36 +00:00
if (get.cardNameLength(card) == len) fix = 2;
return fix * _status.event.player.getUseValue(card);
2024-04-15 18:10:02 +00:00
})
.set(
"len",
(function () {
2024-04-15 18:31:36 +00:00
if (!player.hasSkill("clanxiaoyong")) return 0;
2024-04-15 18:10:02 +00:00
var list = [];
2024-04-15 18:31:36 +00:00
player.getHistory("useCard", (evt) => {
var len = get.cardNameLength(evt.card);
list.add(len);
});
if (!list.includes(count)) return count;
if (list.length) return list.randomGet();
2024-04-15 18:10:02 +00:00
return 4;
})()
);
2024-04-15 18:31:36 +00:00
"step 3";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var card = result.links[0];
cards.remove(card);
2024-04-15 18:10:02 +00:00
var cardx = {
name: get.name(card, get.owner(card)),
2024-04-15 18:31:36 +00:00
nature: get.nature(card, get.owner(card)),
2024-04-15 18:10:02 +00:00
cards: [card],
};
var next = player
2024-04-15 18:31:36 +00:00
.chooseUseTarget(cardx, [card], true, false)
2024-04-15 18:10:02 +00:00
.set("oncard", (card) => {
2024-04-15 18:31:36 +00:00
var owner = _status.event.getParent().owner;
2024-04-15 18:10:02 +00:00
if (owner) owner.$throw(card.cards);
});
2024-04-15 18:31:36 +00:00
if (card.name === cardx.name && get.is.sameNature(card, cardx, true))
2024-04-15 18:10:02 +00:00
next.viewAs = false;
var owner = get.owner(card);
2024-04-15 18:31:36 +00:00
if (owner != player && get.position(card) == "h") {
2024-04-15 18:10:02 +00:00
next.throw = false;
next.set("owner", owner);
}
}
},
2024-04-15 18:10:02 +00:00
ai: {
order: 10,
result: {
target(player, target) {
2024-04-15 18:31:36 +00:00
return -Math.min(target.countCards("h"), 4) / 2;
},
},
2024-04-15 18:10:02 +00:00
},
};
},
2024-04-15 18:10:02 +00:00
prompt(result, player) {
2024-04-15 18:31:36 +00:00
if (!player.storage.clanguangu) return "点击“确定”以观看牌堆顶牌";
2024-04-15 18:10:02 +00:00
return "观骨:选择观看牌的目标";
},
},
2024-04-15 18:10:02 +00:00
subSkill: {
backup: {},
},
2024-04-15 18:10:02 +00:00
ai: {
order: 10,
result: {
player: 1,
},
},
},
2024-04-15 18:10:02 +00:00
clanxiaoyong: {
audio: 2,
trigger: {
player: "useCard",
},
filter(event, player) {
var len = get.cardNameLength(event.card);
if (
player.hasHistory(
"useCard",
function (evt) {
2024-04-15 18:31:36 +00:00
return evt != event && get.cardNameLength(evt.card) == len;
2024-04-15 18:10:02 +00:00
},
event
)
)
return false;
if (!player.getStat().skill.clanguangu) return false;
var history = player
.getAllHistory("useSkill", (evt) => {
return evt.skill == "clanguangu_backup";
})
.map((evt) => evt.event);
if (!history.length) return false;
var num = 0;
for (var i = history.length - 1; i >= 0; i--) {
var evt = history[i];
if (evt.viewedCount) {
num = evt.viewedCount;
break;
}
}
2024-04-15 18:10:02 +00:00
if (num && len == num) return true;
return false;
},
2024-04-15 18:10:02 +00:00
forced: true,
content() {
"step 0";
delete player.getStat().skill.clanguangu;
2024-04-15 18:10:02 +00:00
game.log(player, "重置了", "#g【观骨】");
},
ai: {
combo: "clanguangu",
},
mod: {
aiOrder(player, card, num) {
2024-04-15 18:31:36 +00:00
if (!player.hasSkill("clanguangu") || !player.getStat().skill.clanguangu) return;
2024-04-15 18:10:02 +00:00
var history = player
.getAllHistory("useSkill", (evt) => {
return evt.skill == "clanguangu_backup";
})
.map((evt) => evt.event);
if (!history.length) return;
var numx = 0;
for (var i = history.length - 1; i >= 0; i--) {
var evt = history[i];
if (evt.viewedCount) {
numx = evt.viewedCount;
break;
}
}
2024-04-15 18:10:02 +00:00
if (numx == get.cardNameLength(card)) {
if (
!player.hasHistory("useCard", (evt) => {
return numx == get.cardNameLength(evt.card);
})
) {
return num + 9;
}
}
},
2024-04-15 18:10:02 +00:00
},
},
2024-04-15 18:10:02 +00:00
clanbaozu: {
audio: 2,
audioname: ["clan_zhongyan", "clan_zhonghui", "clan_zhongyu"],
trigger: { global: "dying" },
clanSkill: true,
limited: true,
skillAnimation: true,
animationColor: "water",
filter(event, player) {
return (
2024-04-15 18:31:36 +00:00
(event.player == player || event.player.hasClan("颍川钟氏")) &&
2024-04-15 18:10:02 +00:00
event.player.hp <= 0 &&
!event.player.isLinked()
);
},
logTarget: "player",
check(event, player) {
return lib.skill.wanlan.check(event, player);
},
content() {
"step 0";
player.awakenSkill("clanbaozu");
2024-04-15 18:31:36 +00:00
"step 1";
trigger.player.link(true);
trigger.player.recover();
2023-08-13 14:23:37 +00:00
},
},
2023-09-16 10:23:03 +00:00
//族王淩
2024-04-15 18:10:02 +00:00
clanbolong: {
audio: 2,
enable: "phaseUse",
usable: 1,
filter(event, player) {
return player.countCards("he") > 0;
},
filterTarget: lib.filter.notMe,
content() {
"step 0";
var num = player.countCards("h");
var str =
"是否交给其" +
get.cnNumber(num) +
"张牌,然后视为你对其使用一张【酒】?或者点击“取消”,令其交给你一张牌,然后其视为对你使用一张雷【杀】。";
2024-04-15 18:31:36 +00:00
if (!num || target.countCards("he") < num) event._result = { bool: false };
2024-04-15 18:10:02 +00:00
else
target
2024-04-15 18:31:36 +00:00
.chooseCard(get.translation(player) + "对你发动了【驳龙】", str, num, "he")
2024-04-15 18:10:02 +00:00
.set("ai", (card) => {
if (_status.event.canGive)
return (
2024-04-15 18:31:36 +00:00
5 + Math.max(0, 3 - _status.event.player.hp) / 1.5 - get.value(card)
2024-04-15 18:10:02 +00:00
);
return 0;
})
.set(
"canGive",
(function () {
2024-04-15 18:31:36 +00:00
if (get.attitude(target, player) > 1) return true;
if (!player.hasSha() && player.countCards("h") <= 4) return true;
2024-04-15 18:10:02 +00:00
var sha = {
name: "sha",
nature: "thunder",
isCard: true,
};
if (
game.hasPlayer((current) => {
return (
2024-04-15 18:31:36 +00:00
player.canUse(sha, current, true, true) &&
get.effect(current, sha, player, target) < 0 &&
!current.countCards("hs", ["shan", "caochuan"])
2024-04-15 18:10:02 +00:00
);
})
)
return false;
return true;
})()
);
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var cards = result.cards;
target.give(cards, player);
2024-04-15 18:31:36 +00:00
if (lib.filter.targetEnabled2({ name: "jiu", isCard: true }, target, player))
target.useCard({ name: "jiu", isCard: true }, player, false);
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
event.finish();
2024-04-15 18:10:02 +00:00
} else {
player.chooseCard(
"驳龙:交给" + get.translation(target) + "一张牌",
2024-04-15 18:31:36 +00:00
get.translation(target) + "拒绝给牌,请交给其一张牌然后视为对其使用一张雷【杀】",
2024-04-15 18:10:02 +00:00
true,
"he"
);
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
}
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var cards = result.cards;
player.give(cards, target);
var sha = {
name: "sha",
nature: "thunder",
isCard: true,
};
2024-04-15 18:31:36 +00:00
if (player.canUse(sha, target, false, false)) player.useCard(sha, target, false);
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
}
},
2024-04-15 18:10:02 +00:00
ai: {
order(item, player) {
return get.order({ name: "jiu" }) + 0.01;
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
},
2024-04-15 18:10:02 +00:00
threaten: 2,
result: {
target(player, target) {
if (
player.hasCard((card) => {
return (
get.value(card) < 5 &&
2024-04-15 18:31:36 +00:00
!["shan", "tao", "jiu", "wuxie", "caochuan"].includes(get.name(card))
2024-04-15 18:10:02 +00:00
);
}, "he")
)
return -1;
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
return 0;
},
2024-04-15 18:10:02 +00:00
},
},
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
},
2024-04-15 18:10:02 +00:00
clanzhongliu: {
audio: 2,
audioname: [
"clan_wangling",
"clan_wangyun",
"clan_wanghun",
"clan_wanglun",
"clan_wangguang",
"clan_wangmingshan",
],
trigger: { player: "useCard" },
forced: true,
clanSkill: true,
filter(event, player) {
if (!event.cards.length) return true;
return !game.hasPlayer2((current) => {
2024-04-15 18:31:36 +00:00
if (!current.hasClan("太原王氏") && current != player) return false;
2024-04-15 18:10:02 +00:00
return current.hasHistory("lose", (evt) => {
2024-04-15 18:31:36 +00:00
return evt.getParent() == event && evt.hs.length > 0;
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
});
});
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
},
2024-04-15 18:10:02 +00:00
content() {
"step 0";
var skills = player.getStockSkills(true, true);
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
game.expandSkills(skills);
2024-04-15 18:10:02 +00:00
var resetSkills = [];
var suffixs = ["used", "round", "block", "blocker"];
for (var skill of skills) {
var info = get.info(skill);
if (typeof info.usable == "number") {
if (
player.hasSkill("counttrigger") &&
player.storage.counttrigger[skill] &&
player.storage.counttrigger[skill] >= 1
) {
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
delete player.storage.counttrigger[skill];
resetSkills.add(skill);
}
2024-04-15 18:31:36 +00:00
if (typeof get.skillCount(skill) == "number" && get.skillCount(skill) >= 1) {
2024-04-15 18:10:02 +00:00
delete player.getStat("skill")[skill];
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
resetSkills.add(skill);
}
}
2024-04-15 18:31:36 +00:00
if (info.round && player.storage[skill + "_roundcount"]) {
2024-04-15 18:10:02 +00:00
delete player.storage[skill + "_roundcount"];
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
resetSkills.add(skill);
}
2024-04-15 18:10:02 +00:00
if (player.storage[`temp_ban_${skill}`]) {
delete player.storage[`temp_ban_${skill}`];
}
2024-04-15 18:10:02 +00:00
if (player.awakenedSkills.includes(skill)) {
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
player.restoreSkill(skill);
resetSkills.add(skill);
}
2024-04-15 18:10:02 +00:00
for (var suffix of suffixs) {
if (player.hasSkill(skill + "_" + suffix)) {
player.removeSkill(skill + "_" + suffix);
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
resetSkills.add(skill);
}
}
}
2024-04-15 18:10:02 +00:00
if (resetSkills.length) {
var str = "";
for (var i of resetSkills) {
str += "【" + get.translation(i) + "】、";
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
}
2024-04-15 18:10:02 +00:00
game.log(player, "重置了技能", "#g" + str.slice(0, -1));
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
}
2024-04-15 18:10:02 +00:00
},
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
},
2023-05-13 14:57:29 +00:00
//族吴匡
2024-04-15 18:10:02 +00:00
clanlianzhu: {
audio: 2,
zhuanhuanji: true,
mark: true,
marktext: "☯",
intro: {
content(storage) {
var str = "转换技。每名角色A的出牌阶段限一次。";
if (!storage)
str +=
"A可以重铸一张牌,然后你可以重铸一张牌。若这两张牌颜色不同,则你的手牌上限-1。";
else
str +=
"A可以令你选择一名在你或A攻击范围内的另一名其他角色B,然后A和你可依次选择是否对B使用一张【杀】。若这两张【杀】颜色相同,则你的手牌上限+1";
2023-05-13 14:57:29 +00:00
return str;
},
},
2024-04-15 18:10:02 +00:00
global: "clanlianzhu_global",
subSkill: {
global: {
forceaudio: true,
audio: "clanlianzhu",
enable: "phaseUse",
filter: (event, player) =>
game.hasPlayer((current) =>
2024-04-15 18:31:36 +00:00
lib.skill.clanlianzhu_global.filterTarget(null, player, current)
2024-04-15 18:10:02 +00:00
),
filterCard: (card, player) =>
game.hasPlayer(
(current) =>
current.hasSkill("clanlianzhu") &&
!current.hasSkill("clanlianzhu_targeted") &&
!current.storage.clanlianzhu
) && player.canRecast(card),
selectCard: [0, 1],
check(card) {
return 5 - get.value(card);
2023-05-13 14:57:29 +00:00
},
2024-04-15 18:10:02 +00:00
filterTarget(card, player, target) {
return (
target.hasSkill("clanlianzhu") &&
!target.hasSkill("clanlianzhu_targeted") &&
(!target.storage.clanlianzhu ||
(target.storage.clanlianzhu &&
game.hasPlayer((current) => {
2024-04-15 18:31:36 +00:00
if (current == player || current == target) return false;
return current.inRangeOf(player) || current.inRangeOf(target);
2024-04-15 18:10:02 +00:00
})))
);
2023-05-13 14:57:29 +00:00
},
2024-04-15 18:10:02 +00:00
selectTarget() {
var player = _status.event.player;
var count = game.countPlayer((current) =>
2024-04-15 18:31:36 +00:00
lib.skill.clanlianzhu_global.filterTarget(null, player, current)
2024-04-15 18:10:02 +00:00
);
return count == 1 ? -1 : 1;
2023-05-13 14:57:29 +00:00
},
2024-04-15 18:10:02 +00:00
filterOk() {
var target = ui.selected.targets[0];
if (!target) return false;
if (!target.storage.clanlianzhu) {
return ui.selected.cards.length == 1;
2023-05-13 14:57:29 +00:00
}
2024-04-15 18:10:02 +00:00
return ui.selected.cards.length == 0;
2023-05-13 14:57:29 +00:00
},
2024-04-15 18:10:02 +00:00
position: "he",
discard: false,
lose: false,
delay: false,
prompt() {
var player = _status.event.player;
var bocchi = [],
kita = [];
game.countPlayer(function (target) {
if (
target.hasSkill("clanlianzhu") &&
!target.hasSkill("clanlianzhu_targeted")
) {
if (target.storage.clanlianzhu) {
if (
game.hasPlayer((current) => {
2024-04-15 18:31:36 +00:00
if (current == player || current == target) return false;
return current.inRangeOf(player) || current.inRangeOf(target);
2024-04-15 18:10:02 +00:00
})
)
kita.add(target);
} else {
2024-04-15 18:31:36 +00:00
if (player.countCards("he") > 0) bocchi.add(target);
2023-05-13 14:57:29 +00:00
}
}
});
bocchi.sortBySeat();
kita.sortBySeat();
2024-04-15 18:10:02 +00:00
var str = "";
if (bocchi.length) {
str += "重铸一张牌,然后令";
bocchi.forEach((current, i) => {
str += get.translation(current);
if (i < bocchi.length - 1) str += "或";
2023-05-13 14:57:29 +00:00
});
2024-04-15 18:10:02 +00:00
str += "选择是否重铸一张牌";
if (kita.length) str += "。<br>或者";
2023-05-13 14:57:29 +00:00
}
2024-04-15 18:10:02 +00:00
if (kita.length) {
str += "令";
kita.forEach((current, i) => {
str += get.translation(current);
if (i < kita.length - 1) str += "或";
2023-05-13 14:57:29 +00:00
});
2024-04-15 18:10:02 +00:00
str += "选择一名目标,然后对其进行集火";
2023-05-13 14:57:29 +00:00
}
2024-04-15 18:10:02 +00:00
str += "。";
2023-05-13 14:57:29 +00:00
return str;
},
2024-04-15 18:10:02 +00:00
content() {
"step 0";
2024-04-15 18:31:36 +00:00
target.addTempSkill("clanlianzhu_targeted", "phaseUseAfter");
2024-04-15 18:10:02 +00:00
if (target.storage.clanlianzhu) event.goto(4);
target.changeZhuanhuanji("clanlianzhu");
2024-04-15 18:31:36 +00:00
"step 1";
2023-08-19 16:40:34 +00:00
player.recast(cards);
2024-04-15 18:31:36 +00:00
"step 2";
if (!target.countCards("he") && !_status.connectMode)
2024-04-15 18:10:02 +00:00
event._result = { bool: false };
2024-04-15 18:31:36 +00:00
else target.chooseCard("he", "联诛:是否重铸一张牌?", lib.filter.cardRecastable);
"step 3";
2024-04-15 18:10:02 +00:00
if (result.bool) {
2023-08-19 16:40:34 +00:00
target.recast(result.cards);
2024-04-15 18:31:36 +00:00
if (get.color(cards[0]) === get.color(result.cards[0]))
2024-04-15 18:10:02 +00:00
lib.skill.chenliuwushi.change(target, 1);
2023-05-13 14:57:29 +00:00
}
event.finish();
2024-04-15 18:31:36 +00:00
"step 4";
2024-04-15 18:10:02 +00:00
target
.chooseTarget(
"联诛:选择其与你使用【杀】的目标",
true,
(card, player, target) => {
2024-04-15 18:31:36 +00:00
if (target == player || target == _status.event.sourcex) return false;
2024-04-15 18:10:02 +00:00
return (
target.inRangeOf(player) ||
2024-04-15 18:31:36 +00:00
target.inRangeOf(_status.event.sourcex)
2024-04-15 18:10:02 +00:00
);
}
)
.set("ai", (target) => {
return get.effect(
target,
{ name: "sha" },
_status.event.player,
_status.event.player
);
})
.set("sourcex", player);
2024-04-15 18:31:36 +00:00
"step 5";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var targetx = result.targets[0];
event.targetx = targetx;
2023-05-13 14:57:29 +00:00
target.line(targetx);
2024-04-15 18:10:02 +00:00
event.targets = [player, target];
event.cards = [];
2024-04-15 18:31:36 +00:00
if (!event.isMine() && !event.isOnline()) game.delayx();
2024-04-15 18:10:02 +00:00
} else event.finish();
2024-04-15 18:31:36 +00:00
"step 6";
2024-04-15 18:10:02 +00:00
var current = targets.shift();
current
.chooseToUse(function (card, player, event) {
if (get.name(card) != "sha") return false;
2024-04-15 18:31:36 +00:00
return lib.filter.filterCard.apply(this, arguments);
}, "联诛:是否对" + get.translation(event.targetx) + "使用一张杀?")
2024-04-15 18:10:02 +00:00
.set("targetRequired", true)
.set("complexSelect", true)
2024-04-15 18:31:36 +00:00
.set("filterTarget", function (card, player, target) {
if (
target != _status.event.sourcex &&
!ui.selected.targets.includes(_status.event.sourcex)
)
return false;
return lib.filter.targetEnabled.apply(this, arguments);
})
2024-04-15 18:10:02 +00:00
.set("sourcex", event.targetx)
.set("addCount", false);
2024-04-15 18:31:36 +00:00
"step 7";
2024-04-15 18:10:02 +00:00
if (result.bool) cards.push(result.card);
if (targets.length > 0) event.goto(6);
2024-04-15 18:31:36 +00:00
"step 8";
2024-04-12 12:35:10 +00:00
if (cards.length > 1) {
const color = get.color(cards[0], false);
2024-04-15 18:10:02 +00:00
if (color != "none") {
2024-04-12 12:35:10 +00:00
for (let i = 1; i < cards.length; i++) {
2024-04-15 18:31:36 +00:00
const color2 = get.color(cards[i], false);
if (color !== color2 && color2 !== "none") {
lib.skill.chenliuwushi.change(target, -1);
2024-04-12 12:35:10 +00:00
break;
}
}
}
}
2023-05-13 14:57:29 +00:00
},
2024-04-15 18:10:02 +00:00
ai: {
order: 4.1,
result: {
player(player, target) {
if (
!target.storage.clanlianzhu &&
2024-04-15 18:31:36 +00:00
player.hasCard((card) => get.value(card) < 5, "he")
2024-04-15 18:10:02 +00:00
)
return 1;
2023-05-13 14:57:29 +00:00
return 0;
},
2024-04-15 18:10:02 +00:00
target(player, target) {
2024-04-15 18:31:36 +00:00
if (target.storage.clanlianzhu && player.hasSha()) return 1;
2023-05-13 14:57:29 +00:00
return 0;
2024-04-15 18:10:02 +00:00
},
},
},
2023-05-13 14:57:29 +00:00
},
2024-04-15 18:10:02 +00:00
targeted: { charlotte: true },
},
2023-05-13 14:57:29 +00:00
},
2023-03-31 11:34:38 +00:00
//族韩韶
2024-04-15 18:10:02 +00:00
clanfangzhen: {
audio: 2,
trigger: { player: "phaseUseBegin" },
filter(event, player) {
return game.hasPlayer((current) => !current.isLinked());
},
direct: true,
content() {
"step 0";
player
2024-04-15 18:31:36 +00:00
.chooseTarget(get.prompt2("clanfangzhen"), (card, player, target) => {
return !target.isLinked();
})
2024-04-15 18:10:02 +00:00
.set("ai", (target) => {
var player = _status.event.player;
if (_status.event.goon && target != player) {
target.classList.add("linked");
target.classList.add("linked2");
try {
2024-04-15 18:31:36 +00:00
var cards = player.getCards("hs", (cardx) => {
if (get.name(cardx) != "sha") return false;
return game.hasNature(cardx, "linked");
});
cards.map((i) => [i, get.effect(target, i, player, player)]);
2024-04-15 18:10:02 +00:00
cards.sort((a, b) => b[1] - a[1]);
} catch (e) {
target.classList.remove("linked");
target.classList.remove("linked2");
}
target.classList.remove("linked");
target.classList.remove("linked2");
var eff = cards[0][1];
if (eff > 0) return eff;
return Math.max(
2024-04-15 18:31:36 +00:00
2 * get.effect(target, { name: "draw" }, player, player) +
0.6 * get.effect(player, { name: "draw" }, player, player),
2024-04-15 18:10:02 +00:00
get.recoverEffect(target, player, player)
);
2023-03-31 11:34:38 +00:00
}
2024-04-15 18:10:02 +00:00
return Math.max(
2024-04-15 18:31:36 +00:00
2 * get.effect(target, { name: "draw" }, player, player) +
0.6 * get.effect(player, { name: "draw" }, player, player),
2024-04-15 18:10:02 +00:00
get.recoverEffect(target, player, player)
);
})
.set(
"goon",
player.countCards("hs", (card) => {
2024-04-15 18:31:36 +00:00
return get.name(card) == "jiu" && player.hasUseTarget(card);
2024-04-15 18:10:02 +00:00
}) &&
player.countCards("hs", (card) => {
if (get.name(card) != "sha") return false;
return game.hasNature(card, "linked");
})
);
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var target = result.targets[0];
event.target = target;
player.logSkill("clanfangzhen", target);
player.addSkill("clanfangzhen_remove");
2024-04-15 18:31:36 +00:00
player.markAuto("clanfangzhen_remove", [target.getSeatNum()]);
2023-03-31 11:34:38 +00:00
target.link(true);
2024-04-15 18:10:02 +00:00
var choices = ["选项一"],
choiceList = [
2024-04-15 18:31:36 +00:00
"摸两张牌,然后交给" + get.translation(target) + "两张牌",
2024-04-15 18:10:02 +00:00
"令" + get.translation(target) + "回复1点体力",
];
if (target.isDamaged()) choices.push("选项二");
2024-04-15 18:31:36 +00:00
else choiceList[1] = '<span style="opacity:0.5; ">' + choiceList[1] + "</span>";
2024-04-15 18:10:02 +00:00
player
.chooseControl(choices)
.set("prompt", "放赈:请选择一项")
.set("choiceList", choiceList)
.set("ai", () => {
var player = _status.event.player,
target = _status.event.getParent().target;
if (!target.isDamaged()) return 0;
if (
get.attitude(player, target) <= 0 &&
2024-04-15 18:31:36 +00:00
player.countCards("he", (card) => get.value(card) < 0) >= 2
2024-04-15 18:10:02 +00:00
)
return 0;
2024-04-15 18:31:36 +00:00
return 2 * get.effect(target, { name: "draw" }, player, player) +
0.6 * get.effect(player, { name: "draw" }, player, player) >
2024-04-15 18:10:02 +00:00
get.recoverEffect(target, player, player)
? 0
: 1;
});
} else event.finish();
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
if (result.control == "选项一") {
2023-03-31 11:34:38 +00:00
player.draw(2);
2024-04-15 18:10:02 +00:00
if (player == target) event.finish();
} else {
2023-03-31 11:34:38 +00:00
target.recover();
event.finish();
}
2024-04-15 18:31:36 +00:00
"step 3";
2024-04-15 18:10:02 +00:00
if (!player.countCards("he")) event.finish();
else if (player.countCards("he") <= 2)
event._result = {
bool: true,
cards: player.getCards("he"),
};
else {
2024-04-15 18:31:36 +00:00
player.chooseCard("放赈:交给" + get.translation(target) + "两张牌", "he", 2, true);
2023-03-31 11:34:38 +00:00
}
2024-04-15 18:31:36 +00:00
"step 4";
2024-04-15 18:10:02 +00:00
if (result.bool) {
player.give(result.cards, target);
2023-03-31 11:34:38 +00:00
}
},
2024-04-15 18:10:02 +00:00
ai: {
expose: 0.2,
},
subSkill: {
remove: {
trigger: { global: "roundStart" },
onremove: true,
forced: true,
locked: false,
charlotte: true,
filter(event, player) {
2024-04-15 18:31:36 +00:00
return player.getStorage("clanfangzhen_remove").includes(game.roundNumber);
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
content() {
player.removeSkills("clanfangzhen");
},
},
},
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
clanliuju: {
audio: 2,
trigger: { player: "phaseUseEnd" },
filter(event, player) {
2024-04-15 18:31:36 +00:00
return game.hasPlayer((current) => player.canCompare(current));
2024-04-15 18:10:02 +00:00
},
direct: true,
content() {
"step 0";
player
.chooseTarget(
get.prompt("clanliuju"),
"与一名其他角色拼点,输的角色可以使用任意张拼点牌中的非基本牌",
(card, player, target) => {
return player.canCompare(target);
}
)
.set("ai", (target) => {
var player = _status.event.player;
2024-04-15 18:31:36 +00:00
var ts = target.getCards("h").sort((a, b) => get.number(a) - get.number(b));
2024-04-15 18:10:02 +00:00
if (get.attitude(player, target) < 0) {
2024-04-15 18:31:36 +00:00
var hs = player.getCards("h").sort((a, b) => get.number(a) - get.number(b));
2024-04-15 18:10:02 +00:00
if (!hs.length || !ts.length) return 0;
2024-04-15 18:31:36 +00:00
if (get.type(hs[0], null, false) == "basic" && get.value(hs[0]) > 6) return 0;
2024-04-15 18:10:02 +00:00
if (
get.number(hs[0]) < get.number(ts[0]) ||
get.type(hs[0], null, false) == "basic"
)
return 1;
return Math.random() - 0.7;
}
return get.type(ts[0]) != "basic";
2023-03-31 11:34:38 +00:00
});
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var target = result.targets[0];
event.target = target;
player.logSkill("clanliuju", target);
player.chooseToCompare(target).set("small", true);
} else event.finish();
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
if (!result.tie) {
var loser = result.bool ? target : player;
var cards = [];
game.getGlobalHistory("cardMove", (evt) => {
if (evt.getParent(2) == event)
cards.addArray(
evt.cards.filter((i) => {
return (
get.position(i, true) == "d" &&
get.type(i, null, false) != "basic"
);
})
);
});
event.loser = loser;
2024-04-15 18:31:36 +00:00
event.distance = [get.distance(player, target), get.distance(target, player)];
2024-04-15 18:10:02 +00:00
if (cards.length) event.cards = cards;
2023-03-31 11:34:38 +00:00
else event.finish();
2024-04-15 18:10:02 +00:00
} else event.finish();
2024-04-15 18:31:36 +00:00
"step 3";
2024-04-15 18:10:02 +00:00
var cardsx = cards.filter(
2024-04-15 18:31:36 +00:00
(i) => get.position(i, true) == "d" && event.loser.hasUseTarget(i)
2024-04-15 18:10:02 +00:00
);
if (!cardsx.length) event.goto(6);
else
event.loser
2024-04-15 18:31:36 +00:00
.chooseButton(["留驹:是否使用其中的一张牌?", cardsx])
2024-04-15 18:10:02 +00:00
.set("filterButton", (button) => {
2024-04-15 18:31:36 +00:00
return _status.event.player.hasUseTarget(button.link);
2024-04-15 18:10:02 +00:00
})
.set("ai", (button) => {
2024-04-15 18:31:36 +00:00
return _status.event.player.getUseValue(button.link) + 0.1;
2024-04-15 18:10:02 +00:00
});
2024-04-15 18:31:36 +00:00
"step 4";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var card = result.links[0];
2023-03-31 11:34:38 +00:00
event.cards.remove(card);
2024-04-15 18:10:02 +00:00
event.loser.$gain2(card, false);
2023-03-31 11:34:38 +00:00
game.delayx();
2024-04-15 18:10:02 +00:00
event.loser.chooseUseTarget(true, card, false);
} else event.goto(6);
2024-04-15 18:31:36 +00:00
"step 5";
2024-04-15 18:10:02 +00:00
if (
2024-04-15 18:31:36 +00:00
cards.filter((i) => get.position(i, true) == "d" && event.loser.hasUseTarget(i))
.length
2024-04-15 18:10:02 +00:00
)
event.goto(3);
2024-04-15 18:31:36 +00:00
"step 6";
2024-04-15 18:10:02 +00:00
if (
get.distance(player, target) != event.distance[0] ||
get.distance(target, player) != event.distance[1]
) {
player.restoreSkill("clanxumin");
game.log(player, "重置了", "#g【恤民】");
2023-03-31 11:34:38 +00:00
}
2024-04-15 18:10:02 +00:00
},
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
clanxumin: {
audio: 2,
audioname: ["clan_hanshao", "clan_hanrong"],
enable: "phaseUse",
viewAs: { name: "wugu" },
filterCard: true,
filterTarget(card, player, target) {
if (player == target) return false;
return player.canUse(card, target);
},
selectTarget: [1, Infinity],
check(card) {
return 6 - get.value(card);
},
position: "he",
limited: true,
clanSkill: true,
skillAnimation: true,
animationColor: "soil",
precontent() {
player.logSkill("clanxumin");
player.awakenSkill("clanxumin");
2023-03-31 11:34:38 +00:00
delete event.result.skill;
},
2024-04-15 18:10:02 +00:00
ai: {
order: 7,
result: { target: 1 },
2023-03-31 11:34:38 +00:00
},
},
//族韩融
//我们连和!(?)
2024-04-15 18:10:02 +00:00
clanlianhe: {
audio: 2,
trigger: { player: "phaseUseBegin" },
filter(event, player) {
return game.hasPlayer((current) => !current.isLinked());
},
direct: true,
content() {
"step 0";
player
2024-04-15 18:31:36 +00:00
.chooseTarget(get.prompt2("clanlianhe"), 2, (card, player, target) => {
return !target.isLinked();
})
2024-04-15 18:10:02 +00:00
.set("ai", (target) => {
2024-04-15 18:31:36 +00:00
var att = get.attitude(_status.event.player, target);
2024-04-15 18:10:02 +00:00
if (att > 0) att /= 1.2;
return Math.abs(att);
});
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var targets = result.targets.sortBySeat();
targets.forEach((i) => i.link(true));
player.logSkill("clanlianhe", targets);
player.addSkill("clanlianhe_effect");
player.markAuto("clanlianhe_effect", targets);
2023-03-31 11:34:38 +00:00
}
},
2024-04-15 18:10:02 +00:00
subSkill: {
effect: {
trigger: { global: ["phaseUseEnd", "die"] },
charlotte: true,
forced: true,
locked: false,
popup: false,
onremove: true,
filter(event, player) {
2024-04-15 18:31:36 +00:00
return player.getStorage("clanlianhe_effect").includes(event.player);
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
marktext: "连",
intro: { content: "已选择目标:$" },
content() {
"step 0";
2024-04-15 18:31:36 +00:00
player.unmarkAuto("clanlianhe_effect", [trigger.player]);
2024-04-15 18:10:02 +00:00
if (trigger.name == "die") event.finish();
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (
trigger.player.hasHistory("gain", (evt) => {
return (
2024-04-15 18:31:36 +00:00
evt.getParent().name == "draw" && evt.getParent("phaseUse") == trigger
2024-04-15 18:10:02 +00:00
);
})
)
event.finish();
else {
2024-04-15 18:31:36 +00:00
player.logSkill("clanlianhe_effect", trigger.player);
2024-04-15 18:10:02 +00:00
var num = 0;
trigger.player.getHistory("gain", (evt) => {
2024-04-15 18:31:36 +00:00
if (evt.getParent("phaseUse") != trigger) return false;
2024-04-15 18:10:02 +00:00
num += evt.cards.length;
2023-03-31 11:34:38 +00:00
});
2024-04-15 18:10:02 +00:00
num = Math.min(num, 3);
event.num = num;
if (num <= 1) event._result = { bool: false };
else {
2024-04-15 18:31:36 +00:00
var pos = player == trigger.player ? "e" : "he";
2024-04-15 18:10:02 +00:00
trigger.player
.chooseCard(
"连和:交给" +
get.translation(player) +
get.cnNumber(num - 1) +
"张牌,或点“取消”令其摸" +
get.cnNumber(num + 1) +
"张牌",
num - 1,
pos
)
.set("ai", (card) => {
if (_status.event.draw) return 0;
return 5 - get.value(card);
})
2024-04-15 18:31:36 +00:00
.set("draw", get.attitude(trigger.player, player) >= 0);
2023-03-31 11:34:38 +00:00
}
}
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
if (result.bool) {
trigger.player.give(result.cards, player);
} else player.draw(num + 1);
},
},
},
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
clanhuanjia: {
audio: 2,
trigger: { player: "phaseUseEnd" },
filter(event, player) {
2024-04-15 18:31:36 +00:00
return game.hasPlayer((current) => player.canCompare(current));
2024-04-15 18:10:02 +00:00
},
direct: true,
content() {
"step 0";
player
.chooseTarget(
get.prompt("clanhuanjia"),
"与一名其他角色拼点,赢的角色可以使用一张拼点牌。若此牌未造成过伤害,你获得另一张拼点牌,否则你失去一个技能",
(card, player, target) => {
return player.canCompare(target);
}
)
.set("ai", (target) => {
var player = _status.event.player;
if (get.attitude(player, target) <= 0) {
2024-04-15 18:31:36 +00:00
var hs = player.getCards("h").sort((a, b) => get.number(b) - get.number(a));
var ts = target.getCards("h").sort((a, b) => get.number(b) - get.number(a));
2024-04-15 18:10:02 +00:00
if (!hs.length || !ts.length) return 0;
if (
get.number(hs[0]) > get.number(ts[0]) &&
!get.tag(hs[0], "damage") &&
player.hasValueTarget(hs[0])
)
return 1;
return Math.random() - 0.4;
}
return 0;
});
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var target = result.targets[0];
event.target = target;
player.logSkill("clanhuanjia", target);
2023-03-31 11:34:38 +00:00
player.chooseToCompare(target);
2024-04-15 18:10:02 +00:00
} else event.finish();
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
if (!result.tie) {
var winner = result.bool ? player : target;
var cards = [];
game.getGlobalHistory("cardMove", (evt) => {
2024-04-15 18:31:36 +00:00
if (evt.getParent(3) == event) cards.addArray(evt.cards.filterInD("d"));
2023-03-31 11:34:38 +00:00
});
2024-04-15 18:10:02 +00:00
event.winner = winner;
if (cards.length) event.cards = cards;
2023-03-31 11:34:38 +00:00
else event.finish();
2024-04-15 18:10:02 +00:00
} else event.finish();
2024-04-15 18:31:36 +00:00
"step 3";
2024-04-15 18:10:02 +00:00
var cardsx = cards.filter(
2024-04-15 18:31:36 +00:00
(i) => get.position(i, true) == "d" && event.winner.hasUseTarget(i)
2024-04-15 18:10:02 +00:00
);
if (!cardsx.length) event.goto(6);
else
event.winner
2024-04-15 18:31:36 +00:00
.chooseButton(["缓颊:是否使用其中的一张牌?", cardsx])
2024-04-15 18:10:02 +00:00
.set("filterButton", (button) => {
2024-04-15 18:31:36 +00:00
return _status.event.player.hasUseTarget(button.link);
2024-04-15 18:10:02 +00:00
})
.set("ai", (button) => {
var damage = 1;
2024-04-15 18:31:36 +00:00
if (_status.event.att > 2 && get.tag(button.link, "damage")) damage *= 2;
return _status.event.player.getUseValue(button.link) * damage + 0.1;
2024-04-15 18:10:02 +00:00
})
.set("att", get.attitude(event.winner, player));
2024-04-15 18:31:36 +00:00
"step 4";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var card = result.links[0];
event.card = card;
2023-03-31 11:34:38 +00:00
event.cards.remove(card);
2024-04-15 18:10:02 +00:00
event.winner.$gain2(card, false);
2023-03-31 11:34:38 +00:00
game.delayx();
2024-04-15 18:10:02 +00:00
event.winner.chooseUseTarget(true, card, false);
2023-03-31 11:34:38 +00:00
}
2024-04-15 18:31:36 +00:00
"step 5";
2024-04-15 18:10:02 +00:00
if (
game.hasPlayer2((current) => {
return current.hasHistory(
"sourceDamage",
(evt) => evt.cards && evt.cards[0] == card
);
})
) {
2024-04-15 18:31:36 +00:00
var skills = player.getSkills(null, false, false).filter((skill) => {
var info = get.info(skill);
if (!info || get.is.empty(info) || info.charlotte) return false;
return true;
});
2024-04-15 18:10:02 +00:00
player
.chooseControl(skills)
.set(
"choiceList",
skills.map((i) => {
return (
'<div class="skill">【' +
get.translation(
2024-04-15 18:31:36 +00:00
lib.translate[i + "_ab"] || get.translation(i).slice(0, 2)
2024-04-15 18:10:02 +00:00
) +
"】</div><div>" +
get.skillInfoTranslation(i, player) +
"</div>"
);
})
)
.set("displayIndex", false)
.set("prompt", "恤民:失去一个技能")
.set("ai", () => {
var choices = _status.event.controls.slice();
var value = (skill) =>
2024-04-15 18:31:36 +00:00
get.skillRank(skill, "in") + get.skillRank(skill, "out");
choices = choices.map((skill) => [skill, value(skill)]);
var list = choices.sort((a, b) => a[1] - b[1])[0];
2024-04-15 18:10:02 +00:00
if (list[1] < 2) return list[0];
else {
2024-04-15 18:31:36 +00:00
if (_status.event.controls.includes("clanxumin")) return "clanxumin";
2024-04-15 18:10:02 +00:00
return list[0];
}
});
} else {
player.gain(cards, "gain2");
2023-03-31 11:34:38 +00:00
event.finish();
}
2024-04-15 18:31:36 +00:00
"step 6";
2024-02-14 10:54:30 +00:00
player.removeSkills(result.control);
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
ai: {
expose: 0.1,
},
2023-03-31 11:34:38 +00:00
},
2023-02-22 05:47:10 +00:00
//族荀谌
2024-04-15 18:10:02 +00:00
clansankuang: {
audio: 2,
trigger: { player: "useCardAfter" },
direct: true,
forced: true,
filter(event, player) {
2024-04-15 18:31:36 +00:00
if (!game.hasPlayer((current) => current != player)) return false;
2024-04-15 18:10:02 +00:00
const type = get.type2(event.card);
return (
player
2024-04-15 18:31:36 +00:00
.getRoundHistory("useCard", (evt) => get.type2(evt.card) == type)
2024-04-15 18:10:02 +00:00
.indexOf(event) == 0
);
},
getNum(player) {
return (
(player.countCards("ej") > 0) +
player.isDamaged() +
(Math.max(0, player.hp) < player.countCards("h"))
);
},
content() {
"step 0";
var cards = trigger.cards.filterInD("oe");
player
.chooseTarget(
"三恇:选择一名其他角色",
"令其交给你至少X张牌" +
2024-04-15 18:31:36 +00:00
(cards.length ? ",然后其获得" + get.translation(cards) : "") +
2024-04-15 18:10:02 +00:00
"X为以下条件中其满足的项数场上有牌、已受伤、体力值小于手牌数",
true,
lib.filter.notMe
)
.set("ai", (target) => {
var att = get.attitude(player, target),
num = lib.skill.clansankuang.getNum(target);
if (num == 0) return att;
if (_status.event.goon) return -att;
2024-04-15 18:31:36 +00:00
return -Math.sqrt(Math.abs(att)) - lib.skill.clansankuang.getNum(target);
2024-04-15 18:10:02 +00:00
})
.set(
"goon",
Math.max.apply(
Math,
trigger.cards.map((i) => get.value(i))
) <= 5 || trigger.cards.filterInD("oe").length == 0
);
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var target = result.targets[0],
num = lib.skill.clansankuang.getNum(target),
num2 = target.countCards("he");
event.target = target;
player.logSkill("clansankuang", target);
if (num2 == 0) event._result = { bool: false };
else if (num2 <= num)
event._result = {
bool: true,
cards: target.getCards("he"),
};
else {
var cards = trigger.cards.filterInD("oe");
target
.chooseCard("he", num > 0, [num, Infinity])
.set("ai", get.unuseful)
.set(
"prompt",
num > 0
? "是否交给" +
get.translation(player) +
"任意张牌" +
2024-04-15 18:31:36 +00:00
(cards.length ? "并获得" + get.translation(cards) : "") +
2024-04-15 18:10:02 +00:00
""
: "交给" +
get.translation(player) +
"至少" +
get.cnNumber(num) +
"张牌"
);
2023-08-22 08:31:34 +00:00
}
2024-04-15 18:10:02 +00:00
} else event.finish();
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var cards = result.cards;
target.give(cards, player);
2023-02-22 05:47:10 +00:00
game.delayx();
2024-04-15 18:10:02 +00:00
} else event.finish();
2024-04-15 18:31:36 +00:00
"step 3";
2024-04-15 18:10:02 +00:00
if (trigger.cards.filterInD().length)
2024-04-15 18:31:36 +00:00
target.gain(trigger.cards.filterInD(), "gain2", "bySelf");
2024-04-15 18:10:02 +00:00
else if (trigger.cards.filterInD("e").length)
target.gain(
trigger.cards.filterInD("e"),
get.owner(trigger.cards.filterInD("e")[0]),
"give"
);
},
ai: {
reverseOrder: true,
skillTagFilter(player) {
2024-04-15 18:31:36 +00:00
if (player.getHistory("useCard", (evt) => get.type(evt.card) == "equip").length > 0)
2024-04-15 18:10:02 +00:00
return false;
2023-02-22 05:47:10 +00:00
},
2024-04-15 18:10:02 +00:00
effect: {
target(card, player, target) {
if (
player == target &&
get.type(card) == "equip" &&
2024-04-15 18:31:36 +00:00
!player.getHistory("useCard", (evt) => get.type(evt.card) == "equip")
.length == 0
2024-04-15 18:10:02 +00:00
)
return [1, 3];
2023-02-22 05:47:10 +00:00
},
},
2024-04-15 18:10:02 +00:00
threaten: 1.6,
2023-02-22 05:47:10 +00:00
},
},
2024-04-15 18:10:02 +00:00
clanbeishi: {
audio: 2,
trigger: {
global: [
"loseAfter",
"equipAfter",
"addJudgeAfter",
"gainAfter",
"loseAsyncAfter",
"addToExpansionAfter",
],
},
forced: true,
filter(event, player) {
2024-04-15 18:31:36 +00:00
var history = player.getAllHistory("useSkill", (evt) => evt.skill == "clansankuang");
2024-04-15 18:10:02 +00:00
if (!history.length) return false;
var target = history[0].targets[0];
if (target.countCards("h")) return false;
var evt = event.getl(target);
return evt && evt.hs && evt.hs.length;
},
content() {
2023-02-22 05:47:10 +00:00
player.recover();
2024-04-14 15:27:22 +00:00
},
2024-04-15 18:10:02 +00:00
ai: {
combo: "clansankuang",
},
2023-02-22 05:47:10 +00:00
},
//族荀淑
2024-04-15 18:10:02 +00:00
clanshenjun: {
audio: 2,
trigger: {
global: "useCard",
},
forced: true,
locked: false,
filter(event, player) {
return (
2024-04-15 18:31:36 +00:00
(event.card.name == "sha" || get.type(event.card) == "trick") &&
2024-04-15 18:10:02 +00:00
player.countCards("h", event.card.name) > 0
);
},
content() {
var cards = player.getCards("h", trigger.card.name);
2024-04-15 18:31:36 +00:00
player.showCards(cards, get.translation(player) + "发动了【神君】");
2024-04-15 18:10:02 +00:00
player.markSkill("clanshenjun");
player.addGaintag(cards, "clanshenjun");
for (var name of lib.phaseName) {
var evt = _status.event.getParent(name);
if (!evt || evt.name != name) continue;
2024-04-15 18:31:36 +00:00
player.addTempSkill("clanshenjun_viewAs", name + "After");
2023-02-22 05:47:10 +00:00
break;
}
},
2024-04-15 18:10:02 +00:00
marktext: "君",
intro: {
markcount(storage, player) {
2024-04-15 18:31:36 +00:00
return player.countCards("h", (card) => card.hasGaintag("clanshenjun"));
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
},
2024-04-15 18:10:02 +00:00
mark(dialog, content, player) {
2024-04-15 18:31:36 +00:00
var cards = player.getCards("h", (card) => card.hasGaintag("clanshenjun"));
2024-04-15 18:10:02 +00:00
if (cards.length) {
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
dialog.addAuto(cards);
2024-04-15 18:10:02 +00:00
} else return "无展示牌";
v1.9.122.3 (#146) * change lib.init.parsex, Enable 'step' to be used through nesting * Fixed an issue where nonstandard statement 'step 0' before standard statement 'step 0' would cause an error * zhangshiping; tw_madai bug fix * modify all the skills with incorrect "locked" tag * Change the game.exit function to restart the app for WKWebview users using ios. And added the macintosh field to the judgment of lib.device * various bug fix * Revert "various bug fix" This reverts commit ca7a363172a837af9244fca300d6a008cafc03ac. * various bug fix * some sudio * unlock zhenghun, fix sbdiaochan * add and adjust some audio, fix some bugs * add trigger "useSkill" and "logSkillBegin" * brand new wuxie * Update standard.js * update 武安国 * iriya! * Add character lushi; fix clansankuang * add 魏关羽/涛神,unlock 关宁/向朗/谋孙策/谋大乔/谋刘表,add related audio * fix: adjust the edit box style to fix the text overflow problem 🐛 * fix 修文 and some other small bugs * 伊莉雅·罗日杰斯特文斯卡娅 * Fix the issue of "game.getDB" and "game. deleteDB" reporting errors without "lib.db" * Some browsers do not support "autoplay", so "onconplay" listening has been added * sunwukong * more zooms * unlock 周善, modify 卢氏/卞喜/刘虞/黄祖/李采薇/张翼/笮融/孙寒华/TW董昭, fix some bug, add omitted audio * change the number of 如意金箍棒 to 9 instead of 5; fix 夏侯尚's bug; add audio for sunwukong & donghailongwang * Add the default accept value of '*/*' to the HTML selection file label * longwang * add&modify some audio * add 族王凌/界SP黄月英/界张松/武诸葛亮,fix 晖云's bug; resolve conflicts, bring 武诸葛 up to date, fix 龙王's bug * add 阮籍, add a skillTag in "jiu2" named jiuSustain for ruanji * add some audio, sort some characters in sp * sync 界SP黄月英 * add some character intros * make 谋弈 play audio correctly * revert some skills back to new ones * v1.9.122.3 * Update update.js --------- Co-authored-by: shijian <2954700422@qq.com> Co-authored-by: copcap <copcap@outlook.com> Co-authored-by: copcap <43802486+copcap@users.noreply.github.com> Co-authored-by: PBK-B <pbk-b@PBK6.cn>
2023-06-30 15:06:19 +00:00
},
},
2024-04-15 18:10:02 +00:00
subSkill: {
viewAs: {
trigger: {
global: [
"phaseZhunbeiEnd",
"phaseJudgeEnd",
"phaseDrawEnd",
"phaseUseEnd",
"phaseDiscardEnd",
"phaseJieshuEnd",
],
2023-02-22 05:47:10 +00:00
},
2024-04-15 18:10:02 +00:00
filter(event, player) {
2024-04-15 18:31:36 +00:00
return player.countCards("h", (card) => card.hasGaintag("clanshenjun")) > 0;
2024-04-15 18:10:02 +00:00
},
forced: true,
charlotte: true,
content() {
"step 0";
2024-04-15 18:31:36 +00:00
var cards = player.getCards("h", (card) => card.hasGaintag("clanshenjun"));
2024-04-15 18:10:02 +00:00
var list = [],
names = [];
for (var card of cards) {
var name = get.name(card),
nature = get.nature(card);
var namex = name;
if (nature && nature.length) {
namex += nature;
if (names.includes(namex)) continue;
2024-04-15 18:31:36 +00:00
list.push([get.type(card), "", name, nature]);
2024-04-15 18:10:02 +00:00
} else {
if (names.includes(namex)) continue;
list.push([get.type(card), "", name]);
2023-10-05 05:47:48 +00:00
}
2023-02-22 05:47:10 +00:00
names.push(namex);
}
2024-04-15 18:10:02 +00:00
list.sort((a, b) => {
2024-04-15 18:31:36 +00:00
var del1 = lib.inpile.indexOf(a[2]) - lib.inpile.indexOf(b[2]);
2024-04-15 18:10:02 +00:00
if (del1 != 0) return del1;
var a1 = 0,
b1 = 0;
if (a.length > 3) a1 = lib.nature.get(a) || 0;
if (b.length > 3) b1 = lib.nature.get(b) || 0;
return a1 - b1;
2023-02-22 05:47:10 +00:00
});
2024-04-15 18:10:02 +00:00
player
.chooseButton([
2024-04-15 18:31:36 +00:00
"是否将" + get.cnNumber(cards.length) + "张牌当下列一张牌使用?",
2024-04-15 18:10:02 +00:00
[list, "vcard"],
])
.set("ai", function (button) {
return _status.event.player.getUseValue({
name: button.link[2],
nature: button.link[3],
});
});
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var name = result.links[0][2],
nature = result.links[0][3];
2024-04-15 18:31:36 +00:00
var cards = player.getCards("h", (card) => card.hasGaintag("clanshenjun"));
2024-04-15 18:10:02 +00:00
game.broadcastAll(
function (num, card) {
2024-04-15 18:31:36 +00:00
lib.skill.clanshenjun_backup.selectCard = num;
lib.skill.clanshenjun_backup.viewAs = card;
2024-04-15 18:10:02 +00:00
},
cards.length,
{ name: name, nature: nature }
);
var next = player.chooseToUse();
next.set(
"openskilldialog",
"将" +
get.cnNumber(cards.length) +
"张牌当做" +
(get.translation(nature) || "") +
"【" +
get.translation(name) +
"】使用"
);
next.set("norestore", true);
next.set("addCount", false);
next.set("_backupevent", "clanshenjun_backup");
next.set("custom", {
add: {},
replace: { window() {} },
2023-02-22 05:47:10 +00:00
});
2024-04-15 18:10:02 +00:00
next.backup("clanshenjun_backup");
2023-02-22 05:47:10 +00:00
}
2024-04-15 18:10:02 +00:00
},
2023-02-22 05:47:10 +00:00
},
2024-04-15 18:10:02 +00:00
backup: {
filterCard(card) {
return get.itemtype(card) == "card";
2023-02-22 05:47:10 +00:00
},
2024-04-15 18:10:02 +00:00
position: "hes",
filterTarget: lib.filter.filterTarget,
check: (card) => 6 - get.value(card),
log: false,
precontent() {
2023-02-22 05:47:10 +00:00
delete event.result.skill;
},
2024-04-15 18:10:02 +00:00
},
},
2023-02-22 05:47:10 +00:00
},
2024-04-15 18:10:02 +00:00
clanbalong: {
audio: 2,
trigger: {
player: ["damageEnd", "recoverEnd", "loseHpEnd"],
},
forced: true,
filter(event, player) {
2024-04-15 18:31:36 +00:00
if (game.getGlobalHistory("changeHp", (evt) => evt.player == player).length != 1)
2024-04-15 18:10:02 +00:00
return false;
var cards = player.getCards("h"),
map = {};
if (!cards.length) return false;
for (var card of cards) {
var type = get.type2(card);
if (typeof map[type] != "number") map[type] = 0;
2023-02-22 05:47:10 +00:00
map[type]++;
}
2024-04-15 18:10:02 +00:00
var list = [];
for (var i in map) {
if (map[i] > 0) list.push([i, map[i]]);
2023-02-22 05:47:10 +00:00
}
2024-04-15 18:10:02 +00:00
list.sort((a, b) => b[1] - a[1]);
2024-04-15 18:31:36 +00:00
return list[0][0] == "trick" && (list.length == 1 || list[0][1] > list[1][1]);
2024-04-15 18:10:02 +00:00
},
content() {
2024-04-15 18:31:36 +00:00
player.showHandcards(get.translation(player) + "发动了【八龙】");
2023-02-22 05:47:10 +00:00
player.drawTo(game.countPlayer());
2024-04-15 18:10:02 +00:00
},
2023-02-22 05:47:10 +00:00
},
//族荀粲
2024-04-15 18:10:02 +00:00
clanyunshen: {
audio: 2,
enable: "phaseUse",
usable: 1,
filterTarget(card, player, target) {
return player != target && target.isDamaged();
},
content() {
"step 0";
2023-02-22 05:47:10 +00:00
target.recover();
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
var name = get.translation(target);
player
.chooseControl()
.set("choiceList", [
name + "视为对你使用一张冰【杀】",
"你视为对" + name + "使用一张冰【杀】",
])
.set("prompt", "熨身:请选择一项")
.set("ai", () => _status.event.choice)
.set(
"choice",
(function () {
var card = {
name: "sha",
nature: "ice",
isCard: true,
};
2024-04-15 18:31:36 +00:00
var eff = get.effect(player, card, target, player),
eff2 = get.effect(target, card, player, player);
2024-04-15 18:10:02 +00:00
if (eff > eff2) return "选项一";
else return "选项二";
})()
);
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
var players = [target, player];
if (result.control == "选项二") players.reverse();
var card = { name: "sha", nature: "ice", isCard: true };
if (players[0].canUse(card, players[1], false))
players[0].useCard(card, players[1], false, "noai");
},
ai: {
order: 2,
expose: 0.2,
result: {
target(player, target) {
var eff = get.recoverEffect(target, player, player);
if (eff > 0) return 1;
else if (
get.effect(
target,
{
name: "sha",
nature: "ice",
isCard: true,
},
player,
player
) > eff
)
return -1;
2023-02-22 05:47:10 +00:00
return 0;
2024-04-15 18:10:02 +00:00
},
},
},
2023-02-22 05:47:10 +00:00
},
2024-04-15 18:10:02 +00:00
clanshangshen: {
audio: 2,
trigger: { global: "damageEnd" },
filter(event, player) {
2024-04-15 18:31:36 +00:00
if (!event.hasNature() || !event.player.isIn()) return false;
2024-04-15 18:10:02 +00:00
return (
game.countPlayer2((current) => {
return current.hasHistory("damage", (evt) => {
return evt.hasNature() && evt != event;
});
}) == 0
);
2023-02-22 05:47:10 +00:00
},
2024-04-15 18:10:02 +00:00
logTarget: "player",
check(event, player) {
if (get.attitude(player, event.player) <= 2) return false;
if (event.player.countCards("h") >= 4) return false;
2023-02-22 05:47:10 +00:00
return true;
},
2024-04-15 18:10:02 +00:00
content() {
player.executeDelayCardEffect("shandian");
2023-02-22 05:47:10 +00:00
trigger.player.drawTo(4);
},
2024-04-15 18:10:02 +00:00
ai: { expose: 0.25 },
2023-02-22 05:47:10 +00:00
},
2024-04-15 18:10:02 +00:00
clanfenchai: {
audio: 2,
init(player) {
if (player.getStorage("clanfenchai").length > 0) return;
var history = player.getHistory("useSkill", (evt) => {
if (evt.type != "player") return false;
var skill = evt.sourceSkill || evt.skill,
targets = evt.targets;
var info = get.info(skill);
if (!info || info.charlotte) return false;
if (targets && targets.length) {
2024-04-15 18:31:36 +00:00
if (targets.filter((i) => player.differentSexFrom(i)).length > 0) return true;
2023-02-22 05:47:10 +00:00
}
return false;
});
2024-04-15 18:10:02 +00:00
if (history.length) {
var evt = history[0],
targets = evt.targets;
player.markAuto(
"clanfenchai",
targets.filter((i) => player.differentSexFrom(i))
);
2023-02-22 05:47:10 +00:00
}
},
2024-04-15 18:10:02 +00:00
trigger: {
player: ["logSkill", "useSkillAfter"],
},
forced: true,
silent: true,
onremove: true,
marktext: "钗",
intro: {
2024-04-15 18:31:36 +00:00
content: (storage, player) => "对象:" + get.translation(storage),
2024-04-15 18:10:02 +00:00
},
group: "clanfenchai_audio",
filter(event, player) {
if (event.type != "player") return false;
var targets = event.targets;
if (!targets || !targets.length) return false;
var info = get.info(event.sourceSkill || event.skill);
if (!info || info.charlotte) return false;
2024-04-15 18:31:36 +00:00
if (player.getStorage("clanfenchai").length != 0) return false;
return targets.filter((i) => player.differentSexFrom(i)).length > 0;
2024-04-15 18:10:02 +00:00
},
content() {
player.markAuto(
"clanfenchai",
2024-04-15 18:31:36 +00:00
trigger.targets.filter((i) => player.differentSexFrom(i))
2024-04-15 18:10:02 +00:00
);
},
subSkill: {
audio: {
audio: "clanfenchai",
forced: true,
trigger: { player: "judge" },
filter(event, player) {
return player.getStorage("clanfenchai").length;
2023-03-04 15:17:30 +00:00
},
2024-04-15 18:10:02 +00:00
content() {},
},
},
mod: {
suit(card, suit) {
var player = get.owner(card) || _status.event.player;
2024-04-15 18:31:36 +00:00
if (!player || !player.judging || player.judging[0] != card) return;
2024-04-15 18:10:02 +00:00
var storage = player.getStorage("clanfenchai");
if (!storage.length) return;
2024-04-15 18:31:36 +00:00
return storage.filter((i) => i.isIn()).length > 0 ? "heart" : "spade";
2024-04-15 18:10:02 +00:00
},
2023-02-22 05:47:10 +00:00
},
},
//族荀采
2024-04-15 18:10:02 +00:00
clanlieshi: {
audio: 2,
enable: "phaseUse",
filter(event, player) {
return (
!player.isDisabledJudge() ||
2024-04-15 18:31:36 +00:00
player.countCards("h", (card) => ["sha", "shan"].includes(get.name(card))) > 0
2024-04-15 18:10:02 +00:00
);
},
chooseButton: {
dialog(event, player) {
2024-04-15 18:31:36 +00:00
var dialog = ui.create.dialog("烈誓:选择一项", "hidden");
dialog.add([lib.skill.clanlieshi.choices.slice(), "textbutton"]);
2023-02-22 05:47:10 +00:00
return dialog;
},
2024-04-15 18:10:02 +00:00
filter(button, player) {
var link = button.link;
if (link == "damage") return !player.isDisabledJudge();
var num = player.countCards("h", link);
return (
num > 0 &&
num ==
2024-04-15 18:31:36 +00:00
player.getDiscardableCards(player, "h").filter((i) => get.name(i) == link)
.length
2024-04-15 18:10:02 +00:00
);
2023-02-22 05:47:10 +00:00
},
2024-04-15 18:10:02 +00:00
check(button) {
var player = _status.event.player;
switch (button.link) {
case "damage":
2024-04-15 18:31:36 +00:00
if (get.damageEffect(player, player, player, "fire") >= 0) return 10;
2024-04-15 18:10:02 +00:00
if (
2024-04-15 18:31:36 +00:00
player.hp >= Math.max(2, 3 - player.getFriends().length) &&
2024-04-15 18:10:02 +00:00
game.countPlayer(
(current) =>
get.attitude(player, current) < 0 &&
current.countCards("h", (card) =>
2024-04-15 18:31:36 +00:00
["sha", "shan"].includes(get.name(card))
2024-04-15 18:10:02 +00:00
)
)
)
return 0.8 + Math.random();
2023-02-22 05:47:10 +00:00
return 0;
2024-04-15 18:10:02 +00:00
case "shan":
2024-04-15 18:31:36 +00:00
if (player.countCards("h", "shan") == 1) return 8 + Math.random();
2024-04-15 18:10:02 +00:00
return 1 + Math.random();
case "sha":
2024-04-15 18:31:36 +00:00
if (player.countCards("h", "sha") == 1) return 8 + Math.random();
2024-04-15 18:10:02 +00:00
return 0.9 + Math.random();
2023-02-22 05:47:10 +00:00
}
},
2024-04-15 18:10:02 +00:00
backup(links) {
var next = get.copy(lib.skill["clanlieshi_backupx"]);
next.choice = links[0];
2023-02-22 05:47:10 +00:00
return next;
},
2024-04-15 18:10:02 +00:00
prompt(links) {
2024-04-15 18:31:36 +00:00
if (links[0] == "damage") return "废除判定区并受到1点火焰伤害";
2024-04-15 18:10:02 +00:00
return "弃置所有【" + get.translation(links[0]) + "】";
2023-02-22 05:47:10 +00:00
},
},
2024-04-15 18:10:02 +00:00
choices: [
["damage", "废除判定区并受到1点火焰伤害"],
["shan", "弃置所有【闪】"],
["sha", "弃置所有【杀】"],
2023-02-22 05:47:10 +00:00
],
2024-04-15 18:10:02 +00:00
ai: {
order(item, player) {
if (!player) return;
2024-04-15 18:31:36 +00:00
var eff = get.damageEffect(player, player, player, "fire"),
2024-04-15 18:10:02 +00:00
disabled = !player.isDisabledJudge();
if (
2024-04-15 18:31:36 +00:00
(player.countCards("h", "sha") == 1 || player.countCards("h", "shan") == 1) &&
2024-04-15 18:10:02 +00:00
eff < 0 &&
!disabled
)
return 8;
else if (eff >= 0 && !disabled) return 5.8;
if (
!disabled &&
2024-04-15 18:31:36 +00:00
!player.countCards("h", (card) => ["sha", "shan"].includes(get.name(card)))
2024-04-15 18:10:02 +00:00
) {
if (
2024-04-15 18:31:36 +00:00
(!player.hasSkill("clanhuanyin") || !player.canSave(player)) &&
2024-04-15 18:10:02 +00:00
player.hp <= 1
)
return 0;
2024-04-15 18:31:36 +00:00
if (player.canSave(player) && player.hp == 1 && player.countCards("h") <= 1)
2024-04-15 18:10:02 +00:00
return 2.6;
if (
2024-04-15 18:31:36 +00:00
player.hp < Math.max(2, 3 - player.getFriends().length) ||
2024-04-15 18:10:02 +00:00
!game.countPlayer(
(current) =>
get.attitude(player, current) < 0 &&
current.countCards("h", (card) =>
2024-04-15 18:31:36 +00:00
["sha", "shan"].includes(get.name(card))
2024-04-15 18:10:02 +00:00
)
)
)
return 0;
2023-02-22 05:47:10 +00:00
}
return 2.5;
},
2024-04-15 18:10:02 +00:00
expose: 0.2,
result: { player: 1 },
},
subSkill: {
backup: {},
backupx: {
audio: "clanlieshi",
selectCard: -1,
selectTarget: -1,
filterCard: () => false,
filterTarget: () => false,
multitarget: true,
content() {
"step 0";
var choice = lib.skill.clanlieshi_backup.choice;
event.choice = choice;
if (choice == "damage") {
player.damage("fire");
2024-04-15 18:31:36 +00:00
if (!player.isDisabledJudge()) player.disableJudge();
2024-04-15 18:10:02 +00:00
} else {
var cards = player.getCards("h", choice);
if (cards.length) player.discard(cards);
2023-02-22 05:47:10 +00:00
}
2024-04-15 18:31:36 +00:00
"step 1";
if (!player.isIn() || !game.hasPlayer((current) => current != player))
2024-04-15 18:10:02 +00:00
event.finish();
else
player
2024-04-15 18:31:36 +00:00
.chooseTarget("烈誓:令一名其他角色选择另一项", lib.filter.notMe, true)
2024-04-15 18:10:02 +00:00
.set("ai", (target) => {
var player = _status.event.player,
2024-04-15 18:31:36 +00:00
chosen = _status.event.getParent().choice,
2024-04-15 18:10:02 +00:00
att = get.attitude(player, target);
if (chosen == "damage") {
if (att > 0) return 0;
return (
-att / 2 +
target.countCards("h", (card) =>
2024-04-15 18:31:36 +00:00
["sha", "shan"].includes(get.name(card))
2024-04-15 18:10:02 +00:00
)
);
}
2024-04-15 18:31:36 +00:00
return get.damageEffect(target, player, player, "fire");
2024-04-15 18:10:02 +00:00
});
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var target = result.targets[0];
event.target = target;
player.line(target, "fire");
var list = [],
choice = event.choice;
2024-04-15 18:31:36 +00:00
var choiceList = lib.skill.clanlieshi.choices.slice();
choiceList = choiceList.map((link, ind, arr) => {
link = link[1];
var ok = true;
if (arr[ind][0] == choice) {
link += "" + get.translation(player) + "已选)";
ok = false;
2023-02-22 05:47:10 +00:00
}
2024-04-15 18:31:36 +00:00
if (ind == 0) {
if (target.isDisabledJudge()) ok = false;
} else if (ind > 0) {
var name = ind == 1 ? "shan" : "sha";
if (!target.countCards("h", name)) ok = false;
}
if (!ok) link = '<span style="opacity:0.5">' + link + "</span>";
else list.push("选项" + get.cnNumber(ind + 1, true));
return link;
});
2024-04-15 18:10:02 +00:00
if (!list.length) {
2023-10-15 11:03:28 +00:00
game.log(target, "没有能执行的选项");
event.finish();
return;
}
2024-04-15 18:10:02 +00:00
target
.chooseControl(list)
.set("choiceList", choiceList)
.set("ai", () => {
2024-04-15 18:31:36 +00:00
var controls = _status.event.controls.slice(),
2024-04-15 18:10:02 +00:00
player = _status.event.player,
2024-04-15 18:31:36 +00:00
user = _status.event.getParent().player;
if (controls.length == 1) return controls[0];
2024-04-15 18:10:02 +00:00
if (
controls.includes("选项一") &&
2024-04-15 18:31:36 +00:00
get.damageEffect(player, user, player, "fire") >= 0
2024-04-15 18:10:02 +00:00
)
return "选项一";
if (
controls.includes("选项一") &&
player.hp <= 2 &&
player.countCards("h", (card) =>
2024-04-15 18:31:36 +00:00
["sha", "shan"].includes(get.name(card))
2024-04-15 18:10:02 +00:00
) <= 3
)
controls.remove("选项一");
2024-04-15 18:31:36 +00:00
if (controls.length == 1) return controls[0];
2024-04-15 18:10:02 +00:00
if (
player
.getCards("h", "sha")
2024-04-15 18:31:36 +00:00
.reduce((p, c) => p + get.value(c, player), 0) >
2024-04-15 18:10:02 +00:00
player
.getCards("h", "sha")
2024-04-15 18:31:36 +00:00
.reduce((p, c) => p + get.value(c, player), 0)
2024-04-15 18:10:02 +00:00
) {
2024-04-15 18:31:36 +00:00
if (controls.includes("选项三")) return "选项三";
} else if (controls.includes("选项二")) return "选项二";
2024-04-15 18:10:02 +00:00
return controls.randomGet();
});
2023-02-22 05:47:10 +00:00
} else event.finish();
2024-04-15 18:31:36 +00:00
"step 3";
2024-04-15 18:10:02 +00:00
if (result.control == "选项一") {
2024-04-15 18:31:36 +00:00
if (!target.isDisabledJudge()) target.disableJudge();
2024-04-15 18:10:02 +00:00
target.damage("fire");
} else {
2024-04-15 18:31:36 +00:00
var cards = target.getCards("h", result.control == "选项二" ? "shan" : "sha");
2024-04-15 18:10:02 +00:00
if (cards.length) target.discard(cards);
2023-02-22 05:47:10 +00:00
}
2024-04-15 18:10:02 +00:00
},
},
},
2023-02-22 05:47:10 +00:00
},
2024-04-15 18:10:02 +00:00
clandianzhan: {
audio: 2,
intro: {
content: "已使用过的花色:$",
onunmark: true,
},
trigger: { player: "useCardAfter" },
forced: true,
filter(event, player) {
if (!lib.suit.includes(get.suit(event.card))) return false;
const suit = get.suit(event.card);
if (
player
2024-04-15 18:31:36 +00:00
.getRoundHistory("useCard", (evt) => get.suit(evt.card) == suit)
2024-04-15 18:10:02 +00:00
.indexOf(event) != 0
)
return false;
return (
2024-04-15 18:31:36 +00:00
(event.targets && event.targets.length == 1 && !event.targets[0].isLinked()) ||
2024-04-15 18:10:02 +00:00
player.hasCard(
2024-04-15 18:31:36 +00:00
(card) => get.suit(card) == get.suit(event.card) && player.canRecast(card),
2024-04-15 18:10:02 +00:00
"h"
)
);
},
content() {
"step 0";
2024-04-15 18:31:36 +00:00
if (trigger.targets && trigger.targets.length == 1 && !trigger.targets[0].isLinked()) {
2023-02-22 05:47:10 +00:00
trigger.targets[0].link(true);
2024-04-15 18:10:02 +00:00
event.link = true;
2023-02-22 05:47:10 +00:00
}
2024-04-15 18:10:02 +00:00
var cards = player.getCards(
"h",
2024-04-15 18:31:36 +00:00
(card) => get.suit(card) == get.suit(trigger.card) && player.canRecast(card)
2024-04-15 18:10:02 +00:00
);
if (cards.length > 0) {
player.recast(cards);
2024-04-15 18:10:02 +00:00
event.recast = true;
}
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (event.link && event.recast) player.draw();
},
group: "clandianzhan_count",
subSkill: {
count: {
charlotte: true,
trigger: { player: "useCardAfter" },
filter(event, player) {
let suit = get.suit(event.card);
return (
2024-04-15 18:31:36 +00:00
lib.suits.includes(suit) && !player.getStorage("clandianzhan").includes(suit)
2024-04-15 18:10:02 +00:00
);
},
2024-04-15 18:10:02 +00:00
forced: true,
silent: true,
content() {
let suits = player
.getRoundHistory("useCard", (evt) => {
2024-04-15 18:31:36 +00:00
return lib.suits.includes(get.suit(evt.card));
2024-04-15 18:10:02 +00:00
})
.reduce((list, evt) => {
return list.add(get.suit(evt.card));
}, [])
2024-04-15 18:31:36 +00:00
.sort((a, b) => lib.suits.indexOf(a) - lib.suits.indexOf(b));
2024-04-15 18:10:02 +00:00
if (!player.storage.clandianzhan) {
2024-04-15 18:31:36 +00:00
player.when({ global: "roundStart" }).then(() => {
delete player.storage.clandianzhan;
player.unmarkSkill("clandianzhan");
});
}
2024-04-15 18:10:02 +00:00
player.storage.clandianzhan = suits;
player.markSkill("clandianzhan");
},
},
},
2024-04-15 18:10:02 +00:00
init(player) {
let suits = player
.getRoundHistory("useCard", (evt) => {
return lib.suits.includes(get.suit(evt.card));
})
.reduce((list, evt) => {
return list.add(get.suit(evt.card));
}, [])
2024-04-15 18:31:36 +00:00
.sort((a, b) => lib.suits.indexOf(a) - lib.suits.indexOf(b));
2024-04-15 18:10:02 +00:00
if (suits.length) {
if (!player.storage.clandianzhan) {
player.when({ global: "roundStart" }).then(() => {
delete player.storage.clandianzhan;
2024-04-15 18:10:02 +00:00
player.unmarkSkill("clandianzhan");
});
}
2024-04-15 18:10:02 +00:00
player.storage.clandianzhan = suits;
player.markSkill("clandianzhan");
}
2024-04-15 18:10:02 +00:00
},
2023-02-22 05:47:10 +00:00
},
2024-04-15 18:10:02 +00:00
clanhuanyin: {
audio: 2,
trigger: { player: "dying" },
forced: true,
check: () => true,
filter(event) {
return event.player.countCards("h") < 4;
},
content() {
2023-02-22 05:47:10 +00:00
player.drawTo(4);
2024-04-15 18:10:02 +00:00
},
2023-02-22 05:47:10 +00:00
},
2024-04-15 18:10:02 +00:00
clandaojie: {
audio: 2,
2024-04-15 18:31:36 +00:00
audioname: ["clan_xunshu", "clan_xunchen", "clan_xuncai", "clan_xuncan", "clan_xunyou"],
2024-04-15 18:10:02 +00:00
trigger: { player: "useCardAfter" },
filter(event, player) {
return (
get.type(event.card, null, false) == "trick" &&
!get.tag(event.card, "damage") &&
event.cards.filterInD().length > 0 &&
player
.getHistory("useCard", (evt) => {
return (
2024-04-15 18:31:36 +00:00
get.type(evt.card, null, false) == "trick" && !get.tag(evt.card, "damage")
2024-04-15 18:10:02 +00:00
);
})
.indexOf(event) == 0
);
},
forced: true,
clanSkill: true,
content() {
"step 0";
2024-04-15 18:31:36 +00:00
var skills = player.getSkills(null, false, false).filter((skill) => {
var info = get.info(skill);
if (
!info ||
info.charlotte ||
!get.is.locked(skill) ||
get.skillInfoTranslation(skill, player).length == 0
)
return false;
return true;
});
2024-04-15 18:10:02 +00:00
player
.chooseControl(skills, "cancel2")
.set(
"choiceList",
skills.map((i) => {
return (
'<div class="skill">【' +
get.translation(
2024-04-15 18:31:36 +00:00
lib.translate[i + "_ab"] || get.translation(i).slice(0, 2)
2024-04-15 18:10:02 +00:00
) +
"】</div><div>" +
get.skillInfoTranslation(i, player) +
"</div>"
);
})
)
.set("displayIndex", false)
2024-04-15 18:31:36 +00:00
.set("prompt", "蹈节失去一个锁定技或点“取消”失去1点体力")
2024-04-15 18:10:02 +00:00
.set("ai", () => {
var player = _status.event.player,
choices = _status.event.controls.slice();
var negs = choices.filter((i) => {
var info = get.info(i);
if (!info || !info.ai) return false;
return info.ai.neg || info.ai.halfneg;
});
if (negs.length) return negs.randomGet();
2024-04-15 18:31:36 +00:00
if (get.effect(player, { name: "losehp" }, player, player) >= 0) return "cancel2";
2024-04-15 18:10:02 +00:00
if (player.hp > 3) return "cancel2";
2024-04-15 18:31:36 +00:00
return Math.random() < 0.75 ? "clandaojie" : choices.randomGet();
2024-04-15 18:10:02 +00:00
});
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.control != "cancel2") {
2024-02-14 10:54:30 +00:00
player.removeSkills(result.control);
2024-04-15 18:10:02 +00:00
} else {
2023-02-22 05:47:10 +00:00
player.loseHp();
}
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
var targets = game.filterPlayer(
2024-04-15 18:31:36 +00:00
(current) => current == player || current.hasClan("颍川荀氏")
2024-04-15 18:10:02 +00:00
);
2024-04-15 18:31:36 +00:00
if (targets.length == 1) event._result = { bool: true, targets: targets };
2024-04-15 18:10:02 +00:00
else
player
.chooseTarget(
"蹈节:将" +
get.translation(trigger.cards.filterInD()) +
"交给一名颍川荀氏角色",
true,
(card, player, target) => {
2024-04-15 18:31:36 +00:00
return target == player || target.hasClan("颍川荀氏");
2024-04-15 18:10:02 +00:00
}
)
2024-04-15 18:31:36 +00:00
.set("ai", (target) => get.attitude(_status.event.player, target));
"step 3";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var target = result.targets[0];
player.line(target, "green");
target.gain(trigger.cards.filterInD(), player, "gain2");
2023-02-22 05:47:10 +00:00
}
},
},
2023-01-24 13:26:41 +00:00
//族吴班
2024-04-15 18:10:02 +00:00
clanzhanding: {
audio: 2,
enable: "chooseToUse",
viewAsFilter(player) {
return player.countCards("hes") > 0;
},
viewAs: { name: "sha" },
filterCard: true,
position: "hes",
selectCard: [1, Infinity],
check(card) {
return 6 - ui.selected.cards.length - get.value(card);
},
onuse(links, player) {
lib.skill.chenliuwushi.change(player, -1);
player.addTempSkill("clanzhanding_effect");
},
ai: {
order: 1,
respondSha: true,
skillTagFilter(player) {
return player.countCards("hes") > 0;
2023-01-24 13:26:41 +00:00
},
},
2024-04-15 18:10:02 +00:00
subSkill: {
effect: {
trigger: { player: "useCardAfter" },
forced: true,
popup: false,
filter(event, player) {
return event.skill == "clanzhanding";
2023-01-24 13:26:41 +00:00
},
2024-04-15 18:10:02 +00:00
content() {
if (
2024-04-15 18:31:36 +00:00
player.hasHistory("sourceDamage", function (evt) {
return evt.card == trigger.card;
})
2024-04-15 18:10:02 +00:00
) {
var num1 = player.countCards("h"),
num2 = player.getHandcardLimit();
2024-04-15 18:31:36 +00:00
if (num1 < num2) player.draw(Math.min(5, num2 - num1));
2024-04-15 18:10:02 +00:00
} else if (trigger.addCount !== false) {
trigger.addCount = false;
2023-01-24 13:26:41 +00:00
player.getStat().card.sha--;
}
},
},
},
},
//族吴苋
2024-04-15 18:10:02 +00:00
clanyirong: {
audio: 2,
enable: "phaseUse",
usable: 2,
filter(event, player) {
var num1 = player.countCards("h"),
num2 = player.getHandcardLimit();
return num1 != num2;
},
selectCard() {
var player = _status.event.player;
var num1 = player.countCards("h"),
num2 = player.getHandcardLimit();
if (num1 > num2) return num1 - num2;
return [0, 1];
},
filterCard(card, player) {
var num1 = player.countCards("h"),
num2 = player.getHandcardLimit();
return num1 > num2;
},
check(card) {
var player = _status.event.player;
if (
player.countCards("h", function (card) {
return lib.skill.clanyirong.checkx(card) > 0;
}) +
1 <
player.countCards("h") - player.getHandcardLimit()
)
return 0;
2023-03-31 11:34:38 +00:00
return lib.skill.clanyirong.checkx(card);
},
2024-04-15 18:10:02 +00:00
checkx(card) {
var num = 1;
2024-04-15 18:31:36 +00:00
if (_status.event.player.getUseValue(card, null, true) <= 0) num = 1.5;
2024-04-15 18:10:02 +00:00
return (15 - get.value(card)) * num;
},
prompt() {
var player = _status.event.player;
var num1 = player.countCards("h"),
num2 = player.getHandcardLimit();
var str = '<span class="text center">';
if (num1 > num2) {
2024-04-15 18:31:36 +00:00
str += "弃置" + get.cnNumber(num1 - num2) + "张牌,然后手牌上限+1。";
2024-04-15 18:10:02 +00:00
} else {
2024-04-15 18:31:36 +00:00
str += "摸" + get.cnNumber(Math.min(8, num2 - num1)) + "张牌,然后手牌上限-1。";
2023-01-24 13:26:41 +00:00
}
2024-04-15 18:10:02 +00:00
str += "<br>※当前手牌上限:" + num2;
var num3 = (_status.event.getParent().phaseIndex || 0) + 1;
if (num3 > 0) {
str += ";阶段数:" + num3;
2023-01-24 13:26:41 +00:00
}
2024-04-15 18:10:02 +00:00
str += "</span>";
2023-01-24 13:26:41 +00:00
return str;
},
2024-04-15 18:10:02 +00:00
content() {
"step 0";
if (cards.length) {
lib.skill.chenliuwushi.change(player, 1);
2023-01-24 13:26:41 +00:00
event.finish();
2024-04-15 18:10:02 +00:00
} else {
var num1 = player.countCards("h"),
num2 = player.getHandcardLimit();
if (num1 < num2) player.draw(Math.min(8, num2 - num1));
2023-01-24 13:26:41 +00:00
}
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
lib.skill.chenliuwushi.change(player, -1);
},
ai: {
order(item, player) {
var num = player.getHandcardLimit(),
2024-04-15 18:31:36 +00:00
numx = (_status.event.getParent().phaseIndex || 0) + 1;
if (num == 5 && numx == 4 && player.getStat("skill").clanyirong) return 0;
2024-04-15 18:10:02 +00:00
if (
player.countCards("h") == num + 1 &&
num != 2 &&
(num <= 4 || (num > 4 && numx > 4))
)
return 10;
2023-03-31 11:34:38 +00:00
return 0.5;
2023-01-24 13:26:41 +00:00
},
2024-04-15 18:10:02 +00:00
result: { player: 1 },
threaten: 5,
2023-01-24 13:26:41 +00:00
},
},
2024-04-15 18:10:02 +00:00
clanguixiang: {
audio: 2,
trigger: {
player: "phaseChange",
},
forced: true,
filter(event, player) {
2024-04-15 18:31:36 +00:00
if (event.phaseList[event.num].startsWith("phaseUse")) return false;
2024-04-15 18:10:02 +00:00
var num1 = player.getHandcardLimit() - 1,
num2 = event.num;
return num1 == num2;
},
content() {
trigger.phaseList[trigger.num] = "phaseUse|clanguixiang";
2023-10-09 08:35:27 +00:00
game.delayx();
2023-01-24 13:26:41 +00:00
},
},
2024-04-15 18:10:02 +00:00
clanmuyin: {
audio: 2,
clanSkill: true,
2024-04-15 18:31:36 +00:00
audioname: ["clan_wuxian", "clan_wuban", "clan_wukuang", "clan_wuqiao"],
2024-04-15 18:10:02 +00:00
trigger: { player: "phaseBegin" },
isMax(player) {
var num = player.getHandcardLimit();
return !game.hasPlayer(function (current) {
2024-04-15 18:31:36 +00:00
return current != player && current.getHandcardLimit() > num;
2023-01-24 13:26:41 +00:00
});
},
2024-04-15 18:10:02 +00:00
filter(event, player) {
return game.hasPlayer(function (current) {
return (
2024-04-15 18:31:36 +00:00
(current == player || current.hasClan("陈留吴氏")) &&
2024-04-15 18:10:02 +00:00
!lib.skill.clanmuyin.isMax(current)
);
2023-01-24 13:26:41 +00:00
});
},
2024-04-15 18:10:02 +00:00
direct: true,
content() {
"step 0";
player
.chooseTarget(
get.prompt("clanmuyin"),
"令一名陈留吴氏角色的手牌上限+1",
function (card, player, current) {
return (
2024-04-15 18:31:36 +00:00
(current == player || current.hasClan("陈留吴氏")) &&
2024-04-15 18:10:02 +00:00
!lib.skill.clanmuyin.isMax(current)
);
}
)
.set("ai", function (target) {
return get.attitude(_status.event.player, target);
});
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var target = result.targets[0];
player.logSkill("clanmuyin", target);
lib.skill.chenliuwushi.change(target, 1);
2023-01-24 13:26:41 +00:00
game.delayx();
}
},
},
2024-04-15 18:10:02 +00:00
chenliuwushi: {
charlotte: true,
change(player, num) {
player.addSkill("chenliuwushi");
var info = player.storage;
2024-04-15 18:31:36 +00:00
if (typeof info.chenliuwushi != "number") info.chenliuwushi = 0;
2024-04-15 18:10:02 +00:00
info.chenliuwushi += num;
2024-04-15 18:31:36 +00:00
if (info.chenliuwushi == 0) player.unmarkSkill("chenliuwushi");
2024-04-15 18:10:02 +00:00
else player.markSkill("chenliuwushi");
if (num >= 0) game.log(player, "的手牌上限", "#y+" + num);
else game.log(player, "的手牌上限", "#g" + num);
},
mod: {
maxHandcard(player, num) {
var add = player.storage.chenliuwushi;
if (typeof add == "number") return num + add;
2023-01-24 13:26:41 +00:00
},
},
2024-04-15 18:10:02 +00:00
markimage: "image/card/handcard.png",
intro: {
content(num, player) {
var str = "<li>手牌上限";
if (num >= 0) str += "+";
str += num;
str += "<br><li>当前手牌上限:";
str += player.getHandcardLimit();
2023-01-24 13:26:41 +00:00
return str;
},
},
},
},
2024-04-15 18:10:02 +00:00
characterReplace: {
wuban: ["clan_wuban", "dc_wuban", "wuban", "xin_wuban"],
2023-01-24 13:26:41 +00:00
},
2024-04-15 18:10:02 +00:00
characterIntro: {
xunshu: "荀淑83年149年字季和为郎陵侯相颍川颍阴人今河南省许昌市人。汉和帝至汉桓帝时人物以品行高洁著称。有子八人号八龙。年轻时有高尚的德行学问渊博不喜欢雕章琢句徒在文字上用功不注重实际的学识。因此常常被俗儒看不起。但州里却称他有知人之明。安帝时征召任为郎中后来再升当涂长。离职还乡里。他的孙子荀彧是曹操部下著名的谋士。",
xuncai: "荀采(生卒年不详),字女荀,颍川人,东汉名士荀爽之女。荀采聪慧敏捷而有才艺。十七岁时,荀采嫁给阴瑜。两年后阴瑜去世。荀采不愿意改嫁,但荀爽答应把荀采嫁给同郡人郭奕。荀采趁着旁人没有防备,用粉在门上写下:“尸还阴”,而后自缢而死。",
xuncan: "荀粲210年—238年字奉倩颍川郡颍阴县今河南省许昌市人。三国时期曹魏大臣、玄学家太尉荀彧幼子。个性简贵不轻易交接常人所交之辈皆一时俊杰。聪颖过人善谈玄理名噪一时。娶大将军曹洪之女为妻生活美满。景初二年面对妻子去世悲痛过度而死时年二十九成语“荀令伤神”与之有关。",
hanshao:
"韩韶生卒年不详字仲黄颍川舞阳今河南省漯河市东汉桓帝时出仕。任郡吏有政绩继而被征入司徒府。他公正廉明尽心民事视民苦如在己身政绩卓著。汉永寿二年公元156年泰山贼公孙举率流寇数千骚扰嬴县守令因不能拒敌安民多受制裁朝廷命尚书府从三府司徒、司马、司空属员中选择能治理民事又能拒寇入侵的官员前往镇守。韩韶被封为“嬴长”到嬴县上任他是莱芜历史上唯一的一位“嬴长”。",
hanrong:
"韩融127年196年字元长颍川舞阳今属河南省漯河市人。赢长韩韶子献帝时大臣。中平五年188年融与荀爽、陈纪等十四人并博士征不至。董卓废立融等复俱公车征。初平元年190年六月融为大鸿胪奉命与执金吾胡母班等出使关东。献帝东迁为李傕、郭汜等所败融为太仆奉命至弘农与傕、汜连和使其放遣公卿百官及宫女妇人。",
wukuang:
"吴匡生卒年不详兖州陈留今河南开封市人。东汉末年大臣大将军何进部将。光熹元年公元189年汉灵帝死后十常侍干预朝政大将军何进谋诛宦官但失败被杀吴匡联合曹操、袁绍等杀尽宦官攻杀车骑将军何苗。兴平二年公元195年十月李傕、郭汜后悔放汉献帝东归洛阳于是联合起来追击曹操遂起兵平乱但在回朝后曹操挟天子以令诸侯实行专权但遭到吴匡反对。",
wanghun:
"王浑223年297年字玄冲太原郡晋阳县今山西省太原市人。魏晋时期名臣曹魏司空王昶的儿子。王浑早年为大将军曹爽的掾吏高平陵政变后循例免官出任怀县县令、散骑侍郎等职袭封京陵县侯。西晋王朝建立后加号扬烈将军历任征虏将军、东中郎将、豫州刺史等职积极筹划伐吴方略。咸宁五年279年配合镇南将军杜预灭亡吴国迁征东大将军、左仆射、司徒公晋爵京陵县公。晋惠帝司马衷即位加任侍中衔。楚王司马玮发动政变有意寻求支持遭到严词拒绝。楚王司马玮死后复任司徒、录尚书事。元康七年297年王浑去世享年七十五岁谥号为元。《唐会要》尊为“魏晋八君子”之一。",
zhongyu:
"钟毓(?-263年字稚叔颍川长社今河南长葛市人。三国时期魏国大臣太傅钟繇之子、司徒钟会之兄。出身颍川钟氏机灵敏捷有其父之遗风。十四岁时起家散骑侍郎。太和初年迁黄门侍郎袭封定陵县侯。正始年间拜散骑常侍迁魏郡太守入为侍中、御史中丞、廷尉 [5] 。随平诸葛诞的淮南叛乱拜青州刺史、后将军都督徐州、荆州诸军事。景元四年263年去世追赠车骑将军谥号为惠著有文集五卷见《隋书·经籍志》及《两唐书·经籍志》传于世。",
wanglun:
"王沦233年257年字太冲出身太原晋阳王姓世族今山西省太原市王昶三子王浑、王深之弟王湛之兄。醇粹简远崇尚老庄之学心思平淡。二十多时被举荐为孝廉没有前往后任大将军参军。257年诸葛诞不满司马氏篡权而在寿春起义王沦跟随司马昭征讨遭遇疾疫去世时年二十五时人惜之司马昭为他流泪。其兄著诔文《表德论》表述其德行说“因为畏惧帝王的典章制度不能写墓志铭于是撰写过往的事迹刻在墓的背面。”",
wuqiao: "吴乔,西晋人物,蜀车骑将军吴懿之孙。李雄建立成汉政权,他沦落益州,长达三十年,始终不向李雄屈服。",
clan_wangguang:
"王广,三国时期曹魏太原祁县人,哲学家。东汉司徒王允从孙,魏太尉王凌之子。有志尚学,官至尚书。魏时随父亲在朝作官,屯骑校尉,机智有谋。当得知司马懿篡夺曹魏政权时,王凌与外甥令狐愚合谋立楚王为魏主,王广劝其父不可,王凌没有接受儿子的谏言,结果计谋泄而被害。",
wangmingshan:
"王明山,王凌的小儿子,太原祁(今山西省祁县)人,三国魏书法家,最知名善画,多技艺,人得其书,皆以为法。太尉王凌参与谋划废立,事情泄露,被太傅司马懿领兵平定。",
2023-05-13 14:57:29 +00:00
},
2024-04-15 18:10:02 +00:00
dynamicTranslate: {
clanlianzhu(player) {
if (player.storage.clanlianzhu)
return '转换技。每名角色A的出牌阶段限一次。阴:A可以重铸一张牌,然后你可以重铸一张牌。若这两张牌颜色不同,则你的手牌上限-1<span class="bluetext">阳:A可以令你选择一名在你或A攻击范围内的另一名其他角色B,然后A和你可依次选择是否对B使用一张【杀】。若这两张【杀】颜色相同,则你的手牌上限+1</span>。';
2023-05-29 05:22:12 +00:00
return '转换技。每名角色A的出牌阶段限一次。<span class="bluetext">阴:A可以重铸一张牌,然后你可以重铸一张牌。若这两张牌颜色不同,则你的手牌上限-1</span>;阳:A可以令你选择一名在你或A攻击范围内的另一名其他角色B,然后A和你可依次选择是否对B使用一张【杀】。若这两张【杀】颜色相同,则你的手牌上限+1。';
2023-05-13 14:57:29 +00:00
},
2024-04-15 18:10:02 +00:00
clanguangu(player) {
if (player.storage.clanguangu)
return '转换技,出牌阶段限一次。阴:你可以观看牌堆顶的至多四张牌;<span class="bluetext">阳:你可以观看一名角色的至多四张手牌。</span>然后你可以使用其中的一张牌。';
return '转换技,出牌阶段限一次。<span class="bluetext">阴:你可以观看牌堆顶的至多四张牌;</span>阳:你可以观看一名角色的至多四张手牌。然后你可以使用其中的一张牌。';
},
2024-04-15 18:10:02 +00:00
clanjiexuan(player) {
if (player.storage.clanjiexuan)
return '限定技,转换技。阴:你可以将一张红色牌当【顺手牵羊】使用;<span class="bluetext">阳:你可以将一张黑色牌当【过河拆桥】使用。</span>';
2023-09-01 15:55:52 +00:00
return '限定技,转换技。<span class="bluetext">阴:你可以将一张红色牌当【顺手牵羊】使用;</span>阳:你可以将一张黑色牌当【过河拆桥】使用。';
},
2023-02-22 05:47:10 +00:00
},
2024-04-15 18:10:02 +00:00
translate: {
clan_wuxian_prefix: "族",
clan_wuban_prefix: "族",
clan_xunshu_prefix: "族",
clan_xunchen_prefix: "族",
clan_xuncai_prefix: "族",
clan_xuncan_prefix: "族",
clan_hanshao_prefix: "族",
clan_hanrong_prefix: "族",
clan_wukuang_prefix: "族",
clan_wangling_prefix: "族",
clan_zhongyan_prefix: "族",
clan_wangyun_prefix: "族",
clan_wanghun_prefix: "族",
clan_zhonghui_prefix: "族",
clan_zhongyu_prefix: "族",
clan_wanglun_prefix: "族",
clan_xunyou_prefix: "族",
clan_wuqiao_prefix: "族",
2024-04-15 18:10:02 +00:00
clan_wuxian: "族吴苋",
clanyirong: "移荣",
clanyirong_info:
"出牌阶段限两次。若你的手牌数小于X则你可以将手牌摸至X张至多摸八张然后X-1大于X则你可以将手牌弃置至X张然后X+1。X为你的手牌上限",
clanguixiang: "贵相",
clanguixiang_info:
"锁定技。你的非出牌阶段开始前若此阶段即将成为你本回合内的第X个阶段X为你的手牌上限则你终止此阶段改为进行一个出牌阶段。",
clanmuyin: "穆荫",
clanmuyin_info:
"宗族技。回合开始时,你可以选择一名手牌上限不为全场最多的陈留吴氏角色。该角色的手牌上限+1。",
chenliuwushi: "陈留·吴氏",
clan_wuban: "族吴班",
clanzhanding: "斩钉",
clanzhanding_info:
"你可以将任意张牌当做【杀】使用并你令你的手牌上限-1。你以此法使用的【杀】结算结束后若你因此【杀】造成过伤害则你将手牌摸至手牌上限至多摸五张否则你令此【杀】不计入次数限制。",
clan_xunshu: "族荀淑",
clanshenjun: "神君",
clanshenjun_info:
"当一名角色使用【杀】或普通锦囊牌时,若你手牌中有该牌名的牌,你展示之,且这些牌称为“神君”。然后本阶段结束时,你可以将等同于你“神君”数张牌当做一张“神君”牌使用。",
clanbalong: "八龙",
clanbalong_info:
"锁定技。当你于一回合内首次{回复体力后或受到伤害后或失去体力后},若你手牌中唯一最多的类别为锦囊牌,你展示所有手牌并摸至角色数张。",
clandaojie: "蹈节",
clandaojie_info:
"宗族技锁定技。当你每回合第一次使用非伤害类普通锦囊牌后你须失去一个锁定技或失去1点体力令一名颍川荀氏角色获得此牌对应的所有实体牌。",
clan_xuncai: "族荀采",
clanlieshi: "烈誓",
clanlieshi_info:
"出牌阶段你可以选择一项1.废除判定区并受到你造成的1点火焰伤害2.弃置所有【闪】3.弃置所有【杀】。然后令一名其他角色从你未选择的选项中选择一项。",
clandianzhan: "点盏",
clandianzhan_info:
"锁定技。当你每轮第一次使用一种花色的牌后若此牌的目标数为1且目标未横置你横置此牌目标若你有此花色的手牌你重铸这些牌。均执行后你摸一张牌。",
clanhuanyin: "还阴",
clanhuanyin_info: "锁定技。当你进入濒死状态时,将手牌补至四张。",
clan_xunchen: "族荀谌",
clansankuang: "三恇",
clansankuang_info:
"锁定技。当你每轮第一次使用一种类别的牌后你令一名其他角色交给你至少X张牌然后于装备区或处理区内获得你使用的牌对应的所有实体牌X为以下条件中其满足的项数场上有牌、已受伤、体力值小于手牌数。",
clanbeishi: "卑势",
clanbeishi_info:
"锁定技。当一名角色失去最后的手牌后若其是你首次发动〖三恇〗的目标角色你回复1点体力。",
clan_xuncan: "族荀粲",
clanyunshen: "熨身",
clanyunshen_info:
"出牌阶段限一次。你可以令一名其他角色回复1点体力然后选择一项1.你视为对其使用一张冰【杀】2.其视为对你使用一张冰【杀】。",
clanshangshen: "伤神",
clanshangshen_info:
"当一名角色受到属性伤害后,若本回合此前没有角色或已死亡的角色受到过属性伤害,你可以执行目标角色为你的【闪电】效果,然后其将手牌摸至四张。",
clanfenchai: "分钗",
clanfenchai_info:
"锁定技。若你首次发动技能指定的异性目标角色中:存在存活角色,你的判定牌视为♥;不存在存活角色,你的判定牌视为♠。",
clan_hanshao: "族韩韶",
clanfangzhen: "放赈",
clanfangzhen_info:
"出牌阶段开始时你可以横置一名角色并选择一项1.摸两张牌然后交给其两张牌2.令其回复1点体力。然后第X轮游戏开始时你失去〖放赈〗X为其座位号。",
clanliuju: "留驹",
clanliuju_info:
"出牌阶段结束时你可以与一名角色A拼点输的角色可以使用任意张拼点牌中的非基本牌。然后若你至A的距离或A至你的距离发生了变化你重置〖恤民〗。",
clanxumin: "恤民",
2024-04-15 18:31:36 +00:00
clanxumin_info: "宗族技,限定技。你可以将一张牌当做【五谷丰登】对任意名其他角色使用。",
2024-04-15 18:10:02 +00:00
clan_hanrong: "族韩融",
clanlianhe: "连和",
clanlianhe_info:
"出牌阶段开始时你可以横置两名角色。这些角色于自己的下个出牌阶段结束时若其此阶段未摸牌其令你摸X+1张牌或交给你X-1张牌X为其此阶段获得的牌数且至多为3。",
clanhuanjia: "缓颊",
clanhuanjia_info:
"出牌阶段结束时,你可以与一名角色拼点。赢的角色可以使用一张拼点牌。然后若此牌:未造成过伤害,你获得另一张拼点牌;造成过伤害,你失去一个技能。",
clan_wukuang: "族吴匡",
clanlianzhu: "联诛",
clanlianzhu_info:
"转换技。每名角色A的出牌阶段限一次。阴:A可以重铸一张牌,然后你可以重铸一张牌。若这两张牌颜色相同,则你的手牌上限+1可以令你选择一名在你或攻击范围内的另一名其他角色然后和你可依次选择是否对使用一张【杀】。若这两张【杀】颜色不同则你的手牌上限-1。",
clan_wangling: "族王淩",
clanbolong: "驳龙",
clanbolong_info:
"出牌阶段限一次。你可以令一名其他角色选择一项1.你交给其一张牌然后视为对其使用一张雷【杀】2.交给你等同于你手牌数的牌,然后视为对你使用一张【酒】。",
clanzhongliu: "中流",
clanzhongliu_info:
"宗族技,锁定技。当你使用牌时,若此牌对应的实体牌均不为太原王氏角色的手牌,你重置武将牌上的技能。",
clan_zhongyan: "族钟琰",
clanguangu: "观骨",
clanguangu_info:
"转换技,出牌阶段限一次。阴:你可以观看牌堆顶的至多四张牌;阳:你可以观看一名角色的至多四张手牌。然后你可以使用其中的一张牌。",
clanxiaoyong: "啸咏",
clanxiaoyong_info:
"锁定技。当你于回合内首次使用字数为X的牌时你重置〖观骨〗X为你上次发动〖观骨〗观看的牌数。",
clanbaozu: "保族",
2024-04-15 18:31:36 +00:00
clanbaozu_info: "宗族技限定技。当一名颍川钟氏角色进入濒死状态时你可以令其横置并回复1点体力。",
2024-04-15 18:10:02 +00:00
clan_wangyun: "族王允",
clanjiexuan: "解悬",
clanjiexuan_info:
"限定技,转换技。阴:你可以将一张红色牌当【顺手牵羊】使用;阳:你可以将一张黑色牌当【过河拆桥】使用。",
clanmingjie: "铭戒",
clanmingjie_info:
"限定技。出牌阶段,你可以选择一名角色,然后你获得此下效果:①你使用牌时你可以指定其为额外目标直到其下个回合结束。②其下个回合结束时(若该角色为你则改为你的下下个回合结束时),你可以使用本回合使用过的黑桃牌和被抵消过的牌。",
clan_wanghun: "族王浑",
clanfuxun: "抚循",
clanfuxun_info:
"出牌阶段限一次。你可以获得或交给一名其他角色一张手牌,然后若其手牌数与你相等且于此阶段仅以此法获得或失去过牌,你可以将一张牌当任意基本牌使用。",
clanchenya: "沉雅",
clanchenya_info:
"当一名角色发动“出牌阶段限一次”的技能后你可以令其重铸任意张牌名字数为X的牌X为其手牌数。",
clan_zhonghui: "族钟会",
clanyuzhi: "迂志",
clanyuzhi_info:
"锁定技。新的一轮开始时你依次执行以下项①你弃置上一轮因〖迂志〗展示的手牌然后若你上一轮使用的牌数或你上上轮因〖迂志〗摸的牌数小于你上轮因〖迂志〗摸的牌数你受到1点雷属性伤害或失去〖保族〗。②你展示一张手牌然后摸X张牌X为此牌牌名字数。",
clanxieshu: "挟术",
clanxieshu_info:
"①当你因牌造成或受到伤害后你可以横置武将牌并弃置Y张牌然后摸你已损失体力值张牌Y为此牌牌名字数。②一名角色的濒死状态结算完毕后你令〖挟术〗于本回合失效。",
clan_zhongyu: "族钟毓",
clanjiejian: "捷谏",
clanjiejian_info:
"当你于一回合使用第X张牌指定第一个目标后若此牌不为装备牌则你可以令一名目标角色摸X张牌。X为此牌牌名字数",
clanhuanghan: "惶汗",
clanhuanghan_info:
"当你受到牌造成的伤害后你可以摸X张牌并弃置Y张牌X为此牌牌名字数Y为你已损失的体力值然后若此次技能发动不为你本回合首次发动此技能你重置技能〖保族〗。",
clan_wanglun: "族王沦",
clanqiuxin: "求心",
clanqiuxin_info:
"出牌阶段限一次,你可以令一名其他角色选择一项:①你对其使用【杀】;②你对其使用任意普通锦囊牌。当你执行其选择的选项后,你视为执行另一项。",
clanjianyuan: "简远",
clanjianyuan_info:
"当一名角色发动“出牌阶段限一次”的技能后你可以令其重铸任意张牌名字数为X的牌X为其本阶段的使用牌数。",
clan_xunyou: "族荀攸",
clanbaichu: "百出",
clanbaichu_info:
"锁定技当你使用一张牌结算完毕后若你未记录过此牌的花色和类型组合则你记录此组合并记录一个普通锦囊牌名否则你于本轮获得技能〖奇策〗已记录此牌牌名你回复1点体力或摸一张牌。",
clan_wuqiao: "族吴乔",
clanqiajue: "跒倔",
clanqiajue_info:
"摸牌阶段开始时你可以弃置一张黑色牌。若如此做此阶段结束时你展示手牌若这些牌的点数和大于30你的手牌上限-2否则你执行一个额外的摸牌阶段。",
clan_wangguang: "族王广",
clan_wangguang_prefix: "族",
clanlilun: "离论",
clanlilun_info:
"出牌阶段限一次,你可以重铸两张手牌(不能是你本回合以此法重铸过的牌名的牌),然后使用其中的一张牌。",
clanjianji: "见机",
clanjianji_info:
"限定技,一名角色的结束阶段,若其上下家均未于本回合:使用过牌,则你可以与其各摸一张牌;成为过牌的目标,则你可以视为使用一张【杀】。",
clan_wangmingshan: "族王明山",
clan_wangmingshan_prefix: "族",
clantanque: "弹雀",
clantanque_info:
"每回合限一次。当你使用牌结算结束后你可以对一名体力值为X且不为0的角色造成1点伤害X为此牌点数与你上一张使用的牌的点数之差。",
clanshengmo: "剩墨",
clanshengmo_info:
"当你需要使用一张未以此法使用过的基本牌时,你可以获得一张于本回合进入弃牌堆且点数不为这些牌中最大且不为这些牌中最小的牌,视为你使用需要使用的牌。",
2024-04-15 18:10:02 +00:00
clan_wu: "陈留·吴氏",
clan_xun: "颍川·荀氏",
clan_han: "颍川·韩氏",
clan_wang: "太原·王氏",
clan_zhong: "颍川·钟氏",
2023-01-24 13:26:41 +00:00
},
};
});