郭图、公孙渊结算调整
This commit is contained in:
parent
3da752aa0e
commit
cbf59815ab
|
@ -7237,25 +7237,34 @@ const skills = {
|
|||
content: function () {
|
||||
"step 0";
|
||||
player.showHandcards();
|
||||
if (get.color(player.getCards("h")) != "none") {
|
||||
const hs = player.getCards("h"), color = get.color(hs[0], player);
|
||||
if (hs.length === 1 || !hs.some((card,index) => {
|
||||
return index > 0 && get.color(card) !== color;
|
||||
})) {
|
||||
player.draw();
|
||||
player.addTempSkill("rehuaiyi2", "phaseUseEnd");
|
||||
event.finish();
|
||||
}
|
||||
"step 1";
|
||||
player.chooseControl("红色", "黑色").set("ai", function () {
|
||||
var player = _status.event.player;
|
||||
if (player.countCards("h", { color: "red" }) == 1 && player.countCards("h", { color: "black" }) > 1) return "红色";
|
||||
return "黑色";
|
||||
|
||||
const list = [], bannedList = [], indexs = Object.keys(lib.color);
|
||||
player.getCards("h").forEach(card => {
|
||||
const color = get.color(card, player);
|
||||
list.add(color);
|
||||
if (!lib.filter.cardDiscardable(card, player, "rehuaiyi")) bannedList.add(color);
|
||||
});
|
||||
list.removeArray(bannedList);
|
||||
list.sort((a, b) => indexs.indexOf(a) - indexs.indexOf(b));
|
||||
if (!list.length) event.finish();
|
||||
else if(list.length === 1) event._result = {control: list[0]};
|
||||
else player.chooseControl(list.map(i => `${i}2`)).set("ai", function () {
|
||||
var player = _status.event.player;
|
||||
if (player.countCards("h", { color: "red" }) == 1 && player.countCards("h", { color: "black" }) > 1) return 1;
|
||||
return 0;
|
||||
}).set("prompt", "请选择弃置一种颜色的所有手牌");
|
||||
"step 2";
|
||||
event.control = result.control;
|
||||
var cards;
|
||||
if (event.control == "红色") {
|
||||
cards = player.getCards("h", { color: "red" });
|
||||
} else {
|
||||
cards = player.getCards("h", { color: "black" });
|
||||
}
|
||||
event.control = result.control.slice(0, result.control.length - 1);
|
||||
var cards = player.getCards("h", {color: event.control});
|
||||
player.discard(cards);
|
||||
event.num = cards.length;
|
||||
"step 3";
|
||||
|
|
|
@ -677,7 +677,8 @@ const skills = {
|
|||
content: "expansion",
|
||||
markcount: "expansion",
|
||||
mark(dialog, storage, player) {
|
||||
return "共扣置" + get.cnNumber(player.getExpansions("olqushi_effect").length) + "张“趋”";
|
||||
if (storage.some(source => source.isUnderControl(true))) dialog.add(player.getExpansions("olqushi_effect"));
|
||||
else return "共扣置" + get.cnNumber(player.getExpansions("olqushi_effect").length) + "张“趋”";
|
||||
},
|
||||
},
|
||||
trigger: { player: "phaseJieshuBegin" },
|
||||
|
@ -687,29 +688,18 @@ const skills = {
|
|||
const cards = player.getExpansions("olqushi_effect");
|
||||
if (cards.length) {
|
||||
await player.loseToDiscardpile(cards);
|
||||
const targets = player
|
||||
.getStorage("olqushi_effect")
|
||||
.filter(i => {
|
||||
const targets = player.getStorage("olqushi_effect").filter(i => {
|
||||
return i.isIn();
|
||||
})
|
||||
.sortBySeat();
|
||||
const num = Math.min(
|
||||
player
|
||||
.getHistory("useCard", evt => {
|
||||
}).sortBySeat();
|
||||
const num = Math.min(player.getHistory("useCard", evt => {
|
||||
return evt.targets && evt.targets.length;
|
||||
})
|
||||
.reduce((sum, evt) => {
|
||||
return sum + evt.targets.length;
|
||||
}, 0),
|
||||
5
|
||||
);
|
||||
if (
|
||||
targets.length &&
|
||||
player.getHistory("useCard", evt => {
|
||||
}).reduce((targets, evt) => {
|
||||
targets.addArray(evt.targets);
|
||||
return targets;
|
||||
}, []).length, 5);
|
||||
if (targets.length && num>0 && player.getHistory("useCard", evt => {
|
||||
return cards.some(card => get.type2(card) == get.type2(evt.card));
|
||||
}).length &&
|
||||
num
|
||||
) {
|
||||
}).length) {
|
||||
for (const target of targets) await target.draw(num);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1218,7 +1218,7 @@ const translates = {
|
|||
olchongshen_info: "你可以将本轮得到的红色手牌当作【闪】使用。",
|
||||
guotu: "郭图",
|
||||
olqushi: "趋势",
|
||||
olqushi_info: "出牌阶段限一次,你可以摸一张牌,然后将一张手牌扣置于一名其他角色的武将牌上,称为“趋”。目标角色于其结束阶段移去武将牌上的所有“趋”,若其于本回合使用过与“趋”相同类别的牌,则你摸X张牌(X为其本回合使用牌指定过的目标数之和且至多为5)。",
|
||||
olqushi_info: "出牌阶段限一次,你可以摸一张牌,然后将一张手牌扣置于一名其他角色的武将牌上,称为“趋”。目标角色于其结束阶段移去武将牌上的所有“趋”,若其于本回合使用过与“趋”相同类别的牌,则你摸X张牌(X为其本回合被其使用牌指定过的角色数总和且至多为5)。",
|
||||
olweijie: "诿解",
|
||||
olweijie_info: "回合外每名角色的回合限一次,当你需要使用或打出一张基本牌时,你可以弃置距离为1的一名角色的一张手牌,若此牌牌名与你需要使用或打出的牌的牌名相同,则视为你使用或打出之。",
|
||||
liupan: "刘磐",
|
||||
|
|
|
@ -8374,25 +8374,36 @@ const skills = {
|
|||
usable: 1,
|
||||
delay: false,
|
||||
filter: function (event, player) {
|
||||
return player.countCards("h", { color: "red" }) && player.countCards("h", { color: "black" });
|
||||
return player.countCards("h") > 0;
|
||||
},
|
||||
content: function () {
|
||||
"step 0";
|
||||
player.showHandcards();
|
||||
"step 1";
|
||||
player.chooseControl("红色", "黑色").set("ai", function () {
|
||||
var player = _status.event.player;
|
||||
if (player.countCards("h", { color: "red" }) == 1 && player.countCards("h", { color: "black" }) > 1) return "红色";
|
||||
return "黑色";
|
||||
});
|
||||
"step 2";
|
||||
event.control = result.control;
|
||||
var cards;
|
||||
if (event.control == "红色") {
|
||||
cards = player.getCards("h", { color: "red" });
|
||||
} else {
|
||||
cards = player.getCards("h", { color: "black" });
|
||||
const hs = player.getCards("h"), color = get.color(hs[0], player);
|
||||
if (hs.length === 1 || !hs.some((card,index) => {
|
||||
return index > 0 && get.color(card) !== color;
|
||||
})) {
|
||||
event.finish();
|
||||
}
|
||||
"step 1";
|
||||
const list = [], bannedList = [], indexs = Object.keys(lib.color);
|
||||
player.getCards("h").forEach(card => {
|
||||
const color = get.color(card, player);
|
||||
list.add(color);
|
||||
if (!lib.filter.cardDiscardable(card, player, "huaiyi")) bannedList.add(color);
|
||||
});
|
||||
list.removeArray(bannedList);
|
||||
list.sort((a, b) => indexs.indexOf(a) - indexs.indexOf(b));
|
||||
if (!list.length) event.finish();
|
||||
else if(list.length === 1) event._result = {control: list[0]};
|
||||
else player.chooseControl(list.map(i => `${i}2`)).set("ai", function () {
|
||||
var player = _status.event.player;
|
||||
if (player.countCards("h", { color: "red" }) == 1 && player.countCards("h", { color: "black" }) > 1) return 1;
|
||||
return 0;
|
||||
}).set("prompt", "请选择弃置一种颜色的所有手牌");
|
||||
"step 2";
|
||||
event.control = result.control.slice(0, result.control.length - 1);
|
||||
var cards = player.getCards("h", {color: event.control});
|
||||
player.discard(cards);
|
||||
event.num = cards.length;
|
||||
"step 3";
|
||||
|
@ -8431,7 +8442,10 @@ const skills = {
|
|||
return 1;
|
||||
},
|
||||
result: {
|
||||
player: 1,
|
||||
player:(player) => {
|
||||
if (get.color(player.getCards("h")) != "none") return 0;
|
||||
return 1;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -6475,30 +6475,32 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
delay: false,
|
||||
content: function () {
|
||||
"step 0";
|
||||
var map = {};
|
||||
player.showHandcards();
|
||||
for (var i of ["red", "black", "none"]) {
|
||||
if (player.countCards("h", { color: i })) map[i] = true;
|
||||
var hs = player.getCards("h"), color = get.color(hs[0], player);
|
||||
if (hs.length === 1 || !hs.some((card,index) => {
|
||||
return index > 0 && get.color(card) !== color;
|
||||
})) {
|
||||
event.finish();
|
||||
}
|
||||
if (Object.keys(map).length < 2) event.finish();
|
||||
else event.map = map;
|
||||
"step 1";
|
||||
var mapx = { red: "红色", black: "黑色", none: "无色" };
|
||||
player
|
||||
.chooseControl(Object.keys(event.map).map((color) => mapx[color]))
|
||||
.set("ai", function () {
|
||||
var list = _status.event.controls;
|
||||
var map = { 红色: "red", 黑色: "black", 无色: "none" };
|
||||
return list.sort(
|
||||
(a, b) =>
|
||||
player.countCards("h", { color: map[a] }) -
|
||||
player.countCards("h", { color: map[b] })
|
||||
)[0];
|
||||
})
|
||||
.set("prompt", "怀异:弃置一种颜色的所有牌");
|
||||
const list = [], bannedList = [], indexs = Object.keys(lib.color);
|
||||
player.getCards("h").forEach(card => {
|
||||
const color = get.color(card, player);
|
||||
list.add(color);
|
||||
if (!lib.filter.cardDiscardable(card, player, "gzrehuaiyi")) bannedList.add(color);
|
||||
});
|
||||
list.removeArray(bannedList);
|
||||
list.sort((a, b) => indexs.indexOf(a) - indexs.indexOf(b));
|
||||
if (!list.length) event.finish();
|
||||
else if(list.length === 1) event._result = {control: list[0]};
|
||||
else player.chooseControl(list.map(i => `${i}2`)).set("ai", function () {
|
||||
var player = _status.event.player;
|
||||
if (player.countCards("h", { color: "red" }) == 1 && player.countCards("h", { color: "black" }) > 1) return 1;
|
||||
return 0;
|
||||
}).set("prompt", "请选择弃置一种颜色的所有手牌");
|
||||
"step 2";
|
||||
var map = { 红色: "red", 黑色: "black", 无色: "none" };
|
||||
var cards = player.getCards("h", { color: map[result.control] });
|
||||
event.control = result.control.slice(0, result.control.length - 1);
|
||||
var cards = player.getCards("h", {color: event.control});
|
||||
player.discard(cards);
|
||||
event.num = cards.length;
|
||||
"step 3";
|
||||
|
|
|
@ -9318,6 +9318,8 @@ export class Library {
|
|||
none2: "无色",
|
||||
red: "红色",
|
||||
black: "黑色",
|
||||
red2: "红色",
|
||||
black2: "黑色",
|
||||
ok: "确定",
|
||||
ok2: "确定",
|
||||
cancel: "取消",
|
||||
|
|
Loading…
Reference in New Issue