蒋琬【蓄发】二效果调整+其他fix
This commit is contained in:
parent
d487cb1ba3
commit
72c17ed5d9
|
@ -21,6 +21,14 @@ const skills = {
|
||||||
intro: { content: storage => "当你使用最" + (storage ? "右" : "左") + "侧的卡牌时,你摸一张牌" },
|
intro: { content: storage => "当你使用最" + (storage ? "右" : "左") + "侧的卡牌时,你摸一张牌" },
|
||||||
global: "olziruo_mark",
|
global: "olziruo_mark",
|
||||||
ai: { noSortCard: true },
|
ai: { noSortCard: true },
|
||||||
|
mod: {
|
||||||
|
aiOrder(player, card, num) {
|
||||||
|
if (typeof card == "object") {
|
||||||
|
const cards = player.getCards("h");
|
||||||
|
if (cards.indexOf(card) == (player.storage.olziruo ? cards.length - 1 : 0)) return num + 10;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
subSkill: {
|
subSkill: {
|
||||||
mark: {
|
mark: {
|
||||||
charlotte: true,
|
charlotte: true,
|
||||||
|
@ -50,8 +58,8 @@ const skills = {
|
||||||
dialog(_, player) {
|
dialog(_, player) {
|
||||||
let dialog = ui.create.dialog("蓄发:请选择一项", "hidden");
|
let dialog = ui.create.dialog("蓄发:请选择一项", "hidden");
|
||||||
const list = [
|
const list = [
|
||||||
["0", "将至少一半手牌称为“蓄发”置于武将牌上(向上取整)"],
|
["0", "将至少一半手牌称为“蓄发”置于武将牌上(向上取整),然后可以视为使用“蓄发”牌中的一张普通锦囊牌"],
|
||||||
["1", "移去一半“蓄发”牌(向上取整)"],
|
["1", "移去一半“蓄发”牌(向上取整),然后可以视为使用其中一张普通锦囊牌"],
|
||||||
].filter(listx => {
|
].filter(listx => {
|
||||||
if (listx[0] == "0") return !player.hasSkill("olxvfa_0") && player.countCards("h");
|
if (listx[0] == "0") return !player.hasSkill("olxvfa_0") && player.countCards("h");
|
||||||
return !player.hasSkill("olxvfa_1") && player.getExpansions("olxvfa").length;
|
return !player.hasSkill("olxvfa_1") && player.getExpansions("olxvfa").length;
|
||||||
|
@ -67,8 +75,8 @@ const skills = {
|
||||||
check: () => 1 + Math.random(),
|
check: () => 1 + Math.random(),
|
||||||
backup: links => get.copy(lib.skill["olxvfa_" + ["put", "remove"][parseInt(links[0])]]),
|
backup: links => get.copy(lib.skill["olxvfa_" + ["put", "remove"][parseInt(links[0])]]),
|
||||||
prompt(links) {
|
prompt(links) {
|
||||||
if (links[0] == "0") return "###蓄发###将至少一半手牌称为“蓄发”置于武将牌上(向上取整)";
|
if (links[0] == "0") return "###蓄发###将至少一半手牌称为“蓄发”置于武将牌上(向上取整),然后可以视为使用“蓄发”牌中的一张普通锦囊牌";
|
||||||
return "###蓄发###移去一半“蓄发”牌(向上取整)";
|
return "###蓄发###移去一半“蓄发”牌(向上取整),然后可以视为使用其中一张普通锦囊牌";
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
intro: {
|
intro: {
|
||||||
|
@ -97,18 +105,37 @@ const skills = {
|
||||||
lose: false,
|
lose: false,
|
||||||
discard: false,
|
discard: false,
|
||||||
delay: 0,
|
delay: 0,
|
||||||
content() {
|
async content(event, trigger, player) {
|
||||||
player.addTempSkill("olxvfa_effect");
|
|
||||||
player.addTempSkill("olxvfa_0", "phaseUseAfter");
|
player.addTempSkill("olxvfa_0", "phaseUseAfter");
|
||||||
player.addToExpansion(cards, player, "give").gaintag.add("olxvfa");
|
await player.addToExpansion(event.cards, player, "give").set("gaintag", ["olxvfa"]);
|
||||||
|
const cards = player.getExpansions("olxvfa");
|
||||||
|
if (cards.some(card => get.type(card) == "trick" && player.hasUseTarget({ name: card.name, isCard: true }, true))) {
|
||||||
|
const result = await player
|
||||||
|
.chooseButton(["蓄发:是否视为使用一张“蓄发”牌?", cards])
|
||||||
|
.set("filterButton", button => {
|
||||||
|
const player = get.event("player"),
|
||||||
|
card = button.link;
|
||||||
|
return get.type(card) == "trick" && player.hasUseTarget({ name: card.name, isCard: true }, true);
|
||||||
|
})
|
||||||
|
.set("ai", button => {
|
||||||
|
const player = get.event("player"),
|
||||||
|
card = button.link;
|
||||||
|
return player.getUseValue({ name: card.name, isCard: true }, true);
|
||||||
|
})
|
||||||
|
.forResult();
|
||||||
|
if (result.bool) {
|
||||||
|
const card = result.links[0];
|
||||||
|
await player.chooseUseTarget({ name: card.name, isCard: true }, true, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
remove: {
|
remove: {
|
||||||
audio: "olxvfa",
|
audio: "olxvfa",
|
||||||
filterCard: () => false,
|
filterCard: () => false,
|
||||||
selectCard: -1,
|
selectCard: -1,
|
||||||
|
delay: 0,
|
||||||
async content(event, trigger, player) {
|
async content(event, trigger, player) {
|
||||||
player.addTempSkill("olxvfa_effect");
|
|
||||||
player.addTempSkill("olxvfa_1", "phaseUseAfter");
|
player.addTempSkill("olxvfa_1", "phaseUseAfter");
|
||||||
const cards = player.getExpansions("olxvfa"),
|
const cards = player.getExpansions("olxvfa"),
|
||||||
num = Math.ceil(cards.length / 2);
|
num = Math.ceil(cards.length / 2);
|
||||||
|
@ -117,39 +144,40 @@ const skills = {
|
||||||
.set("ai", button => {
|
.set("ai", button => {
|
||||||
const player = get.event("player"),
|
const player = get.event("player"),
|
||||||
value = player.getUseValue(button.link, true);
|
value = player.getUseValue(button.link, true);
|
||||||
if (value > 0 && get.type(button.link) == "trick") return 0;
|
if (value > 0 && get.type(button.link) == "trick") {
|
||||||
|
if (
|
||||||
|
!ui.selected.buttons.some(but => {
|
||||||
|
return get.type(but.link) == "trick" && player.getUseValue(but.link, true) > 0;
|
||||||
|
})
|
||||||
|
)
|
||||||
|
return 20 + value;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return 1 / (get.useful(button.link) || 0.5);
|
return 1 / (get.useful(button.link) || 0.5);
|
||||||
})
|
})
|
||||||
.forResult();
|
.forResult();
|
||||||
if (result.bool) await player.loseToDiscardpile(result.links);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
effect: {
|
|
||||||
charlotte: true,
|
|
||||||
trigger: { player: "olxvfa_backupAfter" },
|
|
||||||
filter(event, player) {
|
|
||||||
return player.getExpansions("olxvfa").some(card => get.type(card) == "trick" && player.hasUseTarget({ name: card.name, isCard: true }, true));
|
|
||||||
},
|
|
||||||
forced: true,
|
|
||||||
popup: false,
|
|
||||||
async content(event, trigger, player) {
|
|
||||||
const cards = player.getExpansions("olxvfa");
|
|
||||||
const result = await player
|
|
||||||
.chooseButton(["蓄发:是否视为使用一张“蓄发”牌?", cards])
|
|
||||||
.set("filterButton", button => {
|
|
||||||
const player = get.event("player"),
|
|
||||||
card = button.link;
|
|
||||||
return get.type(card) == "trick" && player.hasUseTarget({ name: card.name, isCard: true }, true);
|
|
||||||
})
|
|
||||||
.set("ai", button => {
|
|
||||||
const player = get.event("player"),
|
|
||||||
card = button.link;
|
|
||||||
return player.getUseValue({ name: card.name, isCard: true }, true);
|
|
||||||
})
|
|
||||||
.forResult();
|
|
||||||
if (result.bool) {
|
if (result.bool) {
|
||||||
const card = result.links[0];
|
const cardx = result.links;
|
||||||
await player.chooseUseTarget({ name: card.name, isCard: true }, true, false);
|
await player.loseToDiscardpile(cardx);
|
||||||
|
if (cardx.some(card => get.type(card) == "trick" && player.hasUseTarget({ name: card.name, isCard: true }, true))) {
|
||||||
|
const result2 = await player
|
||||||
|
.chooseButton(["蓄发:是否视为使用一张移去的“蓄发”牌?", cardx])
|
||||||
|
.set("filterButton", button => {
|
||||||
|
const player = get.event("player"),
|
||||||
|
card = button.link;
|
||||||
|
return get.type(card) == "trick" && player.hasUseTarget({ name: card.name, isCard: true }, true);
|
||||||
|
})
|
||||||
|
.set("ai", button => {
|
||||||
|
const player = get.event("player"),
|
||||||
|
card = button.link;
|
||||||
|
return player.getUseValue({ name: card.name, isCard: true }, true);
|
||||||
|
})
|
||||||
|
.forResult();
|
||||||
|
if (result2.bool) {
|
||||||
|
const card = result2.links[0];
|
||||||
|
await player.chooseUseTarget({ name: card.name, isCard: true }, true, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -1265,7 +1265,7 @@ const translates = {
|
||||||
olziruo:'自若',
|
olziruo:'自若',
|
||||||
olziruo_info:'转换技,锁定技。①你不能整理手牌。②当你使用最{阴:左;阳:右}侧的手牌时,你摸一张牌。',
|
olziruo_info:'转换技,锁定技。①你不能整理手牌。②当你使用最{阴:左;阳:右}侧的手牌时,你摸一张牌。',
|
||||||
olxvfa:'蓄发',
|
olxvfa:'蓄发',
|
||||||
olxvfa_info:'出牌阶段各限一次,你可以:①将至少一半手牌称为“蓄发”置于武将牌上(向上取整);②移去一半“蓄发”牌(向上取整)。然后你可以视为使用“蓄发”牌中的一张普通锦囊牌。',
|
olxvfa_info:'出牌阶段各限一次,你可以:①将至少一半手牌称为“蓄发”置于武将牌上(向上取整),然后你可以视为使用“蓄发”牌中的一张普通锦囊牌;②移去一半“蓄发”牌(向上取整),然后你可以视为使用其中一张普通锦囊牌。',
|
||||||
};
|
};
|
||||||
|
|
||||||
export default translates;
|
export default translates;
|
||||||
|
|
Loading…
Reference in New Issue