Merge pull request #1439 from mengxinzxz/PR-Branch
cost事件新增skill_popup属性;技能修改
This commit is contained in:
commit
e792223e08
|
@ -7091,38 +7091,46 @@ const skills = {
|
|||
bingqing: {
|
||||
audio: 2,
|
||||
trigger: { player: "useCardAfter" },
|
||||
direct: true,
|
||||
filter: function (event, player) {
|
||||
var suit = get.suit(event.card);
|
||||
filter(event, player) {
|
||||
const evt = event.getParent("phaseUse");
|
||||
if (!evt || !evt.player || evt.player != player) return false;
|
||||
const suit = get.suit(event.card);
|
||||
if (!lib.suit.includes(suit)) return false;
|
||||
var evt = event.getParent("phaseUse");
|
||||
if (!evt || player != evt.player) return false;
|
||||
var list = [],
|
||||
history = player.getHistory("useCard");
|
||||
if (history.length < 2) return false;
|
||||
for (var i of history) {
|
||||
if (i.getParent("phaseUse") != evt) continue;
|
||||
var suit2 = get.suit(i.card);
|
||||
if (!lib.suit.includes(suit2)) continue;
|
||||
if (i != event && suit2 == suit) return false;
|
||||
if (i.finished) list.add(suit2);
|
||||
}
|
||||
return list.length > 1 && list.length < 5;
|
||||
if (
|
||||
player
|
||||
.getHistory("useCard", evtx => {
|
||||
return evtx.getParent("phaseUse") == evt && get.suit(evtx.card) == suit;
|
||||
})
|
||||
.indexOf(event) != 0
|
||||
)
|
||||
return false;
|
||||
return Array.from({ length: 3 })
|
||||
.map((_, i) => i + 2)
|
||||
.includes(
|
||||
player
|
||||
.getHistory(
|
||||
"useCard",
|
||||
evtx => {
|
||||
return evtx.getParent("phaseUse") == evt && lib.suit.includes(get.suit(evtx.card));
|
||||
},
|
||||
content: function () {
|
||||
"step 0";
|
||||
var suit = get.suit(trigger.card);
|
||||
var evt = event.getParent("phaseUse");
|
||||
var list = [],
|
||||
history = player.getHistory("useCard");
|
||||
for (var i of history) {
|
||||
if (i.getParent("phaseUse") != evt) continue;
|
||||
var suit2 = get.suit(i.card);
|
||||
if (!lib.suit.includes(suit2)) continue;
|
||||
if (i.finished) list.add(suit2);
|
||||
}
|
||||
var prompt, filterTarget, ai;
|
||||
switch (list.length) {
|
||||
event
|
||||
)
|
||||
.reduce((list, evtx) => list.add(get.suit(evtx.card)), []).length
|
||||
);
|
||||
},
|
||||
async cost(event, trigger, player) {
|
||||
const evt = trigger.getParent("phaseUse");
|
||||
const num = player
|
||||
.getHistory(
|
||||
"useCard",
|
||||
evtx => {
|
||||
return evtx.getParent("phaseUse") == evt && lib.suit.includes(get.suit(evtx.card));
|
||||
},
|
||||
trigger
|
||||
)
|
||||
.reduce((list, evtx) => list.add(get.suit(evtx.card)), []).length;
|
||||
let prompt, filterTarget, ai;
|
||||
switch (num) {
|
||||
case 2:
|
||||
prompt = "令一名角色摸两张牌";
|
||||
filterTarget = function (card, player, target) {
|
||||
|
@ -7144,7 +7152,7 @@ const skills = {
|
|||
};
|
||||
ai = function (target) {
|
||||
var player = _status.event.player;
|
||||
return get.effect(target, { name: "guohe_copy" }, player, player);
|
||||
return get.effect(target, { name: "guohe" }, player, player);
|
||||
};
|
||||
break;
|
||||
case 4:
|
||||
|
@ -7158,29 +7166,30 @@ const skills = {
|
|||
};
|
||||
break;
|
||||
default:
|
||||
event.finish();
|
||||
event.result = { bool: false };
|
||||
return;
|
||||
}
|
||||
event.num = list.length;
|
||||
player.chooseTarget(get.prompt("bingqing"), prompt, filterTarget).set("ai", ai);
|
||||
"step 1";
|
||||
if (result.bool) {
|
||||
var target = result.targets[0];
|
||||
player.logSkill("bingqing", target);
|
||||
event.target = target;
|
||||
event.goto(num);
|
||||
} else event.finish();
|
||||
"step 2";
|
||||
target.draw(2);
|
||||
event.finish();
|
||||
"step 3";
|
||||
player.discardPlayerCard(target, true, "hej");
|
||||
event.finish();
|
||||
"step 4";
|
||||
target.damage();
|
||||
let result = await player.chooseTarget(get.prompt("bingqing"), prompt, filterTarget).set("ai", ai).forResult();
|
||||
result.cost_data = num;
|
||||
event.result = result;
|
||||
},
|
||||
async content(event, trigger, player) {
|
||||
const target = event.targets[0];
|
||||
switch (event.cost_data) {
|
||||
case 2:
|
||||
await target.draw(2);
|
||||
break;
|
||||
case 3:
|
||||
await player.discardPlayerCard(target, true, "hej");
|
||||
break;
|
||||
case 4:
|
||||
await target.damage();
|
||||
break;
|
||||
}
|
||||
},
|
||||
},
|
||||
yingfeng: {
|
||||
audio: 2,
|
||||
trigger: { player: "phaseZhunbeiBegin" },
|
||||
direct: true,
|
||||
content: function () {
|
||||
|
|
|
@ -541,7 +541,7 @@ const translates = {
|
|||
spqishe_info: "你可以将一张装备牌当做【酒】使用。你的手牌上限+X(X为你装备区内的牌数)。",
|
||||
sp_maojie: "毛玠",
|
||||
bingqing: "秉清",
|
||||
bingqing_info: "当你于出牌阶段内使用的牌结算结束后,若你于本阶段内使用的所有已结算结束的其他牌与此牌花色均不相同,则你可根据X的值执行对应效果:为2,你令一名角色摸两张牌;为3,你弃置一名角色区域内的一张牌;为4,你对一名其他角色造成1点伤害。(X为你本阶段内使用过的已结算结束的牌中包含的花色数)",
|
||||
bingqing_info: "当你于出牌阶段内使用的牌结算完毕后,若你于本阶段内此前使用的所有牌的花色与此牌花色均不相同,则你可根据X的值执行对应效果:为2,你令一名角色摸两张牌;为3,你弃置一名角色区域内的一张牌;为4,你对一名其他角色造成1点伤害。(X为你于本阶段内此前使用的所有牌包含的花色数+1)",
|
||||
yingfeng: "迎奉",
|
||||
yingfeng_info: "准备阶段,你可以令一名角色获得“奉”标记并移除场上所有其他的“奉”标记。有“奉”标记的角色使用牌没有距离限制。",
|
||||
xin_sunxiu: "手杀界孙休",
|
||||
|
|
|
@ -386,7 +386,13 @@ const skills = {
|
|||
trigger.increase("num");
|
||||
},
|
||||
countSkill(player) {
|
||||
//飞扬跋扈,OL你无敌了
|
||||
const list = [
|
||||
["feiyang", "飞扬"],
|
||||
["bahu", "跋扈"],
|
||||
];
|
||||
return player.getSkills(null, false, false).filter(i => {
|
||||
if (list.some(text => i.includes(text[0]) && get.translation(i) == text[1])) return true;
|
||||
const info = get.info(i);
|
||||
return !info || !info.charlotte;
|
||||
}).length;
|
||||
|
|
|
@ -1255,6 +1255,7 @@ const translates = {
|
|||
olmaozhu_info: "锁定技。①你的手牌上限和使用【杀】的额定次数+X(X为你拥有的技能数)。②当你于出牌阶段首次对技能数小于你的角色造成伤害时,此伤害+1。",
|
||||
oljinlan: "尽览",
|
||||
oljinlan_info: "出牌阶段限一次,你可以将手牌数摸至Y张(Y为场上技能数最多的角色的技能数)。",
|
||||
oljinlan_append: '<span style="font-family: yuanli"><li><span style="text-decoration: line-through;">补丁×</span>注意事项:<br>〖飞扬〗〖跋扈〗计入〖茂著〗〖尽览〗的技能数计算</span>',
|
||||
caimao: "蔡瑁",
|
||||
olzuolian: "佐练",
|
||||
olzuolian_tag: "展示牌",
|
||||
|
|
|
@ -2725,7 +2725,7 @@ export const Content = {
|
|||
if (get.itemtype(targets) === "player") {
|
||||
targets = [targets];
|
||||
}
|
||||
if (info.popup != false && !info.direct) {
|
||||
if (info.popup != false && !info.direct && !("skill_popup" in result && !Boolean(result["skill_popup"]))) {
|
||||
let popup_info = event.skill;
|
||||
if (typeof info.popup === "string") popup_info = [event.skill, info.popup];
|
||||
if (info.logLine === false) player.logSkill(popup_info, false, info.line);
|
||||
|
|
Loading…
Reference in New Issue