From 9dac08db95a218054ac4f5bcafd66f98d7c9569a Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 31 May 2024 23:31:37 +0800
Subject: [PATCH] =?UTF-8?q?OL=E8=92=8B=E7=90=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
character/shiji/characterReplace.js | 1 +
character/shiji/translate.js | 3 +-
character/sp/character.js | 1 +
character/sp/dynamicTranslate.js | 4 +
character/sp/skill.js | 153 ++++++++++++++++++++++++++++
character/sp/translate.js | 5 +
noname/ui/create/index.js | 2 +-
7 files changed, 167 insertions(+), 2 deletions(-)
diff --git a/character/shiji/characterReplace.js b/character/shiji/characterReplace.js
index a5aaae82f..7467d7f29 100644
--- a/character/shiji/characterReplace.js
+++ b/character/shiji/characterReplace.js
@@ -21,6 +21,7 @@ const characterReplaces = {
sp_jiangqing: ["sp_jiangqing", "tw_jiangqing", "jiangqing"],
kongrong: ["dc_kongrong", "sp_kongrong", "jsrg_kongrong", "kongrong"],
dc_mifuren: ["dc_mifuren", "sp_mifuren"],
+ sp_jiangwan: ["ol_jiangwan", "sp_jiangwan"],
};
export default characterReplaces;
diff --git a/character/shiji/translate.js b/character/shiji/translate.js
index 910a8b8ef..6a9660c28 100644
--- a/character/shiji/translate.js
+++ b/character/shiji/translate.js
@@ -281,7 +281,8 @@ const translates = {
spdifei_info: "锁定技。每回合限一次,当你受到伤害后,你摸一张牌或弃置一张手牌,然后展示所有手牌。若此伤害的渠道为没有花色的牌或你的手牌中没有与此牌花色相同的牌,则你回复1点体力。",
spyanjiao: "严教",
spyanjiao_info: "出牌阶段限一次。你可以将手牌中一种花色的所有牌交给一名其他角色,对其造成1点伤害。然后你于自己的下回合开始时摸等量的牌。",
- sp_jiangwan: "蒋琬",
+ sp_jiangwan: "手杀蒋琬",
+ sp_jiangwan_prefix: "手杀",
spzhenting: "镇庭",
spzhenting_info: "每回合限一次。当你攻击范围内的角色成为【杀】或延时锦囊的目标时,若你不是此牌的使用者且不是此牌的目标,则你可以将此目标改为自己。然后你选择一项:①弃置使用者的一张手牌。②摸一张牌。",
spjincui: "尽瘁",
diff --git a/character/sp/character.js b/character/sp/character.js
index a1fb3bd07..77719f7d1 100644
--- a/character/sp/character.js
+++ b/character/sp/character.js
@@ -1,4 +1,5 @@
const characters = {
+ ol_jiangwan: ["male", "shu", 3, ["olziruo", "olxvfa"]],
caimao: ["male", "wei", 4, ["olzuolian", "oljingzhou"]],
ol_peixiu: ["male", "wei", 4, ["olmaozhu", "oljinlan"]],
yadan: ["male", "qun", 4, ["olqingya", "oltielun"]],
diff --git a/character/sp/dynamicTranslate.js b/character/sp/dynamicTranslate.js
index 4b0d4db01..f15947b4d 100644
--- a/character/sp/dynamicTranslate.js
+++ b/character/sp/dynamicTranslate.js
@@ -87,5 +87,9 @@ const dynamicTranslates = {
if (player.storage.olxuanzhu) return '转换技,每回合限一次,你可以将一张牌称为“玄”置于武将牌上,然后视为使用:阴,任意基本牌;阳,任意普通锦囊牌(须指定目标且仅指定一个目标)。若此次置于武将牌上的“玄”:不为装备牌,你弃置一张牌;为装备牌,你将所有“玄”置入弃牌堆,然后摸等量的牌。';
return '转换技,每回合限一次,你可以将一张牌称为“玄”置于武将牌上,然后视为使用:阴,任意基本牌;阳,任意普通锦囊牌(须指定目标且仅指定一个目标)。若此次置于武将牌上的“玄”:不为装备牌,你弃置一张牌;为装备牌,你将所有“玄”置入弃牌堆,然后摸等量的牌。';
},
+ olziruo(player){
+ if (player.storage.olziruo) return '转换技,锁定技。①你不能整理手牌。②当你使用最{阴:左;阳:右}侧的手牌时,你摸一张牌。';
+ return '转换技,锁定技。①你不能整理手牌。②当你使用最{阴:左;阳:右}侧的手牌时,你摸一张牌。';
+ },
};
export default dynamicTranslates;
diff --git a/character/sp/skill.js b/character/sp/skill.js
index 4f4757ef1..d8d2bd827 100644
--- a/character/sp/skill.js
+++ b/character/sp/skill.js
@@ -2,6 +2,159 @@ import { lib, game, ui, get, ai, _status } from "../../noname.js";
/** @type { importCharacterConfig['skill'] } */
const skills = {
+ //蒋济
+ olziruo: {
+ audio: 2,
+ trigger: { player: "useCard" },
+ filter(event, player) {
+ if (!event.olziruo || !event.olziruo[player.playerid]) return false;
+ return event.olziruo[player.playerid][Boolean(player.storage.olziruo) ? 1 : 0];
+ },
+ forced: true,
+ async content(event, trigger, player) {
+ player.changeZhuanhuanji("olziruo");
+ await player.draw();
+ },
+ mark: true,
+ marktext: "☯",
+ zhuanhuanji: true,
+ intro: { content: storage => "当你使用最" + (storage ? "右" : "左") + "边的卡牌时,你摸一张牌,且本回合你不能整理手牌" },
+ global: "olziruo_mark",
+ ai: { noSortCard: true },
+ subSkill: {
+ mark: {
+ charlotte: true,
+ trigger: { player: "useCardBegin" },
+ filter(event, player) {
+ const cards = player.getCards("h");
+ if (!cards.length) return false;
+ return (event.cards || []).some(card => cards[0] == card || cards[cards.length - 1] == card);
+ },
+ forced: true,
+ popup: false,
+ content() {
+ const cards = player.getCards("h");
+ if (!trigger.olziruo) trigger.olziruo = {};
+ trigger.olziruo[player.playerid] = [trigger.cards.some(card => cards[0] == card), trigger.cards.some(card => cards[cards.length - 1] == card)];
+ },
+ },
+ },
+ },
+ olxvfa: {
+ audio: 2,
+ enable: "phaseUse",
+ filter(event, player) {
+ return (!player.hasSkill("olxvfa_0") && player.countCards("h")) || (!player.hasSkill("olxvfa_1") && player.getExpansions("olxvfa").length);
+ },
+ chooseButton: {
+ dialog(_, player) {
+ let dialog = ui.create.dialog("蓄发:请选择一项", "hidden");
+ const list = [
+ ["0", "将至少一半手牌称为“蓄发”置于武将牌上(向上取整)"],
+ ["1", "移去一半“蓄发”牌(向上取整)"],
+ ].filter(listx => {
+ if (listx[0] == "0") return !player.hasSkill("olxvfa_0") && player.countCards("h");
+ return !player.hasSkill("olxvfa_1") && player.getExpansions("olxvfa").length;
+ });
+ dialog.add([list, "textbutton"]);
+ if (list.length == 1) dialog.direct = true;
+ return dialog;
+ },
+ filter(button, player) {
+ if (button.link == "0") return !player.hasSkill("olxvfa_0") && player.countCards("h");
+ return !player.hasSkill("olxvfa_1") && player.getExpansions("olxvfa").length;
+ },
+ check: () => 1 + Math.random(),
+ backup: links => get.copy(lib.skill["olxvfa_" + ["put", "remove"][parseInt(links[0])]]),
+ prompt(links) {
+ if (links[0] == "0") return "###蓄发###将至少一半手牌称为“蓄发”置于武将牌上(向上取整)";
+ return "###蓄发###移去一半“蓄发”牌(向上取整)";
+ },
+ },
+ intro: {
+ content: "expansion",
+ markcount: "expansion",
+ },
+ onremove(player, skill) {
+ const cards = player.getExpansions(skill);
+ if (cards.length) player.loseToDiscardpile(cards);
+ },
+ subSkill: {
+ backup: {},
+ 0: { charlotte: true },
+ 1: { charlotte: true },
+ put: {
+ audio: "olxvfa",
+ filterCard: true,
+ selectCard: () => [Math.ceil(get.event("player").countCards("h") / 2), Infinity],
+ position: "h",
+ check(card) {
+ const player = get.event("player"),
+ value = player.getUseValue(card, true);
+ if (value > 0) return get.type(card) == "trick" ? 20 + value : 0;
+ return 15 - get.value(card) - get.useful(card);
+ },
+ lose: false,
+ discard: false,
+ delay: 0,
+ content() {
+ player.addTempSkill("olxvfa_effect");
+ player.addTempSkill("olxvfa_0", "phaseUseAfter");
+ player.addToExpansion(cards, player, "give").gaintag.add("olxvfa");
+ },
+ },
+ remove: {
+ audio: "olxvfa",
+ filterCard: () => false,
+ selectCard: -1,
+ async content(event, trigger, player) {
+ player.addTempSkill("olxvfa_effect");
+ player.addTempSkill("olxvfa_1", "phaseUseAfter");
+ const cards = player.getExpansions("olxvfa"),
+ num = Math.ceil(cards.length / 2);
+ const result = await player
+ .chooseButton(["蓄发:请移去至少" + get.cnNumber(num) + "张“蓄发”牌", cards], [num, Infinity], true)
+ .set("ai", button => {
+ const player = get.event("player"),
+ value = player.getUseValue(button.link, true);
+ if (value > 0 && get.type(button.link) == "trick") return 0;
+ return 1 / (get.useful(button.link) || 0.5);
+ })
+ .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) {
+ const card = result.links[0];
+ await player.chooseUseTarget({ name: card.name, isCard: true }, true, false);
+ }
+ },
+ },
+ },
+ },
//蔡瑁
olzuolian: {
audio: 2,
diff --git a/character/sp/translate.js b/character/sp/translate.js
index c3c642281..aa4c46bf9 100644
--- a/character/sp/translate.js
+++ b/character/sp/translate.js
@@ -1261,6 +1261,11 @@ const translates = {
olzuolian_info: "出牌阶段限一次,你可以选择至多X名有牌的角色(X为你的体力值),你随机展示这些角色的各一张牌,然后你可以将这些牌与牌堆和弃牌堆中的属性【杀】进行交换。",
oljingzhou: "精舟",
oljingzhou_info: "当你受到伤害时,你可以选择至多X名角色(X为你的体力值)这些角色中处于/未处于连环状态的角色重置/横置武将牌。",
+ ol_jiangwan:'蒋琬',
+ olziruo:'自若',
+ olziruo_info:'转换技,锁定技。①你不能整理手牌。②当你使用最{阴:左;阳:右}侧的手牌时,你摸一张牌。',
+ olxvfa:'蓄发',
+ olxvfa_info:'出牌阶段各限一次:①将至少一半手牌称为“蓄发”置于武将牌上(向上取整);②你可以移去一半“蓄发”牌(向上取整)。然后你可以视为使用“蓄发”牌中的一张普通锦囊牌。',
};
export default translates;
diff --git a/noname/ui/create/index.js b/noname/ui/create/index.js
index d7b4c4258..a837b0a0e 100644
--- a/noname/ui/create/index.js
+++ b/noname/ui/create/index.js
@@ -2770,7 +2770,7 @@ export class Create {
// }
ui.sortCard = ui.create.system("整理手牌", function () {
- if (!game.me) return;
+ if (!game.me || game.me.hasSkillTag("noSortCard")) return;
var hs = game.me.getCards("h");
if (!hs.length) return;
game.addVideo("lose", game.me, [get.cardsInfo(hs), [], [], []]);