Merge pull request #1340 from mengxinzxz/PR-Branch

bugfix;技能调整
This commit is contained in:
Spmario233 2024-05-11 22:23:11 +08:00 committed by GitHub
commit 3f89406e90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 112 additions and 34 deletions

View File

@ -6671,7 +6671,7 @@ const skills = {
var count = player.getHistory("useSkill", evt => { var count = player.getHistory("useSkill", evt => {
return ( return (
evt.skill == "jsrgguanhuo_viewas" && evt.skill == "jsrgguanhuo_viewas" &&
evt.getParent("phaseUse") === trigger.getParent("phaseUse") evt.event.getParent("phaseUse") === trigger.getParent("phaseUse")
); );
}).length; }).length;
if (count == 1) { if (count == 1) {
@ -6688,13 +6688,13 @@ const skills = {
if (_status.event.getParent().skill == "jsrgguanhuo_viewas" && player.getHistory("useSkill", evt => { if (_status.event.getParent().skill == "jsrgguanhuo_viewas" && player.getHistory("useSkill", evt => {
return ( return (
evt.skill == "jsrgguanhuo_viewas" && evt.skill == "jsrgguanhuo_viewas" &&
evt.getParent("phaseUse") === _status.event.getParent("phaseUse") evt.event.getParent("phaseUse") === _status.event.getParent("phaseUse")
); );
}).length == 1) return "zeroplayertarget"; }).length == 1) return "zeroplayertarget";
if (_status.event.type == "phase" && _status.event.skill == "jsrgguanhuo_viewas" && player.getHistory("useSkill", evt => { if (_status.event.type == "phase" && _status.event.skill == "jsrgguanhuo_viewas" && player.getHistory("useSkill", evt => {
return ( return (
evt.skill == "jsrgguanhuo_viewas" && evt.skill == "jsrgguanhuo_viewas" &&
evt.getParent("phaseUse") === _status.event.getParent("phaseUse") evt.event.getParent("phaseUse") === _status.event.getParent("phaseUse")
); );
}).length > 1 && player.countCards("h") <= 3) return [0, 0]; }).length > 1 && player.countCards("h") <= 3) return [0, 0];
}, },

View File

@ -688,14 +688,80 @@ const skills = {
result: { bool }, result: { bool },
} = await player.chooseToCompare(target); } = await player.chooseToCompare(target);
if (bool) { if (bool) {
player.storage.xinxianzhen = target; player.markAuto("olxianzhen_effect", [target]);
player.addTempSkill("xinxianzhen2"); player.addTempSkill("olxianzhen_effect");
} else { } else {
player.markAuto("olxianzhen_buff", [target]); player.markAuto("olxianzhen_buff", [target]);
player.addTempSkill("olxianzhen_buff"); player.addTempSkill("olxianzhen_buff");
} }
}, },
subSkill: { subSkill: {
effect: {
charlotte: true,
onremove: true,
audio: "rexianzhen",
mod: {
targetInRange(card, player, target) {
if (player.getStorage("olxianzhen_effect").includes(target)) return true;
},
cardUsableTarget(card, player, target) {
if (player.getStorage("olxianzhen_effect").includes(target)) return true;
},
},
trigger: { player: "useCard2" },
filter(event, player) {
if (event.card.name != "sha" && get.type(event.card) != "trick") return false;
if (!Array.isArray(event.targets)) return false;
return game.hasPlayer(target => {
if (!player.getStorage("olxianzhen_effect").includes(target)) return false;
return !event.targets.includes(target) && lib.filter.targetEnabled2(event.card, player, target);
});
},
async cost(event, trigger, player) {
const targets = game.filterPlayer(target => {
if (!player.getStorage("olxianzhen_effect").includes(target)) return false;
return trigger.targets.includes(target) && lib.filter.targetEnabled2(trigger.card, player, target);
});
if (targets.length == 1) {
const target = targets[0];
const bool = await player.chooseBool(get.prompt("olxianzhen_effect", target), "令" + get.translation(target) + "也成为" + get.translation(trigger.card) + "的目标").forResult("bool");
event.result = { bool: bool, targets: targets };
} else {
event.result = await player
.chooseTarget(get.prompt("olxianzhen_effect"), "令任意名【陷阵】拼点成功的目标角色也成为" + get.translation(trigger.card) + "的目标", (card, player, target) => {
const trigger = get.event().getTrigger();
if (!player.getStorage("olxianzhen_effect").includes(target)) return false;
return trigger.targets.includes(target) && lib.filter.targetEnabled2(trigger.card, player, target);
})
.set("ai", target => {
const player = get.event("player"),
trigger = get.event().getTrigger();
return get.effect(target, trigger.card, player, player);
})
.forResult();
}
},
content() {
trigger.targets.addArray(event.targets);
game.log(event.targets, "成为了", trigger.card, "的额外目标");
},
ai: {
unequip: true,
skillTagFilter(player, tag, arg) {
if (!arg || !arg.target || !player.getStorage("olxianzhen_effect").includes(arg.target)) return false;
},
effect: {
player(card, player, target, current, isLink) {
if (isLink || !target) return;
if (!player.getStorage("olxianzhen_effect").includes(target) && ["sha", "guohe", "shunshou", "huogong", "juedou"].includes(card.name)) {
if (get.effect(target, card, player, player) > 0) {
return [1, 2];
}
}
},
},
},
},
buff: { buff: {
charlotte: true, charlotte: true,
onremove: true, onremove: true,

View File

@ -38,7 +38,7 @@ const translates = {
ol_gaoshun: "OL界高顺", ol_gaoshun: "OL界高顺",
ol_gaoshun_prefix: "OL界", ol_gaoshun_prefix: "OL界",
olxianzhen: "陷阵", olxianzhen: "陷阵",
olxianzhen_info: "出牌阶段限一次,你可以与一名角色拼点。若你赢,本回合你无视该角色的防具且对其使用牌没有次数和距离限制,且当你使用【杀】或普通锦囊牌指定其他角色为唯一目标时可以令该角色也成为此牌的目标;若你没赢,本回合你不能对其使用【杀】且你的【杀】不计入手牌上限。", olxianzhen_info: "出牌阶段限一次,你可以与一名角色拼点。若你赢,本回合你无视该角色的防具且对其使用牌没有次数和距离限制,且当你使用【杀】或普通锦囊牌指定目标时可以令该角色也成为此牌的目标;若你没赢,本回合你不能对其使用【杀】且你的【杀】不计入手牌上限。",
ol_sb_yuanshao: "OL谋袁绍", ol_sb_yuanshao: "OL谋袁绍",
ol_sb_yuanshao_prefix: "OL谋", ol_sb_yuanshao_prefix: "OL谋",
olsbhetao: "合讨", olsbhetao: "合讨",

View File

@ -138,6 +138,7 @@ window.noname_character_rank = {
"xia_yuzhenzi", "xia_yuzhenzi",
"dc_simashi", "dc_simashi",
"dc_sb_simayi", "dc_sb_simayi",
"dc_sb_jiaxu",
"caofang", "caofang",
"dc_shen_huatuo", "dc_shen_huatuo",
"sp_zhenji", "sp_zhenji",
@ -376,6 +377,7 @@ window.noname_character_rank = {
"ol_jianyong", "ol_jianyong",
"ol_sb_jiangwei", "ol_sb_jiangwei",
"dc_sb_zhouyu", "dc_sb_zhouyu",
"dc_sb_lusu",
"dc_lingcao", "dc_lingcao",
"jsrg_zhugeliang", "jsrg_zhugeliang",
"shen_lusu", "shen_lusu",
@ -688,7 +690,6 @@ window.noname_character_rank = {
"dc_dongzhao", "dc_dongzhao",
"zhugeruoxue", "zhugeruoxue",
"zhugemengxue", "zhugemengxue",
"dc_sb_lusu",
"mb_huban", "mb_huban",
"jsrg_simayi", "jsrg_simayi",
"jsrg_zhaoyun", "jsrg_zhaoyun",
@ -2207,9 +2208,11 @@ window.noname_character_rank = {
"ol_jianyong", "ol_jianyong",
"ol_sb_jiangwei", "ol_sb_jiangwei",
"dc_sb_zhouyu", "dc_sb_zhouyu",
"dc_sb_lusu",
"xia_shitao", "xia_shitao",
"bailingyun", "bailingyun",
"dc_sb_simayi", "dc_sb_simayi",
"dc_sb_jiaxu",
"caofang", "caofang",
"mb_caomao", "mb_caomao",
"dc_shen_huatuo", "dc_shen_huatuo",
@ -2710,7 +2713,6 @@ window.noname_character_rank = {
"yue_zhoufei", "yue_zhoufei",
"ol_dingshangwan", "ol_dingshangwan",
"ol_liwan", "ol_liwan",
"dc_sb_lusu",
"clan_wangmingshan", "clan_wangmingshan",
"chengji", "chengji",
"mb_sp_guanqiujian", "mb_sp_guanqiujian",

View File

@ -103,7 +103,7 @@ const dynamicTranslates = {
str += "阴并将这些牌交给另一名其他角色B然后你与A各摸X张牌X为A以此法失去的手牌数"; str += "阴并将这些牌交给另一名其他角色B然后你与A各摸X张牌X为A以此法失去的手牌数";
if (!storage) str += "</span>"; if (!storage) str += "</span>";
if (storage) str += '<span class="bluetext">'; if (storage) str += '<span class="bluetext">';
str += "阳令A依次使用这些牌中所有其可以使用的牌。"; str += "阳令A依次使用这些牌中所有其可以使用的牌(无距离限制且不可被响应)。";
if (storage) str += "</span>"; if (storage) str += "</span>";
return str; return str;
}, },

View File

@ -59,12 +59,15 @@ const skills = {
if (player.countCards("h") < storage[1]) { if (player.countCards("h") < storage[1]) {
yield player.drawTo(storage[1]); yield player.drawTo(storage[1]);
} else { } else {
yield player.chooseToDiscard("h", true, storage[1] - player.countCards("h")); yield player.chooseToDiscard("h", true, player.countCards("h") - storage[1]);
} }
} }
if (player.getHp() != storage[2]) { if (player.getHp() != storage[2]) {
yield player[player.getHp() > storage[2] ? "loseHp" : "recover"](Math.abs(player.getHp() - storage[2])); yield player[player.getHp() > storage[2] ? "loseHp" : "recover"](Math.abs(player.getHp() - storage[2]));
} }
if (player.getStat("skill").dcsbfumou) {
delete player.getStat("skill").dcsbfumou;
}
}, },
ai: { ai: {
//waiting for PZ157 //waiting for PZ157
@ -75,24 +78,24 @@ const skills = {
audioname: ["dc_sb_jiaxu_shadow"], audioname: ["dc_sb_jiaxu_shadow"],
enable: "phaseUse", enable: "phaseUse",
filter(event, player) { filter(event, player) {
return ( return game.hasPlayer(target => {
game.hasPlayer(target => { return target != player && target.countCards("h");
return target != player && target.countCards("h"); });
}) && game.countPlayer(target => target != player) >= (player.storage.dcsbfumou ? 1 : 2)
);
}, },
filterTarget(card, player, target) { filterTarget(card, player, target) {
if (target == player) return false; if (target == player) return false;
if (!ui.selected.targets.length) return target.countCards("h"); if (!ui.selected.targets.length) return target.countCards("h");
return !player.storage.dcsbfumou; return !player.storage.dcsbfumou && game.countPlayer(target => target != player) > 1;
}, },
selectTarget() { selectTarget() {
const player = get.event("player"); const player = get.event("player");
if (game.countPlayer(target => target != player) == 1) return [1, 2];
return player.storage.dcsbfumou ? [1, 2] : 2; return player.storage.dcsbfumou ? [1, 2] : 2;
}, },
targetprompt() { targetprompt() {
const player = get.event("player"); const player = get.event("player");
return player.storage.dcsbfumou ? "" : ["看牌角色", "得牌角色"][ui.selected.targets.length-1]; if (game.countPlayer(target => target != player) == 1) return "";
return player.storage.dcsbfumou ? "" : ["看牌角色", "得牌角色"][ui.selected.targets.length - 1];
}, },
prompt() { prompt() {
const player = get.event("player"); const player = get.event("player");
@ -105,7 +108,7 @@ const skills = {
async content(event, trigger, player) { async content(event, trigger, player) {
const storage = player.storage.dcsbfumou, const storage = player.storage.dcsbfumou,
target = event.targets[0], target = event.targets[0],
num = Math.ceil(target.countCards("h")/2); num = Math.ceil(target.countCards("h") / 2);
player.changeZhuanhuanji("dcsbfumou"); player.changeZhuanhuanji("dcsbfumou");
let cards = await player let cards = await player
.choosePlayerCard("覆谋:选择展示" + get.translation(target) + "的" + get.cnNumber(num) + "张牌", target, "h", num, true) .choosePlayerCard("覆谋:选择展示" + get.translation(target) + "的" + get.cnNumber(num) + "张牌", target, "h", num, true)
@ -114,7 +117,7 @@ const skills = {
storage = get.event("storage"), storage = get.event("storage"),
target = get.event().getParent().targets[0]; target = get.event().getParent().targets[0];
if (!storage) return get.value(card) * -get.attitude(player, target); if (!storage) return get.value(card) * -get.attitude(player, target);
return target.getUseValue(card) * get.attitude(player, target); return target.getUseValue(card, false) * get.attitude(player, target);
}) })
.set("visible", true) .set("visible", true)
.set("storage", storage) .set("storage", storage)
@ -123,18 +126,25 @@ const skills = {
await player.showCards(cards, get.translation(player) + "发动了【覆谋】"); await player.showCards(cards, get.translation(player) + "发动了【覆谋】");
if (!storage) { if (!storage) {
const aim = event.targets[1]; const aim = event.targets[1];
cards = cards.filter(card => lib.filter.canBeGained(card, aim, target)); if (aim) {
if (cards.length) { cards = cards.filter(card => lib.filter.canBeGained(card, aim, target));
await aim.gain(cards, target, "give"); if (cards.length) {
await game.asyncDraw([player, target], cards.length); await aim.gain(cards, target, "give");
await game.asyncDraw([player, target], cards.length);
} else {
aim.popup("杯具");
aim.chat("555一张都拿不到");
}
} else { } else {
aim.popup("杯具"); player.chat("只是看看,但给不了...");
aim.chat("555一张都拿不到~");
} }
} else { } else {
for (const card of cards) { for (const card of cards) {
if (target.hasUseTarget(card)) { if (target.hasUseTarget(card, false)) {
await target.chooseUseTarget(card, true, false); await target.chooseUseTarget(card, true, false, "nodistance").set("oncard", card => {
game.log(_status.event.card, "不可被响应");
_status.event.directHit.addArray(game.players);
});
} }
} }
} }
@ -144,7 +154,7 @@ const skills = {
mark: true, mark: true,
intro: { intro: {
content(storage) { content(storage) {
if (storage) return "转换技,出牌阶段限一次,你可以观看一名其他角色的手牌并展示其一半手牌,令其依次使用这些牌中所有其可以使用的牌。"; if (storage) return "转换技,出牌阶段限一次,你可以观看一名其他角色的手牌并展示其一半手牌,令其依次使用这些牌中所有其可以使用的牌(无距离限制且不可被响应)。";
return "转换技出牌阶段限一次你可以观看一名其他角色A的手牌并展示其一半手牌并将这些牌交给另一名其他角色B然后你与A各摸X张牌X为A以此法失去的手牌数。"; return "转换技出牌阶段限一次你可以观看一名其他角色A的手牌并展示其一半手牌并将这些牌交给另一名其他角色B然后你与A各摸X张牌X为A以此法失去的手牌数。";
}, },
}, },

View File

@ -13,7 +13,7 @@ const characterSort = {
sp2_qifu: ["dc_guansuo", "xin_baosanniang", "dc_zhaoxiang"], sp2_qifu: ["dc_guansuo", "xin_baosanniang", "dc_zhaoxiang"],
sp2_gaoshan: ["wanglang", "liuhui", "zhangjian"], sp2_gaoshan: ["wanglang", "liuhui", "zhangjian"],
sp2_wumiao: ["wu_zhugeliang", "wu_luxun", "wu_guanyu"], sp2_wumiao: ["wu_zhugeliang", "wu_luxun", "wu_guanyu"],
sp2_mouding: ["dc_sb_lusu", "dc_sb_zhouyu", "dc_sb_simayi"], sp2_mouding: ["dc_sb_jiaxu", "dc_sb_lusu", "dc_sb_zhouyu", "dc_sb_simayi"],
}; };
const characterSortTranslate = { const characterSortTranslate = {

View File

@ -455,8 +455,8 @@ const translates = {
dc_xiahouba_prefix: "新杀", dc_xiahouba_prefix: "新杀",
old_huangfusong: "新杀皇甫嵩", old_huangfusong: "新杀皇甫嵩",
old_huangfusong_prefix: "新杀", old_huangfusong_prefix: "新杀",
dc_sp_machao: "马超", dc_sp_machao: "新杀SP马超",
dc_sp_machao_prefix: "", dc_sp_machao_prefix: "新杀SP",
dc_shixie: "新杀士燮", dc_shixie: "新杀士燮",
dc_shixie_prefix: "新杀", dc_shixie_prefix: "新杀",
dc_guansuo: "新杀关索", dc_guansuo: "新杀关索",
@ -596,9 +596,9 @@ const translates = {
dcsbsushen: "肃身", dcsbsushen: "肃身",
dcsbsushen_info: "限定技,出牌阶段,你可以记录你当前〖覆谋〗的状态、你的手牌数和你的体力值,然后获得技能〖入世〗。", dcsbsushen_info: "限定技,出牌阶段,你可以记录你当前〖覆谋〗的状态、你的手牌数和你的体力值,然后获得技能〖入世〗。",
dcsbrushi: "入世", dcsbrushi: "入世",
dcsbrushi_info: "限定技,出牌阶段,你可以将你当前〖覆谋〗的状态、你的手牌数和你的体力值调整为你发动〖肃身〗时的记录。", dcsbrushi_info: "限定技,出牌阶段,你可以将你当前〖覆谋〗的状态、你的手牌数和你的体力值调整为你发动〖肃身〗时的记录,然后重置〖覆谋〗的发动次数。",
dcsbfumou: "覆谋", dcsbfumou: "覆谋",
dcsbfumou_info: "转换技出牌阶段限一次你可以观看一名其他角色A的手牌并展示其一半手牌并将这些牌交给另一名其他角色B然后你与A各摸X张牌X为A以此法失去的手牌数令A依次使用这些牌中所有其可以使用的牌。", dcsbfumou_info: "转换技出牌阶段限一次你可以观看一名其他角色A的手牌并展示其一半手牌并将这些牌交给另一名其他角色B然后你与A各摸X张牌X为A以此法失去的手牌数令A依次使用这些牌中所有其可以使用的牌(无距离限制且不可被响应)。",
}; };
export default translates; export default translates;

View File

@ -222,7 +222,7 @@ const translates = {
xianzhen: "陷阵", xianzhen: "陷阵",
xianzhen_info: "出牌阶段限一次,你可以与一名角色拼点。若你赢,你获得以下效果直到回合结束:无视与该角色的距离;无视该角色的防具且对其使用【杀】没有次数限制。若你没赢,你不能使用【杀】直到回合结束。", xianzhen_info: "出牌阶段限一次,你可以与一名角色拼点。若你赢,你获得以下效果直到回合结束:无视与该角色的距离;无视该角色的防具且对其使用【杀】没有次数限制。若你没赢,你不能使用【杀】直到回合结束。",
xinxianzhen: "陷阵", xinxianzhen: "陷阵",
xinxianzhen_info: "出牌阶段限一次,你可以与一名角色拼点。若你赢,你获得以下效果直到回合结束:无视该角色的防具且对其使用牌没有次数和距离限制,且当你使用【杀】或普通锦囊牌指定其他角色为唯一目标时可以令该角色也成为此牌的目标。若你没赢,你不能使用【杀】且你的【杀】不计入手牌上限直到回合结束。", xinxianzhen_info: "出牌阶段限一次,你可以与一名角色拼点。若你赢,你获得以下效果直到回合结束:无视该角色的防具且对其使用牌没有次数和距离限制,且当你使用【杀】或普通锦囊牌指定唯一目标时可以令该角色也成为此牌的目标。若你没赢,你不能使用【杀】且你的【杀】不计入手牌上限直到回合结束。",
xinxianzhen2: "陷阵", xinxianzhen2: "陷阵",
jinjiu: "禁酒", jinjiu: "禁酒",
jinjiu_info: "锁定技,你的【酒】均视为【杀】。", jinjiu_info: "锁定技,你的【酒】均视为【杀】。",