Merge pull request #1238 from PZ157/PR-Branch
filterCard传参修复,部分武将技能bug修复
This commit is contained in:
commit
6c9b0186ef
|
@ -755,9 +755,18 @@ game.import("character", function () {
|
|||
changeSeat: true,
|
||||
derivation: "tamo_faq",
|
||||
async content(event, trigger, player) {
|
||||
const toSortPlayers = game.filterPlayer((current) => !current.isZhu2());
|
||||
const toSortPlayers = game.filterPlayer((current) => {
|
||||
return (
|
||||
!current.isZhu2() ||
|
||||
get.mode() == "doudizhu" && current.getSeatNum() == 3
|
||||
);
|
||||
});
|
||||
toSortPlayers.sortBySeat(game.findPlayer2((current) => current.getSeatNum() == 1, true));
|
||||
const next = player.chooseToMove("榻谟:是否分配所有角色的座次?");
|
||||
const next = player.chooseToMove("榻谟:是否分配" +
|
||||
(game.countPlayer() > toSortPlayers.length ?
|
||||
"除主公" + (get.mode() == "doudizhu" ? "和三号位外" : "外") : "") +
|
||||
"所有角色的座次?"
|
||||
);
|
||||
next.set("list", [
|
||||
[
|
||||
"(以下排列的顺序即为发动技能后角色的座次顺序)",
|
||||
|
@ -1638,8 +1647,7 @@ game.import("character", function () {
|
|||
var bodies = _status.event.player
|
||||
.getStorage("jxzhaoluan_effect")
|
||||
.filter((i) => i.isIn());
|
||||
return `选择一名角色,你令${get.translation(bodies)}${
|
||||
bodies.length > 1 ? "中的一人" : ""
|
||||
return `选择一名角色,你令${get.translation(bodies)}${bodies.length > 1 ? "中的一人" : ""
|
||||
}减1点体力上限,然后你对选择的角色造成1点伤害。`;
|
||||
},
|
||||
delay: false,
|
||||
|
@ -1835,8 +1843,7 @@ game.import("character", function () {
|
|||
`<div class="text" data-nature=${get.groupnature(
|
||||
info[1],
|
||||
"raw"
|
||||
)}m style="font-family: ${
|
||||
lib.config.name_font || "xinwei"
|
||||
)}m style="font-family: ${lib.config.name_font || "xinwei"
|
||||
},xinwei">${skillstr}</div>`,
|
||||
node
|
||||
);
|
||||
|
@ -10838,6 +10845,8 @@ game.import("character", function () {
|
|||
tamo: "榻谟",
|
||||
tamo_info:
|
||||
"游戏开始时,你可以重新分配除主公外所有角色的座次。",
|
||||
tamo_info_doudizhu:
|
||||
"游戏开始时,你可以重新分配除主公和三号位外所有角色的座次。",
|
||||
tamo_faq: "FAQ",
|
||||
tamo_faq_info:
|
||||
"<br><li>Q:在一号位不为主公的情况下,〖榻谟〗如何结算?</li><li>A:该角色可以正常进行座次交换。若受此技能影响导致一号位角色发生了变化,则以排列后的一号位角色为起始角色开始本局游戏。</li>",
|
||||
|
|
|
@ -604,7 +604,7 @@ game.import("character", function () {
|
|||
usable: 1,
|
||||
zhuanhuanji: true,
|
||||
filterTarget(card, player, target) {
|
||||
if (player.storage.mbzuoyou) return target.countCards("h");
|
||||
if (player.storage.mbzuoyou) return target.countCards("h") >= 2;
|
||||
return true;
|
||||
},
|
||||
async content(event, trigger, player) {
|
||||
|
@ -612,12 +612,13 @@ game.import("character", function () {
|
|||
target = event.target;
|
||||
if (event.name === "mbzuoyou") player.changeZhuanhuanji("mbzuoyou");
|
||||
if (!storage) {
|
||||
await target.draw(3);
|
||||
await target.chooseToDiscard(2, true, "he");
|
||||
await target.draw(2);
|
||||
await target.chooseToDiscard(1, true, "h");
|
||||
} else {
|
||||
await target.chooseToDiscard(
|
||||
target === player ? "佐佑" : `${get.translation(player)}对你发动了【佐佑】`,
|
||||
"请弃置一张手牌,然后获得1点护甲",
|
||||
"请弃置两张手牌,然后获得1点护甲",
|
||||
2,
|
||||
true
|
||||
);
|
||||
await target.changeHujia(1, null, true);
|
||||
|
@ -628,8 +629,8 @@ game.import("character", function () {
|
|||
intro: {
|
||||
content(storage, player) {
|
||||
if (!storage)
|
||||
return "转换技。出牌阶段限一次,你可以令一名角色摸三张牌,然后其弃置两张牌。";
|
||||
return "转换技。出牌阶段限一次,你可以令一名角色弃置一张手牌,然后其获得1点护甲。";
|
||||
return "转换技。出牌阶段限一次,你可以令一名角色摸两张牌,然后其弃置一张手牌。";
|
||||
return "转换技。出牌阶段限一次,你可以令一名手牌数不少于二的角色弃置两张手牌,然后其获得1点护甲。";
|
||||
},
|
||||
},
|
||||
ai: {
|
||||
|
@ -21192,7 +21193,7 @@ game.import("character", function () {
|
|||
lizhaojiaobo: "李昭焦伯",
|
||||
mbzuoyou: "佐佑",
|
||||
mbzuoyou_info:
|
||||
"转换技。出牌阶段限一次,阴:你可以令一名角色摸三张牌,然后其弃置两张牌;阳:你可以令一名角色弃置一张手牌,然后其获得1点护甲。",
|
||||
"转换技。出牌阶段限一次,阴:你可以令一名角色摸两张牌,然后其弃置一张手牌;阳:你可以令一名手牌数不少于二的角色弃置两张手牌,然后其获得1点护甲。",
|
||||
mbshishou: "侍守",
|
||||
mbshishou_info:
|
||||
"锁定技。当你发动〖佐佑〗后,若目标角色不为你,你执行〖佐佑〗中目标角色未执行的一项。",
|
||||
|
|
|
@ -6134,8 +6134,10 @@ game.import("character", function () {
|
|||
}
|
||||
},
|
||||
ai: {
|
||||
halfneg: true,
|
||||
directHit_ai: true,
|
||||
skillTagFilter: function (player, tag, arg) {
|
||||
if (tag === "directHit_ai") return;
|
||||
if (
|
||||
arg.card.name != "sha" ||
|
||||
!arg.target.hasSex("female") ||
|
||||
|
|
|
@ -1005,7 +1005,7 @@ game.import("character", function () {
|
|||
}
|
||||
return list;
|
||||
}, []);
|
||||
return Math[att > 0 ? "max" : "min"].apply(Math, list);
|
||||
return Math[att > 0 ? "max" : "min"].apply(Math, effs);
|
||||
})
|
||||
.forResult();
|
||||
},
|
||||
|
|
|
@ -4306,6 +4306,9 @@ game.import("character", function () {
|
|||
content: function () {
|
||||
lib.skill.dcluoyan.init(player, "dcluoyan");
|
||||
},
|
||||
ai: {
|
||||
combo: "dcxingwu"
|
||||
},
|
||||
},
|
||||
retianxiang_daxiaoqiao: {
|
||||
audio: "tianxiang_daxiaoqiao",
|
||||
|
|
|
@ -4524,7 +4524,7 @@ export class Player extends HTMLDivElement {
|
|||
if (typeof this.selectCard == "function") return false;
|
||||
if (this.complexCard || this.complexSelect || this.filterOk) return false;
|
||||
var cards = this.player.getCards(this.position);
|
||||
if (cards.some(card => !this.filterCard(card, this))) return false;
|
||||
if (cards.some(card => !this.filterCard(card, this.player))) return false;
|
||||
var num = cards.length;
|
||||
for (var i = 0; i < cards.length; i++) {
|
||||
if (!lib.filter.cardDiscardable(cards[i], this.player, this)) num--;
|
||||
|
@ -4783,7 +4783,7 @@ export class Player extends HTMLDivElement {
|
|||
if (typeof this.selectCard == "function") return false;
|
||||
if (this.complexCard || this.complexSelect || this.filterOk) return false;
|
||||
var cards = this.player.getCards(this.position);
|
||||
if (cards.some(card => !this.filterCard(card, this))) return false;
|
||||
if (cards.some(card => !this.filterCard(card, this.player))) return false;
|
||||
return get.select(this.selectCard)[0] >= this.player.countCards(this.position);
|
||||
};
|
||||
next.setContent("chooseCard");
|
||||
|
|
Loading…
Reference in New Issue