郭图、公孙渊结算调整

This commit is contained in:
Spmario233 2024-05-05 17:33:06 +08:00
parent 3da752aa0e
commit cbf59815ab
6 changed files with 89 additions and 72 deletions

View File

@ -7237,25 +7237,34 @@ const skills = {
content: function () { content: function () {
"step 0"; "step 0";
player.showHandcards(); 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.draw();
player.addTempSkill("rehuaiyi2", "phaseUseEnd"); player.addTempSkill("rehuaiyi2", "phaseUseEnd");
event.finish(); event.finish();
} }
"step 1"; "step 1";
player.chooseControl("红色", "黑色").set("ai", function () {
var player = _status.event.player; const list = [], bannedList = [], indexs = Object.keys(lib.color);
if (player.countCards("h", { color: "red" }) == 1 && player.countCards("h", { color: "black" }) > 1) return "红色"; player.getCards("h").forEach(card => {
return "黑色"; 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"; "step 2";
event.control = result.control; event.control = result.control.slice(0, result.control.length - 1);
var cards; var cards = player.getCards("h", {color: event.control});
if (event.control == "红色") {
cards = player.getCards("h", { color: "red" });
} else {
cards = player.getCards("h", { color: "black" });
}
player.discard(cards); player.discard(cards);
event.num = cards.length; event.num = cards.length;
"step 3"; "step 3";

View File

@ -677,7 +677,8 @@ const skills = {
content: "expansion", content: "expansion",
markcount: "expansion", markcount: "expansion",
mark(dialog, storage, player) { 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" }, trigger: { player: "phaseJieshuBegin" },
@ -687,29 +688,18 @@ const skills = {
const cards = player.getExpansions("olqushi_effect"); const cards = player.getExpansions("olqushi_effect");
if (cards.length) { if (cards.length) {
await player.loseToDiscardpile(cards); await player.loseToDiscardpile(cards);
const targets = player const targets = player.getStorage("olqushi_effect").filter(i => {
.getStorage("olqushi_effect") return i.isIn();
.filter(i => { }).sortBySeat();
return i.isIn(); const num = Math.min(player.getHistory("useCard", evt => {
}) return evt.targets && evt.targets.length;
.sortBySeat(); }).reduce((targets, evt) => {
const num = Math.min( targets.addArray(evt.targets);
player return targets;
.getHistory("useCard", evt => { }, []).length, 5);
return evt.targets && evt.targets.length; if (targets.length && num>0 && player.getHistory("useCard", evt => {
}) return cards.some(card => get.type2(card) == get.type2(evt.card));
.reduce((sum, evt) => { }).length) {
return sum + evt.targets.length;
}, 0),
5
);
if (
targets.length &&
player.getHistory("useCard", evt => {
return cards.some(card => get.type2(card) == get.type2(evt.card));
}).length &&
num
) {
for (const target of targets) await target.draw(num); for (const target of targets) await target.draw(num);
} }
} }

View File

@ -1218,7 +1218,7 @@ const translates = {
olchongshen_info: "你可以将本轮得到的红色手牌当作【闪】使用。", olchongshen_info: "你可以将本轮得到的红色手牌当作【闪】使用。",
guotu: "郭图", guotu: "郭图",
olqushi: "趋势", olqushi: "趋势",
olqushi_info: "出牌阶段限一次你可以摸一张牌然后将一张手牌扣置于一名其他角色的武将牌上称为“趋”。目标角色于其结束阶段移去武将牌上的所有“趋”若其于本回合使用过与“趋”相同类别的牌则你摸X张牌X为其本回合使用牌指定过的目标数之和且至多为5。", olqushi_info: "出牌阶段限一次你可以摸一张牌然后将一张手牌扣置于一名其他角色的武将牌上称为“趋”。目标角色于其结束阶段移去武将牌上的所有“趋”若其于本回合使用过与“趋”相同类别的牌则你摸X张牌X为其本回合被其使用牌指定过的角色数总和且至多为5。",
olweijie: "诿解", olweijie: "诿解",
olweijie_info: "回合外每名角色的回合限一次当你需要使用或打出一张基本牌时你可以弃置距离为1的一名角色的一张手牌若此牌牌名与你需要使用或打出的牌的牌名相同则视为你使用或打出之。", olweijie_info: "回合外每名角色的回合限一次当你需要使用或打出一张基本牌时你可以弃置距离为1的一名角色的一张手牌若此牌牌名与你需要使用或打出的牌的牌名相同则视为你使用或打出之。",
liupan: "刘磐", liupan: "刘磐",

View File

@ -8374,25 +8374,36 @@ const skills = {
usable: 1, usable: 1,
delay: false, delay: false,
filter: function (event, player) { filter: function (event, player) {
return player.countCards("h", { color: "red" }) && player.countCards("h", { color: "black" }); return player.countCards("h") > 0;
}, },
content: function () { content: function () {
"step 0"; "step 0";
player.showHandcards(); player.showHandcards();
"step 1"; const hs = player.getCards("h"), color = get.color(hs[0], player);
player.chooseControl("红色", "黑色").set("ai", function () { if (hs.length === 1 || !hs.some((card,index) => {
var player = _status.event.player; return index > 0 && get.color(card) !== color;
if (player.countCards("h", { color: "red" }) == 1 && player.countCards("h", { color: "black" }) > 1) return "红色"; })) {
return "黑色"; event.finish();
});
"step 2";
event.control = result.control;
var cards;
if (event.control == "红色") {
cards = player.getCards("h", { color: "red" });
} else {
cards = player.getCards("h", { color: "black" });
} }
"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); player.discard(cards);
event.num = cards.length; event.num = cards.length;
"step 3"; "step 3";
@ -8431,7 +8442,10 @@ const skills = {
return 1; return 1;
}, },
result: { result: {
player: 1, player:(player) => {
if (get.color(player.getCards("h")) != "none") return 0;
return 1;
},
}, },
}, },
}, },

View File

@ -6475,30 +6475,32 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
delay: false, delay: false,
content: function () { content: function () {
"step 0"; "step 0";
var map = {};
player.showHandcards(); player.showHandcards();
for (var i of ["red", "black", "none"]) { var hs = player.getCards("h"), color = get.color(hs[0], player);
if (player.countCards("h", { color: i })) map[i] = true; 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"; "step 1";
var mapx = { red: "红色", black: "黑色", none: "无色" }; const list = [], bannedList = [], indexs = Object.keys(lib.color);
player player.getCards("h").forEach(card => {
.chooseControl(Object.keys(event.map).map((color) => mapx[color])) const color = get.color(card, player);
.set("ai", function () { list.add(color);
var list = _status.event.controls; if (!lib.filter.cardDiscardable(card, player, "gzrehuaiyi")) bannedList.add(color);
var map = { 红色: "red", 黑色: "black", 无色: "none" }; });
return list.sort( list.removeArray(bannedList);
(a, b) => list.sort((a, b) => indexs.indexOf(a) - indexs.indexOf(b));
player.countCards("h", { color: map[a] }) - if (!list.length) event.finish();
player.countCards("h", { color: map[b] }) else if(list.length === 1) event._result = {control: list[0]};
)[0]; else player.chooseControl(list.map(i => `${i}2`)).set("ai", function () {
}) var player = _status.event.player;
.set("prompt", "怀异:弃置一种颜色的所有牌"); if (player.countCards("h", { color: "red" }) == 1 && player.countCards("h", { color: "black" }) > 1) return 1;
return 0;
}).set("prompt", "请选择弃置一种颜色的所有手牌");
"step 2"; "step 2";
var map = { 红色: "red", 黑色: "black", 无色: "none" }; event.control = result.control.slice(0, result.control.length - 1);
var cards = player.getCards("h", { color: map[result.control] }); var cards = player.getCards("h", {color: event.control});
player.discard(cards); player.discard(cards);
event.num = cards.length; event.num = cards.length;
"step 3"; "step 3";

View File

@ -9318,6 +9318,8 @@ export class Library {
none2: "无色", none2: "无色",
red: "红色", red: "红色",
black: "黑色", black: "黑色",
red2: "红色",
black2: "黑色",
ok: "确定", ok: "确定",
ok2: "确定", ok2: "确定",
cancel: "取消", cancel: "取消",