Merge pull request #1446 from mengxinzxz/PR-Branch
谋关平【武威】效果调整;韩嵩【隐避】描述微调
This commit is contained in:
commit
5b8038a04c
|
@ -199,7 +199,10 @@ const skills = {
|
|||
//屈原
|
||||
dcqiusuo: {
|
||||
audio: 2,
|
||||
trigger: { source: "damageSource" },
|
||||
trigger: {
|
||||
source: "damageSource",
|
||||
player: "damageEnd",
|
||||
},
|
||||
frequent: true,
|
||||
async content(event, trigger, player) {
|
||||
const tiesuo = get.cardPile("tiesuo");
|
||||
|
@ -293,8 +296,8 @@ const skills = {
|
|||
if (list[0].countCards("h")) {
|
||||
await list[0].showHandcards();
|
||||
}
|
||||
gaifa.remove(list[0]);
|
||||
}
|
||||
gaifa.remove(list[0]);
|
||||
} else {
|
||||
list[0].popup("回答错误", "fire");
|
||||
game.log(list[0], "回答错误");
|
||||
|
@ -305,6 +308,7 @@ const skills = {
|
|||
if (gaifa.length) {
|
||||
for (const i of gaifa) {
|
||||
i.addTempSkill("dclisao_gaifa");
|
||||
i.markAuto("dclisao_gaifa", [player]);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -327,7 +331,7 @@ const skills = {
|
|||
order: 10,
|
||||
result: {
|
||||
target(player, target) {
|
||||
if (target.hasSkill("dclisao_gaifa")) return 0;
|
||||
if (target.getStorage("dclisao_gaifa").includes(player)) return 0;
|
||||
if (get.damageEffect(target, player, player) < 0 && get.attitude(player, target) > 0) return 0;
|
||||
let cards = player.getCards("hs", card => get.tag(card, "damage") && player.canUse(card, target) && get.effect(target, card, player, player) > 0);
|
||||
if (!cards.length) return 0;
|
||||
|
@ -342,18 +346,30 @@ const skills = {
|
|||
subSkill: {
|
||||
gaifa: {
|
||||
charlotte: true,
|
||||
trigger: { player: "damageBegin3" },
|
||||
onremove: true,
|
||||
trigger: {
|
||||
global: "useCard",
|
||||
player: "damageBegin3",
|
||||
},
|
||||
filter(event, player) {
|
||||
return player.getHistory("damage", evt => evt.num > 0).length;
|
||||
const targets = player.getStorage("dclisao_gaifa");
|
||||
return event.name != "useCard" || targets.includes(event.player);
|
||||
},
|
||||
forced: true,
|
||||
popup: false,
|
||||
async content(event, trigger, player) {
|
||||
trigger.num = player.getHistory("damage", evt => evt.num > 0).lastItem.num * 2;
|
||||
const targets = player.getStorage("dclisao_gaifa");
|
||||
if (trigger.name == "useCard") trigger.directHit.add(player);
|
||||
else trigger.num = trigger.num * (targets.length + 1);
|
||||
},
|
||||
mark: true,
|
||||
marktext: "江",
|
||||
intro: { content: "不能熟记《离骚》的惩罚——本回合受到伤害时,若你本回合已受到过伤害,则此伤害值改为上一次受到的伤害的两倍" },
|
||||
intro: {
|
||||
markcount: () => 0,
|
||||
content(storage) {
|
||||
return "<li>无法响应" + get.translation(storage) + "使用的牌<br><li>受到的伤害翻" + storage.length + "倍";
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -101,9 +101,9 @@ const translates = {
|
|||
dcbenxi_info: "转换技,锁定技。当你失去手牌后,阴:系统随机检索出一句转换为拼音后包含“wu,yi”的技能台词,然后你念出此台词。阳:你获得上次所念出的台词对应的技能;若你已拥有该技能,则改为对其他角色各造成1点伤害。",
|
||||
quyuan: "屈原",
|
||||
dcqiusuo: "求索",
|
||||
dcqiusuo_info: "当你造成伤害后,你可以从牌堆或弃牌堆中获得一张【铁索连环】。",
|
||||
dcqiusuo_info: "当你造成或受到伤害后,你可以从牌堆或弃牌堆中获得一张【铁索连环】。",
|
||||
dclisao: "离骚",
|
||||
dclisao_info: "出牌阶段限一次,你可以选择至多两名角色,这些角色须同时回答《离骚》的句段填空。第一名回答正确的角色展示所有手牌,所有本次回答错误或未回答的角色本回合受到伤害时,若其本回合已受到过伤害,则此伤害值改为上一次受到的伤害的两倍。",
|
||||
dclisao_info: "出牌阶段限一次,你可以选择至多两名角色,这些角色须同时回答《离骚》的句段填空。第一名回答正确的角色展示所有手牌,其余角色本回合不能响应你使用的牌且受到的伤害翻倍。",
|
||||
xin_sunquan: "会玩孙权",
|
||||
xin_sunquan_ab: "孙权",
|
||||
dchuiwan: "会玩",
|
||||
|
|
|
@ -593,7 +593,7 @@ const translates = {
|
|||
dcpigua_info: "当你对一名其他角色造成超过1点伤害后,你可以获得其至多等同于游戏轮次的牌,这些牌本回合不计入你的手牌上限。",
|
||||
hansong: "韩嵩",
|
||||
dcyinbi: "隐避",
|
||||
dcyinbi_info: "锁定技。①你的手牌上限与场上手牌上限最多的角色相同。②若没有角色手牌数与你相等,你使用牌无距离和次数限制。",
|
||||
dcyinbi_info: "锁定技。①你的手牌上限与场上手牌上限最多的角色相同。②若没有其他角色的手牌数与你相等,则你使用牌无距离和次数限制。",
|
||||
dcshuaiyan: "率言",
|
||||
dcshuaiyan_info: "锁定技,其他角色手牌数变化后,若与你相等,你弃置其一张牌或摸一张牌。",
|
||||
matie: "马铁",
|
||||
|
|
|
@ -2,7 +2,7 @@ const characters = {
|
|||
zhupeilan: ["female", "wu", 3, ["dccilv", "dctongdao"]],
|
||||
dc_sb_zhangxiu: ["male", "qun", 4, ["dcsbfuxi", "dcsbhaoyi"]],
|
||||
dc_sb_guanping: ["male", "shu", 4, ["dcsbwuwei"]],
|
||||
dc_sb_caoang: ["male", "wei", 4, ["dcsbfengmin", "dcsbzhiwang", "dcsbjueying"]],
|
||||
dc_sb_caoang: ["male", "wei", 4, ["dcsbfengmin", "dcsbzhiwang"]],
|
||||
dc_caoshuang: ["male", "wei", 4, ["dcjianzhuan", "dcfanshi"]],
|
||||
dc_simashi: ["male", "wei", 3, ["dcsanshi", "dczhenrao", "dcchenlve"]],
|
||||
dc_wangling: ["male", "wei", 4, ["dcjichou", "dcmouli"], ["clan:太原王氏"]],
|
||||
|
|
|
@ -335,7 +335,14 @@ const skills = {
|
|||
evt = event.getParent();
|
||||
colors = colors.filter(color => evt.filterCard(get.autoViewAs(lib.skill.dcsbwuwei.viewAs, player.getCards("h", { color: color })), player, evt));
|
||||
colors = colors.map(color => (color == "none" ? "none2" : color));
|
||||
const result = await player.chooseControl(colors, "cancel2").set("prompt", "武威:将一种颜色的所有手牌当作【杀】使用").forResult();
|
||||
const result = await player.chooseControl(colors, "cancel2").set("prompt", "武威:将一种颜色的所有手牌当作【杀】使用").set("ai", () => {
|
||||
const player = get.event().player;
|
||||
let controls = get.event().controls.slice();
|
||||
controls.remove("cancel2");
|
||||
return controls.sort((a, b) => {
|
||||
return player.countCards("h", { color: a == "none2" ? "none" : a }) - player.countCards("h", { color: b == "none2" ? "none" : b });
|
||||
})[0];
|
||||
}).forResult();
|
||||
const color = result.control == "none2" ? "none" : result.control;
|
||||
if (color == "cancel2") {
|
||||
evt.goto(0);
|
||||
|
@ -360,26 +367,101 @@ const skills = {
|
|||
forced: true,
|
||||
popup: false,
|
||||
async content(event, trigger, player) {
|
||||
let result,
|
||||
types = trigger.cards.reduce((list, card) => list.add(get.type(card, player)), []);
|
||||
if (types.length >= 3) {
|
||||
result = { bool: true, links: [0, 1, 2] };
|
||||
} else {
|
||||
result = await player
|
||||
.chooseButton(["武威:请选择" + get.cnNumber(types.length) + "项执行", [["摸一张牌", "令目标角色本回合非锁定技失效", "令本回合〖武威〗可发动次数+1"].map((item, i) => [i, item]), "textbutton"]])
|
||||
.set("forced", true)
|
||||
.set("selectButton", types.length)
|
||||
.set("ai", button => {
|
||||
return [1, 3, 2].slice(0, get.event("selectButton")).includes(button.link) ? 1 : 0;
|
||||
})
|
||||
.forResult();
|
||||
}
|
||||
const func = () => {
|
||||
const event = get.event();
|
||||
const controls = [
|
||||
link => {
|
||||
const evt = get.event();
|
||||
if (evt.dialog && evt.dialog.buttons) {
|
||||
for (let i = 0; i < evt.dialog.buttons.length; i++) {
|
||||
const button = evt.dialog.buttons[i];
|
||||
button.classList.remove("selectable");
|
||||
button.classList.remove("selected");
|
||||
const counterNode = button.querySelector(".caption");
|
||||
if (counterNode) {
|
||||
counterNode.childNodes[0].innerHTML = ``;
|
||||
}
|
||||
}
|
||||
ui.selected.buttons.length = 0;
|
||||
game.check();
|
||||
}
|
||||
return;
|
||||
},
|
||||
];
|
||||
event.controls = [ui.create.control(controls.concat(["清除选择", "stayleft"]))];
|
||||
};
|
||||
if (event.isMine()) func();
|
||||
else if (event.isOnline()) event.player.send(func);
|
||||
let types = trigger.cards.reduce((list, card) => list.add(get.type(card, player)), []);
|
||||
let result = await player
|
||||
.chooseButton(["武威:请选择" + get.cnNumber(types.length) + "次以下项", [["摸一张牌", "令目标角色本回合非锁定技失效", "令本回合〖武威〗可发动次数+1"].map((item, i) => [i, item]), "textbutton"]])
|
||||
.set("forced", true)
|
||||
.set("selectButton", [types.length, types.length + 1])
|
||||
.set("filterButton", button => {
|
||||
const selected = ui.selected.buttons.slice().map(i => i.link);
|
||||
if (selected.length >= get.event().selectButton[0]) return false;
|
||||
return button.link !=1 || !selected.includes(1);
|
||||
})
|
||||
.set("ai", button => {
|
||||
const selected = ui.selected.buttons.slice().map(i => i.link);
|
||||
if (get.event().selectButton >= 3) return selected.includes(button.link) ? 0 : 1;
|
||||
return [0, 2, 1].slice(0, get.event("selectButton")).includes(button.link) ? 1 : 0;
|
||||
})
|
||||
.set("custom", {
|
||||
add: {
|
||||
confirm(bool) {
|
||||
if (bool != true) return;
|
||||
const event = get.event().parent;
|
||||
if (event.controls) event.controls.forEach(i => i.close());
|
||||
if (ui.confirm) ui.confirm.close();
|
||||
game.uncheck();
|
||||
},
|
||||
button() {
|
||||
if (ui.selected.buttons.length) return;
|
||||
const event = get.event();
|
||||
if (event.dialog && event.dialog.buttons) {
|
||||
for (let i = 0; i < event.dialog.buttons.length; i++) {
|
||||
const button = event.dialog.buttons[i];
|
||||
const counterNode = button.querySelector(".caption");
|
||||
if (counterNode) {
|
||||
counterNode.childNodes[0].innerHTML = ``;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!ui.selected.buttons.length) {
|
||||
const evt = event.parent;
|
||||
if (evt.controls) evt.controls[0].classList.add("disabled");
|
||||
}
|
||||
},
|
||||
},
|
||||
replace: {
|
||||
button(button) {
|
||||
const event = get.event();
|
||||
if (!event.isMine() || !event.filterButton(button)) return;
|
||||
if (button.classList.contains("selectable") == false) return;
|
||||
button.classList.add("selected");
|
||||
ui.selected.buttons.push(button);
|
||||
let counterNode = button.querySelector(".caption");
|
||||
const count = ui.selected.buttons.filter(i => i == button).length;
|
||||
if (counterNode) {
|
||||
counterNode = counterNode.childNodes[0];
|
||||
counterNode.innerHTML = `×${count}`;
|
||||
} else {
|
||||
counterNode = ui.create.caption(`<span style="font-family:xinwei; text-shadow:#FFF 0 0 4px, #FFF 0 0 4px, rgba(74,29,1,1) 0 0 3px;">×${count}</span>`, button);
|
||||
}
|
||||
const evt = event.parent;
|
||||
if (evt.controls) evt.controls[0].classList.remove("disabled");
|
||||
game.check();
|
||||
},
|
||||
},
|
||||
})
|
||||
.forResult();
|
||||
if (result.bool) {
|
||||
result.links.sort((a, b) => a - b);
|
||||
for (const i of result.links) {
|
||||
game.log(player, "选择了", "#g【武威】", "的", "#y第" + get.cnNumber(i + 1, true) + "项");
|
||||
}
|
||||
if (result.links.includes(0)) await player.draw();
|
||||
if (result.links.includes(0)) await player.draw(result.links.filter(count => count == 0).length);
|
||||
if (result.links.includes(1)) {
|
||||
for (const target of trigger.targets || []) {
|
||||
target.addTempSkill("fengyin");
|
||||
|
@ -387,9 +469,9 @@ const skills = {
|
|||
}
|
||||
if (result.links.includes(2)) {
|
||||
player.addTempSkill("dcsbwuwei_count");
|
||||
player.addMark("dcsbwuwei_count", 1, false);
|
||||
player.addMark("dcsbwuwei_count", result.links.filter(count => count == 2).length, false);
|
||||
}
|
||||
if (result.links.length == 3) {
|
||||
if ( Array.from({length:3}).map( (_,i) => i).every(i => result.links.includes(i))) {
|
||||
trigger.baseDamage++;
|
||||
game.log(trigger.card, "造成的伤害", "#y+1");
|
||||
}
|
||||
|
@ -500,18 +582,6 @@ const skills = {
|
|||
},
|
||||
},
|
||||
},
|
||||
dcsbjueying: {
|
||||
audio: 2,
|
||||
trigger: { player: "damageBegin4" },
|
||||
filter(event, player) {
|
||||
const cards = player.getEquips("jueying");
|
||||
return cards.length && cards.every(card => lib.filter.cardDiscardable(card, player));
|
||||
},
|
||||
content() {
|
||||
player.discard(player.getEquips("jueying"));
|
||||
trigger.cancel();
|
||||
},
|
||||
},
|
||||
//诸葛瑾
|
||||
dcsbtaozhou: {
|
||||
audio: 2,
|
||||
|
@ -1018,7 +1088,7 @@ const skills = {
|
|||
if (game.online) return;
|
||||
const player = event.player;
|
||||
const evts = player.getAllHistory("useCard", evt => {
|
||||
return get.color(evt.card, player) === "black" && evt.targets && evt.targets.length;
|
||||
return evt.targets && evt.targets.length;
|
||||
});
|
||||
event.set(
|
||||
"dcfenhui_enabled",
|
||||
|
@ -1034,7 +1104,7 @@ const skills = {
|
|||
player.awakenSkill("dcfenhui");
|
||||
const target = event.target;
|
||||
const count = player.getAllHistory("useCard", evt => {
|
||||
return get.color(evt.card, player) === "black" && evt.targets && evt.targets.includes(target);
|
||||
return evt.targets && evt.targets.includes(target);
|
||||
}).length;
|
||||
target.addMark("dcfenhui_mark", Math.min(5, count));
|
||||
player.addSkill("dcfenhui_effect");
|
||||
|
@ -1043,8 +1113,7 @@ const skills = {
|
|||
effect: {
|
||||
audio: "dcfenhui",
|
||||
trigger: {
|
||||
source: "damageBegin1",
|
||||
global: "die",
|
||||
global: ["damageBegin2","die"],
|
||||
},
|
||||
filter(event, player) {
|
||||
return event.player.hasMark("dcfenhui_mark");
|
||||
|
|
|
@ -588,7 +588,7 @@ const translates = {
|
|||
dcshouzhi_modified: "守执·改",
|
||||
dcshouzhi_modified_info: "一名角色的回合结束时,若你的手牌数:大于本回合开始时的手牌数,你可以弃置一张手牌;小于本回合开始时的手牌数,你可以摸两张牌。",
|
||||
dcfenhui: "奋恚",
|
||||
dcfenhui_info: "限定技。出牌阶段,你可以令一名角色获得X枚“恨”标记,你摸等量的牌(X为本局游戏你使用黑色牌指定其为目标的次数,至多为5)。你获得如下效果:⒈当你对其造成伤害时,你移去其1枚“恨”,令此伤害+1;⒉当其死亡时,若其有“恨”,你减1点体力上限,修改〖守执〗并获得〖兴门〗。",
|
||||
dcfenhui_info: "限定技。出牌阶段,你可以令一名角色获得X枚“恨”标记,你摸等量的牌(X为本局游戏你使用牌指定其为目标的次数,至多为5)。你获得如下效果:⒈当其受到伤害时,你移去其1枚“恨”,令此伤害+1;⒉当其死亡时,若其有“恨”,你减1点体力上限,修改〖守执〗并获得〖兴门〗。",
|
||||
dcxingmen: "兴门",
|
||||
dcxingmen_info: "①当你因〖守执〗弃置而失去牌后,你可以回复1点体力。②当你因摸牌而得到牌后,若牌数不小于2且其中有红色牌,则你使用其中的红色牌时不能被响应。",
|
||||
dc_sb_jiaxu: "新杀谋贾诩",
|
||||
|
@ -621,12 +621,10 @@ const translates = {
|
|||
dcsbfengmin_info: "锁定技,一名角色于其回合内失去装备区的牌后,你摸等同于其装备区空缺装备栏数的牌,然后若你发动〖丰愍〗的次数大于你的体力上限,〖丰愍〗于本回合失效。",
|
||||
dcsbzhiwang: "质死",
|
||||
dcsbzhiwang_info: "每回合限一次,当你因受到牌造成的伤害进入濒死状态时,你可以将此伤害改为无来源并选择一名其他角色,其于本回合结束时可以使用本回合令你进入濒死状态的牌。",
|
||||
dcsbjueying: "绝影",
|
||||
dcsbjueying_info: "当你受到伤害时,你可以弃置装备区里的【绝影】,然后防止此伤害。",
|
||||
dc_sb_guanping: "新杀谋关平",
|
||||
dc_sb_guanping_prefix: "新杀谋",
|
||||
dcsbwuwei: "武威",
|
||||
dcsbwuwei_info: "出牌阶段限一次,你可以将一种颜色的所有手牌当作无距离和次数限制的【杀】使用,然后你选择执行以下X项(X为转化为此【杀】的牌的类别数):①摸一张牌;②令目标角色本回合非锁定技失效;③令本回合〖武威〗可发动次数+1。然后若你执行了所有项,则此【杀】造成的伤害+1。",
|
||||
dcsbwuwei_info: "出牌阶段限一次,你可以将一种颜色的所有手牌当作无距离和次数限制的【杀】使用,然后你选择X次执行以下项(X为转化为此【杀】的牌的类别数):①摸一张牌;②令目标角色本回合非锁定技失效;③令本回合〖武威〗可发动次数+1。然后若你执行了所有项,则此【杀】造成的伤害+1。",
|
||||
dc_sb_zhangxiu: "新杀谋张绣",
|
||||
dc_sb_zhangxiu_prefix: "新杀谋",
|
||||
dcsbfuxi: "附袭",
|
||||
|
|
Loading…
Reference in New Issue