diff --git a/character/clan.js b/character/clan.js
index 2e209b470..c99823343 100644
--- a/character/clan.js
+++ b/character/clan.js
@@ -1162,7 +1162,7 @@ game.import("character", function () {
var num = get.cardNameLength(event.card);
return typeof num == "number" && num > 0 && player.countCards("he") > 0;
},
- async content(event, trigger, player) {
+ async cost(event, trigger, player) {
var num = get.cardNameLength(trigger.card),
str = "";
if (player.getDamagedHp() > 0)
diff --git a/character/extra.js b/character/extra.js
index bb9110785..77939c610 100755
--- a/character/extra.js
+++ b/character/extra.js
@@ -892,7 +892,7 @@ game.import("character", function () {
game.swapSeat(list[0], list[1], false);
}
}, toSwapList);
- if (trigger.name === "phase" && trigger.player !== toSortPlayers[0] && !trigger._finished) {
+ if (trigger.name === "phase" && !trigger.player.isZhu2() && trigger.player !== toSortPlayers[0] && !trigger._finished) {
trigger.finish();
trigger._triggered = 5;
const evt = toSortPlayers[0].insertPhase();
@@ -919,8 +919,9 @@ game.import("character", function () {
audio: 2,
trigger: { player: "phaseAfter" },
filter(event, player) {
- return game.hasPlayer((current) => {
- return current.countCards("h") + player.countCards("h") > 0 && player != current;
+ return game.hasPlayer(target => {
+ if(target==player||target.countCards('h')+player.countCards('h')==0) return false;
+ return get.mode()=='identity'||target.countCards('h')<=player.countCards('h')+1;
});
},
direct: true,
@@ -932,9 +933,8 @@ game.import("character", function () {
get.prompt("zhimeng"),
"与一名其他角色平分手牌",
(card, player, target) => {
- return (
- target.countCards("h") + player.countCards("h") > 0 && player != target
- );
+ if(target==player||target.countCards('h')+player.countCards('h')==0) return false;
+ return get.mode()=='identity'||target.countCards('h')<=player.countCards('h')+1;
}
)
.set("ai", (target) => {
@@ -10842,8 +10842,8 @@ game.import("character", function () {
tamo_faq_info:
"
Q:在一号位不为主公的情况下,〖榻谟〗如何结算?A:该角色可以正常进行座次交换。若受此技能影响导致一号位角色发生了变化,则以排列后的一号位角色为起始角色开始本局游戏。",
zhimeng: "智盟",
- zhimeng_info:
- "回合结束后,你可以与一名其他角色将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。",
+ zhimeng_info_identity:'回合结束后,你可以选择一名其他角色。若如此做,你与其将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。',
+ zhimeng_info:'回合结束后,你可以选择一名手牌数不大于Y的其他角色(Y为你的手牌数+1)。若如此做,你与其将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。',
shen_xuzhu: "神许褚",
shen_xuzhu_prefix: "神",
zhengqing: "争擎",
diff --git a/character/mobile.js b/character/mobile.js
index 43f2bb4fc..38dbc9102 100644
--- a/character/mobile.js
+++ b/character/mobile.js
@@ -1913,10 +1913,9 @@ game.import("character", function () {
if (name == "damageSource" && player.getHistory("sourceDamage").indexOf(event) != 0)
return false;
return game.hasPlayer((target) => {
- if (get.mode() != "doudizhu") {
- if (name == "damageEnd" && get.distance(player, target) <= 2) return false;
- if (name == "damageSource" && get.distance(player, target) > 2) return false;
- }
+ const num = (get.mode() == 'doudizhu' ? 1 : 2);
+ if (name == "damageEnd" && get.distance(player, target) <= num) return false;
+ if (name == "damageSource" && get.distance(player, target) > num) return false;
const zhoufa = player.storage.zhoulin_zhoufa;
if (!zhoufa) return true;
if (zhoufa == "豹" || zhoufa == "兔") return true;
@@ -1937,7 +1936,7 @@ game.import("character", function () {
: "令其随机执行一个效果";
const nodoudizhu =
get.mode() == "doudizhu"
- ? ""
+ ? "距离" + (event.triggername == "damageEnd" ? "" : "不") + "大于1的"
: "距离" + (event.triggername == "damageEnd" ? "" : "不") + "大于2的";
const {
result: { bool, targets },
@@ -1947,12 +1946,9 @@ game.import("character", function () {
"选择一名" + nodoudizhu + "角色," + str,
(card, player, target) => {
const name = _status.event.triggername;
- if (get.mode() != "doudizhu") {
- if (name == "damageEnd" && get.distance(player, target) <= 2)
- return false;
- if (name == "damageSource" && get.distance(player, target) > 2)
- return false;
- }
+ const num = (get.mode() == 'doudizhu' ? 1 : 2);
+ if (name == "damageEnd" && get.distance(player, target) <= num) return false;
+ if (name == "damageSource" && get.distance(player, target) > num) return false;
const zhoufa = player.storage.zhoulin_zhoufa;
if (!zhoufa) return true;
if (zhoufa == "豹" || zhoufa == "兔") return true;
@@ -20049,7 +20045,7 @@ game.import("character", function () {
},
shoufa: function (player) {
const zhoufa = player.storage.zhoulin_zhoufa;
- const nodoudizhu = get.mode() == "doudizhu" ? "" : "与你距离大于/不大于2的";
+ const nodoudizhu = get.mode() == "doudizhu" ? "与你距离大于/不大于1的" : "与你距离大于/不大于2的";
if (!zhoufa)
return (
"当你受到伤害后/于一回合首次造成伤害后,你可以选择一名" +
@@ -21163,7 +21159,7 @@ game.import("character", function () {
shoufa_info:
"当你受到伤害后/于一回合首次造成伤害后,你可以选择一名与你距离大于/不大于2的角色,令其随机执行以下一项:豹,令其受到1点无来源伤害;鹰,你随机获得其一张牌;熊,你随机弃置其装备区的一张牌;兔,令其摸一张牌。",
shoufa_info_doudizhu:
- "当你受到伤害后/于一回合首次造成伤害后,你可以选择一名角色,令其随机执行以下一项:豹,令其受到1点无来源伤害;鹰,你随机获得其一张牌;熊,你随机弃置其装备区的一张牌;兔,令其摸一张牌。",
+ "当你受到伤害后/于一回合首次造成伤害后,你可以选择一名与你距离大于/不大于1的角色,令其随机执行以下一项:豹,令其受到1点无来源伤害;鹰,你随机获得其一张牌;熊,你随机弃置其装备区的一张牌;兔,令其摸一张牌。",
yuxiang: "御象",
yuxiang_info:
"锁定技,若你有护甲值,则:①你计算与其他角色的距离-1,其他角色计算与你的距离+1;②当你受到火焰伤害时,此伤害+1。",
diff --git a/character/sb.js b/character/sb.js
index a294009df..519e02fdc 100644
--- a/character/sb.js
+++ b/character/sb.js
@@ -890,7 +890,7 @@ game.import("character", function () {
} = await player
.chooseTarget(
get.prompt("sbjieming"),
- `令一名角色摸三张牌,然后其可以弃置任意张牌。若其弃置的牌数不大于${get.cnNumber(
+ `令一名角色摸四张牌,然后其可以弃置任意张牌。若其弃置的牌数不大于${get.cnNumber(
num
)}张,你失去1点体力。`
)
@@ -921,7 +921,7 @@ game.import("character", function () {
if (!bool) return;
const target = targets[0];
player.logSkill("sbjieming", target);
- await target.draw(3);
+ await target.draw(4);
num = Math.max(1, player.getDamagedHp());
const {
result: { bool: bool2, cards },
@@ -8984,7 +8984,7 @@ game.import("character", function () {
"出牌阶段限一次。你可以选择两名有牌的其他角色,你与这些角色同时将任意张牌扣置于武将牌上。若你以此法扣置的牌唯一最少,则扣置牌最多的其他角色获得你扣置的牌,且这些角色获得各自扣置的牌;否则这两名角色中扣置牌较多的角色对较少的角色造成1点伤害,获得你扣置的牌,然后这些角色将各自扣置的牌置入弃牌堆(若这两名角色扣置的牌数相同,视为与你逆时针最近座次的角色扣置牌较多)。",
sbjieming: "节命",
sbjieming_info:
- "当你受到伤害后,你可以令一名角色摸三张牌,然后其可以弃置任意张牌。若其弃置的牌数不大于X,你失去1点体力(X为你已损失的体力值,至少为1)。",
+ "当你受到伤害后,你可以令一名角色摸四张牌,然后其可以弃置任意张牌。若其弃置的牌数不大于X,你失去1点体力(X为你已损失的体力值,至少为1)。",
sb_xiahoudun: "谋夏侯惇",
sb_xiahoudun_prefix: "谋",
sbganglie: "刚烈",
diff --git a/character/sp.js b/character/sp.js
index a20e01600..5207e11fd 100755
--- a/character/sp.js
+++ b/character/sp.js
@@ -999,7 +999,7 @@ game.import("character", function () {
list.push(
cards.reduce((sum, card) => {
const juedou = get.autoViewAs({ name: "juedou" }, [card]);
- return sum + get.effect(target, card, player, player);
+ return sum + get.effect(target, juedou, player, player);
}, 0)
);
}
@@ -1030,7 +1030,7 @@ game.import("character", function () {
})
.reduce((num, card) => {
const juedou = get.autoViewAs({ name: "juedou" }, [card]);
- return num + get.effect(player, card, source, player);
+ return num + get.effect(player, juedou, source, player);
}, 0);
};
return controls.sort(
diff --git a/character/sp2.js b/character/sp2.js
index 13678a495..de3e006b4 100644
--- a/character/sp2.js
+++ b/character/sp2.js
@@ -2448,7 +2448,7 @@ game.import("character", function () {
} = await player.chooseButton(dialog, true).set("ai", (button) => {
const player = get.event("player"),
target = get.event().getParent().targets[0];
- return get.value(card, player) * get.value(card, target) * (1 + Math.random());
+ return get.value(button.link, player) * get.value(button.link, target) * (1 + Math.random());
});
if (bool) {
await player.gain(links, target, "giveAuto", "bySelf");
diff --git a/noname/library/element/content.js b/noname/library/element/content.js
index 7ed9cb15c..0cd1bda8a 100644
--- a/noname/library/element/content.js
+++ b/noname/library/element/content.js
@@ -5296,6 +5296,16 @@ export const Content = {
bool: true,
links: [],
};
+ } else if (event.autochoose()) {
+ event.result = {
+ bool: true,
+ autochoose: true,
+ cards: player.getCards(event.position),
+ confirm: "ok",
+ buttons: [],
+ targets: [],
+ links: [],
+ };
} else {
if (event.isMine()) {
game.check();
diff --git a/noname/library/element/player.js b/noname/library/element/player.js
index a032847db..421247310 100644
--- a/noname/library/element/player.js
+++ b/noname/library/element/player.js
@@ -4522,7 +4522,9 @@ export class Player extends HTMLDivElement {
next.autochoose = function () {
if (!this.forced) return false;
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;
var num = cards.length;
for (var i = 0; i < cards.length; i++) {
if (!lib.filter.cardDiscardable(cards[i], this.player, this)) num--;
@@ -4776,6 +4778,14 @@ export class Player extends HTMLDivElement {
if (next.filterCard == undefined) next.filterCard = lib.filter.all;
if (next.selectCard == undefined) next.selectCard = [1, 1];
if (next.ai == undefined) next.ai = get.unuseful3;
+ next.autochoose = function () {
+ if (!this.forced) return false;
+ 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;
+ return get.select(this.selectCard)[0] >= this.player.countCards(this.position);
+ };
next.setContent("chooseCard");
next._args = Array.from(arguments);
return next;
diff --git a/noname/ui/create/menu/pages/otherMenu.js b/noname/ui/create/menu/pages/otherMenu.js
index a36c1c323..627c44a8b 100644
--- a/noname/ui/create/menu/pages/otherMenu.js
+++ b/noname/ui/create/menu/pages/otherMenu.js
@@ -349,7 +349,7 @@ export const otherMenu = function (/** @type { boolean | undefined } */ connectM
}
}
const str =
- versionResult > 0
+ versionResult < 0
? `有新版本${description.name}可用,是否下载?`
: `本地版本${lib.version}高于或等于github版本${description.name},是否强制下载?`;
const str2 = description.body;
@@ -454,7 +454,7 @@ export const otherMenu = function (/** @type { boolean | undefined } */ connectM
const result = await asyncFilter(files.flat(), async v => {
return game.promises.readFile(v.path).then(data => {
return v.size != data.byteLength;
- })
+ }).catch(()=>true)
}).then(arr => arr.map((v) => v.path));
console.log("需要更新的文件有:", result);