同步手杀武将修改
This commit is contained in:
parent
e388336e23
commit
8975b245a4
|
@ -30,8 +30,8 @@ const dynamicTranslates = {
|
|||
const xuetu = player.storage.mbxuetu,
|
||||
status = player.countMark("mbxuetu_status");
|
||||
if (status === 0) {
|
||||
if (!xuetu) return '转换技。出牌阶段限一次,<span class="bluetext">阴:你可以弃置一张牌,然后令一名角色回复1点体力;</span>阳:你可以失去1点体力,然后令一名角色摸两张牌。';
|
||||
return '转换技。出牌阶段限一次,阴:你可以弃置一张牌,然后令一名角色回复1点体力;<span class="bluetext">阳:你可以失去1点体力,然后令一名角色摸两张牌。</span>';
|
||||
if (!xuetu) return '转换技。出牌阶段限一次,<span class="bluetext">阴:你可以令一名角色回复1点体力;</span>阳:你可以令一名角色摸两张牌。';
|
||||
return '转换技。出牌阶段限一次,阴:你可以令一名角色回复1点体力;<span class="bluetext">阳:你可以令一名角色摸两张牌。</span>';
|
||||
} else if (status === 1) {
|
||||
return lib.translate.mbxuetu_achieve_info;
|
||||
} else {
|
||||
|
|
|
@ -812,86 +812,117 @@ const skills = {
|
|||
usable: 2,
|
||||
filter(event, player) {
|
||||
if (player.countMark("mbxuetu_status") !== 1 && player.getStat("skill").mbxuetu) return false;
|
||||
if (!player.storage.mbxuetu) return player.countCards("he");
|
||||
return true;
|
||||
},
|
||||
zhuanhuanji2(skill, player) {
|
||||
return player.countMark("mbxuetu_status") !== 1;
|
||||
},
|
||||
filterCard(card, player) {
|
||||
if (player.countMark("mbxuetu_status") > 1) return false;
|
||||
if (player.countMark("mbxuetu_status") === 1) {
|
||||
if (player.getStorage("mbxuetu_used").includes(false)) return false;
|
||||
return true;
|
||||
}
|
||||
return !player.storage.mbxuetu;
|
||||
},
|
||||
selectCard() {
|
||||
const player = get.player();
|
||||
if (player.countMark("mbxuetu_status") > 1) return -1;
|
||||
if (player.countMark("mbxuetu_status") === 1) {
|
||||
if (player.getStorage("mbxuetu_used").includes(false)) return -1;
|
||||
if (player.getStorage("mbxuetu_used").includes(true)) return 1;
|
||||
return [0, 1];
|
||||
}
|
||||
return !player.storage.mbxuetu ? 1 : -1;
|
||||
},
|
||||
check(card) {
|
||||
return 6 - get.value(card);
|
||||
},
|
||||
prompt() {
|
||||
const player = get.player(),
|
||||
storage = player.storage.mbxuetu,
|
||||
status = player.countMark("mbxuetu_status");
|
||||
if (status === 0) {
|
||||
if (storage) return "转换技。出牌阶段限一次,你可以失去1点体力,然后令一名角色摸两张牌。";
|
||||
return "转换技。出牌阶段限一次,你可以弃置一张牌,然后令一名角色回复1点体力。";
|
||||
} else if (status === 1) {
|
||||
return "出牌阶段各限一次。⒈你可以弃置一张牌,然后令一名角色回复1点体力;⒉你可以失去1点体力,然后令一名角色摸两张牌。";
|
||||
} else {
|
||||
if (storage) return "转换技。出牌阶段限一次,你可以摸一张牌,然后对一名角色造成1点伤害。";
|
||||
return "转换技。出牌阶段限一次,你可以回复1点体力,然后令一名角色弃置两张牌。";
|
||||
}
|
||||
},
|
||||
position: "he",
|
||||
filterTarget: true,
|
||||
onremove: ["mbxuetu", "mbxuetu_status"],
|
||||
derivation: ["mbxuetu_achieve", "mbxuetu_fail"],
|
||||
async content(event, trigger, player) {
|
||||
const target = event.targets[0],
|
||||
storage = Boolean(player.storage.mbxuetu);
|
||||
const status = player.countMark("mbxuetu_status");
|
||||
player.changeZhuanhuanji("mbxuetu");
|
||||
if (status < 2) {
|
||||
if (!player.storage.mbxuetu_used) {
|
||||
player.when(["phaseUseAfter", "mbweiming_achieveAfter"]).then(() => {
|
||||
delete player.storage.mbxuetu_used;
|
||||
|
||||
chooseButton: {
|
||||
dialog() {
|
||||
const dialog = ui.create.dialog("###血途###请选择要执行的项");
|
||||
dialog.direct = true;
|
||||
return dialog;
|
||||
},
|
||||
chooseControl(event, player) {
|
||||
let list = ["令一名角色回复1点体力", "令一名角色摸两张牌"];
|
||||
if (player.countMark("mbxuetu_status") !== 1) {
|
||||
list[player.storage.mbxuetu ? "shift" : "pop"]();
|
||||
} else {
|
||||
list = list.filter((choice, index) => {
|
||||
return !player.getStorage("mbxuetu_used").includes(index);
|
||||
});
|
||||
}
|
||||
player.markAuto("mbxuetu_used", [status === 0 ? storage : !event.cards.length]);
|
||||
if ((status === 0 && !storage) || (status === 1 && event.cards.length)) {
|
||||
await target.recover();
|
||||
list.push("cancel2");
|
||||
return list;
|
||||
},
|
||||
check() {
|
||||
return get.event("controls")[0];
|
||||
},
|
||||
backup(result, player) {
|
||||
return {
|
||||
audio: "mbxuetu",
|
||||
choice: result.control.includes("回复") ? 0 : 1,
|
||||
filterCard: () => false,
|
||||
selectCard: -1,
|
||||
filterTarget: true,
|
||||
async content(event, trigger, player) {
|
||||
const { choice } = get.info("mbxuetu_backup");
|
||||
const target = event.targets[0];
|
||||
const status = player.countMark("mbxuetu_status");
|
||||
player.changeZhuanhuanji("mbxuetu");
|
||||
if (status < 2) {
|
||||
if (!player.storage.mbxuetu_used) {
|
||||
player.when(["phaseUseAfter", "mbweiming_achieveAfter"]).then(() => {
|
||||
delete player.storage.mbxuetu_used;
|
||||
});
|
||||
}
|
||||
player.markAuto("mbxuetu_used", [choice]);
|
||||
if (!choice) {
|
||||
await target.recover();
|
||||
} else {
|
||||
await target.draw(2);
|
||||
}
|
||||
} else {
|
||||
if (!choice) {
|
||||
await player.recover();
|
||||
await target.chooseToDiscard(2, true, "he");
|
||||
} else {
|
||||
await player.draw();
|
||||
await target.damage();
|
||||
}
|
||||
}
|
||||
},
|
||||
ai: {
|
||||
result: {
|
||||
target(player, target) {
|
||||
const { choice } = get.info("mbxuetu_backup");
|
||||
const status = player.countMark("mbxuetu_status");
|
||||
if (status > 1) {
|
||||
if (player.storage.mbxuetu) return -get.damageEffect(target, player, player) / 10;
|
||||
return -2;
|
||||
}
|
||||
if (choice === 1) return 2;
|
||||
const eff = get.recoverEffect(target, player, player);
|
||||
return eff > 0 ? 2 : eff < 0 ? -get.sgnAttitude(player, target) : 0;
|
||||
},
|
||||
player(player, target) {
|
||||
const status = player.countMark("mbxuetu_status");
|
||||
if (status > 1) {
|
||||
if (player.storage.mbxuetu) return 1;
|
||||
return get.recoverEffect(player, player) / 6;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
prompt(result, player) {
|
||||
const { choice } = get.info("mbxuetu_backup");
|
||||
const status = player.countMark("mbxuetu_status");
|
||||
let str = "";
|
||||
if (status < 2) {
|
||||
str += "令一名角色" + (choice ? "摸两张牌" : "回复1点体力");
|
||||
} else {
|
||||
await player.loseHp();
|
||||
await target.draw(2);
|
||||
str += choice ? "摸一张牌,然后对一名角色造成1点伤害" : "回复1点体力,然后令一名角色弃置两张牌";
|
||||
}
|
||||
} else {
|
||||
if (!storage) {
|
||||
await player.recover();
|
||||
await target.chooseToDiscard(2, true, "he");
|
||||
} else {
|
||||
await player.draw();
|
||||
await target.damage();
|
||||
}
|
||||
}
|
||||
return `###血途###<div class="text center">${str}</div>`;
|
||||
},
|
||||
},
|
||||
subSkill: {
|
||||
backup: {},
|
||||
},
|
||||
mark: true,
|
||||
marktext: "☯",
|
||||
intro: {
|
||||
content: (storage, player) => {
|
||||
if (!player.countMark("mbxuetu_status")) {
|
||||
if (storage) return "转换技。出牌阶段限一次,你可以失去1点体力,然后令一名角色摸两张牌。";
|
||||
return "转换技。出牌阶段限一次,你可以弃置一张牌,然后令一名角色回复1点体力。";
|
||||
if (storage) return "转换技。出牌阶段限一次,你可以令一名角色摸两张牌。";
|
||||
return "转换技。出牌阶段限一次,你可以令一名角色回复1点体力。";
|
||||
} else {
|
||||
if (storage) return "转换技。出牌阶段限一次,你可以摸一张牌,然后对一名角色造成1点伤害。";
|
||||
return "转换技。出牌阶段限一次,你可以回复1点体力,然后令一名角色弃置两张牌。";
|
||||
|
@ -906,32 +937,7 @@ const skills = {
|
|||
return 2;
|
||||
},
|
||||
result: {
|
||||
target(player, target) {
|
||||
const status = player.countMark("mbxuetu_status");
|
||||
if (status > 1) {
|
||||
if (player.storage.mbxuetu) return -get.damageEffect(target, player, player) / 10;
|
||||
return -2;
|
||||
}
|
||||
if ((status === 0 && player.storage.mbxuetu) || (status === 1 && !ui.selected.cards.length)) return 2;
|
||||
const eff = get.recoverEffect(target, player, player);
|
||||
return eff > 0 ? 2 : eff < 0 ? -get.sgnAttitude(player, target) : 0;
|
||||
},
|
||||
player(player, target) {
|
||||
const status = player.countMark("mbxuetu_status");
|
||||
if (status > 1) {
|
||||
if (player.storage.mbxuetu) return 1;
|
||||
return get.recoverEffect(player, player) / 6;
|
||||
}
|
||||
if (status === 1 || !player.storage.mbxuetu) return -0.5;
|
||||
const eff = get.effect(player, { name: "losehp" }, player, player);
|
||||
if (eff >= 0) return Math.min(1, eff / 2);
|
||||
const hp =
|
||||
player.getHp() +
|
||||
player.countCards("hes", card => {
|
||||
return player.canSaveCard(card, player);
|
||||
});
|
||||
return -1.5 * Math.max(0, 3 - hp);
|
||||
},
|
||||
player: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -856,9 +856,9 @@ const translates = {
|
|||
jieyu_info_identity: "结束阶段,你可以从弃牌堆中获得共X张不同牌名的基本牌(X为3-你上次发动〖竭御〗至今你成为其他角色使用伤害类卡牌目标的次数,且X至少为1)。",
|
||||
yangfeng: "杨奉",
|
||||
mbxuetu: "血途",
|
||||
mbxuetu_info: "转换技。出牌阶段限一次,阴:你可以弃置一张牌,然后令一名角色回复1点体力;阳:你可以失去1点体力,然后令一名角色摸两张牌。",
|
||||
mbxuetu_info: "转换技。出牌阶段限一次,阴:你可以令一名角色回复1点体力;阳:你可以令一名角色摸两张牌。",
|
||||
mbxuetu_achieve: "血途·成功",
|
||||
mbxuetu_achieve_info: "出牌阶段各限一次。⒈你可以弃置一张牌,然后令一名角色回复1点体力;⒉你可以失去1点体力,然后令一名角色摸两张牌。",
|
||||
mbxuetu_achieve_info: "出牌阶段各限一次。⒈你可以令一名角色回复1点体力;⒉你可以令一名角色摸两张牌。",
|
||||
mbxuetu_fail: "血途·失败",
|
||||
mbxuetu_fail_info: "转换技。出牌阶段限一次,阴:你可以回复1点体力,然后令一名角色弃置两张牌;阳:你可以摸一张牌,然后对一名角色造成1点伤害。",
|
||||
mbweiming: "威命",
|
||||
|
|
|
@ -8,6 +8,7 @@ const skills = {
|
|||
enable: "phaseUse",
|
||||
usable: 1,
|
||||
filterTarget(card, player, target) {
|
||||
if (get.mode() === "identity" && target.getHp() >= player.getHp()) return false;
|
||||
return target !== player;
|
||||
},
|
||||
async content(event, trigger, player) {
|
||||
|
@ -71,10 +72,12 @@ const skills = {
|
|||
}
|
||||
game.log(card, "无视防具且不计入次数限制");
|
||||
if (!player.storage.sbxianzhen_damaged) {
|
||||
player.storage.sbxianzhen_damaged = true;
|
||||
player.storage.sbxianzhen_damaged = (player.storage.sbxianzhen_damaged || 0) + 1;
|
||||
player.when("phaseAfter").then(() => {
|
||||
delete player.storage.sbxianzhen_damaged;
|
||||
});
|
||||
}
|
||||
if (player.storage.sbxianzhen_damaged <= 2) {
|
||||
await target.damage();
|
||||
await game.asyncDelayx();
|
||||
}
|
||||
|
@ -211,6 +214,7 @@ const skills = {
|
|||
sbganglie: {
|
||||
audio: 2,
|
||||
enable: "phaseUse",
|
||||
usable: 1,
|
||||
filter(event, player) {
|
||||
if (!event.sbganglie_enabledTargets) return false;
|
||||
return game.hasPlayer(current => {
|
||||
|
@ -224,12 +228,12 @@ const skills = {
|
|||
.getAllHistory("useSkill", evt => evt.skill === "sbganglie")
|
||||
.map(evt => {
|
||||
return evt.targets;
|
||||
})
|
||||
.flat();
|
||||
const targets = player
|
||||
});
|
||||
let targets = player
|
||||
.getAllHistory("damage", evt => evt.source && evt.source.isIn())
|
||||
.map(evt => evt.source)
|
||||
.unique();
|
||||
targets = [...targets, ...targets];
|
||||
targets.removeArray(chosen);
|
||||
event.set("sbganglie_enabledTargets", targets);
|
||||
},
|
||||
|
|
|
@ -260,13 +260,14 @@ const translates = {
|
|||
sb_xiahoudun: "谋夏侯惇",
|
||||
sb_xiahoudun_prefix: "谋",
|
||||
sbganglie: "刚烈",
|
||||
sbganglie_info: "出牌阶段,你可以选择一名本局游戏对你造成过伤害且未以此法选择过的角色,你对其造成2点伤害。",
|
||||
sbganglie_info: "出牌阶段限一次。你可以选择一名本局游戏对你造成过伤害且你以此法选择过其的次数小于2的角色,你对其造成1点伤害。",
|
||||
sbqingjian: "清俭",
|
||||
sbqingjian_info: "①当有一张牌不因使用而进入弃牌堆后,若你的“清俭”数小于X,你将此牌置于你的武将牌上,称为“清俭”(X为你的体力值-1,且至少为1)。②出牌阶段结束时,你将所有“清俭”分配给任意角色。",
|
||||
sb_gaoshun: "谋高顺",
|
||||
sb_gaoshun_prefix: "谋",
|
||||
sbxianzhen: "陷阵",
|
||||
sbxianzhen_info: "出牌阶段限一次。你可以选择一名其他角色,你于本阶段获得如下效果:⒈你对其使用牌无距离限制;⒉当你使用【杀】指定其为目标后,你可以与其拼点:若你赢,此【杀】无视防具且不计入次数,且若你本回合未以此法造成过伤害,你对其造成1点伤害;若其拼点牌为【杀】,则你获得之;若其拼点牌为其最后的手牌,则此【杀】对其造成伤害时,此伤害+1。",
|
||||
sbxianzhen_info_identity: "出牌阶段限一次。你可以选择一名体力值小于你的角色,你于本阶段获得如下效果:⒈你对其使用牌无距离限制;⒉当你使用【杀】指定其为目标后,你可以与其拼点:若你赢,此【杀】无视防具且不计入次数,且若你本回合以此法对其造成的伤害小于2,你对其造成1点伤害;若其拼点牌为【杀】,则你获得之;若其拼点牌为其最后的手牌,则此【杀】对其造成伤害时,此伤害+1。",
|
||||
sbxianzhen_info: "出牌阶段限一次。你可以选择一名其他角色,你于本阶段获得如下效果:⒈你对其使用牌无距离限制;⒉当你使用【杀】指定其为目标后,你可以与其拼点:若你赢,此【杀】无视防具且不计入次数,且若你本回合以此法对其造成的伤害小于2,你对其造成1点伤害;若其拼点牌为【杀】,则你获得之;若其拼点牌为其最后的手牌,则此【杀】对其造成伤害时,此伤害+1。",
|
||||
sbjinjiu: "禁酒",
|
||||
sbjinjiu_info: "锁定技。①你的【酒】均视为【杀】。②当你受到酒【杀】的伤害时,你令此伤害减至1。③其他角色不能于你的回合内使用【酒】。④当一名其他角色的拼点牌亮出后,若你为发起者或参与者且此牌为【酒】,则此牌的点数视为A。",
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue