minor fix

This commit is contained in:
Spmario233 2024-05-05 16:50:26 +08:00
parent 1c362ced96
commit 3da752aa0e
2 changed files with 6 additions and 20 deletions

View File

@ -3340,29 +3340,16 @@ const skills = {
charlotte: true, charlotte: true,
direct: true, direct: true,
check: function (event, player) { check: function (event, player) {
return ( return (player.getCards("h").map(i => get.value(i)).reduce((p, c) => p + c, 0) < event.player.getCards("h").map(i => get.value(i)).reduce((p, c) => p + c, 0) + 4 * Math.random());
player
.getCards("h")
.map(i => get.value(i))
.reduce((p, c) => p + c, 0) <
event.player
.getCards("h")
.map(i => get.value(i))
.reduce((p, c) => p + c, 0) +
4 * Math.random()
);
}, },
content: function () { content: function () {
"step 0"; "step 0";
player.unmarkAuto("jsrgguiji_swapback", [trigger.player]);
if (trigger.name == "phaseUse") { if (trigger.name == "phaseUse") {
player player.chooseBool(get.prompt("jsrgguiji_swapback", trigger.player), "与其交换手牌。").set("ai", () => {
.chooseBool(get.prompt("jsrgguiji_swapback", trigger.player), "与其交换手牌。") return get.event("bool");
.set("ai", () => { }).set("bool", lib.skill.jsrgguiji_swapback.check(trigger, player) > 0);
return get.event("bool");
})
.set("bool", lib.skill.jsrgguiji_swapback.check(trigger, player) > 0);
} else { } else {
player.unmarkAuto("jsrgguiji_swapback", [trigger.player]);
event.finish(); event.finish();
} }
"step 1"; "step 1";
@ -3370,7 +3357,6 @@ const skills = {
player.logSkill("jsrgguiji_swapback", trigger.player); player.logSkill("jsrgguiji_swapback", trigger.player);
player.swapHandcards(trigger.player); player.swapHandcards(trigger.player);
} }
player.unmarkAuto("jsrgguiji_swapback", [trigger.player]);
}, },
intro: { intro: {
content: "$的下个出牌阶段结束时,你可以与其交换手牌", content: "$的下个出牌阶段结束时,你可以与其交换手牌",

View File

@ -66,7 +66,7 @@ const characters = {
tw_daxiaoqiao: ["female", "wu", 3, ["twxingwu", "twpingting"], ["tempname:daxiaoqiao"]], tw_daxiaoqiao: ["female", "wu", 3, ["twxingwu", "twpingting"], ["tempname:daxiaoqiao"]],
tw_furong: ["male", "shu", 4, ["twxuewei", "twliechi"]], tw_furong: ["male", "shu", 4, ["twxuewei", "twliechi"]],
tw_yl_luzhi: ["male", "qun", 3, ["twmingren", "twzhenliang"]], tw_yl_luzhi: ["male", "qun", 3, ["twmingren", "twzhenliang"]],
tw_liuzhang: ["male", "qun", 3, ["jutu", "twyaohu", "rehuaibi"]], tw_liuzhang: ["male", "qun", 3, ["jutu", "twyaohu", "rehuaibi"], ["zhu"]],
tw_zongyu: ["male", "shu", 3, ["twzhibian", "twyuyan"]], tw_zongyu: ["male", "shu", 3, ["twzhibian", "twyuyan"]],
tw_zhouchu: ["male", "wu", 4, ["twguoyi", "twchuhai"]], tw_zhouchu: ["male", "wu", 4, ["twguoyi", "twchuhai"]],
tw_qiaogong: ["male", "wu", 3, ["twyizhu", "twluanchou"]], tw_qiaogong: ["male", "wu", 3, ["twyizhu", "twluanchou"]],