Skip to content

bugfix&技能调整 #2822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jul 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 31 additions & 34 deletions card/huodong.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,18 +282,18 @@ game.import("card", function () {
toself: true,
modTarget: true,
async content(event, trigger, player) {
event.cards ??= [];
const cards = [];
const { target } = event;
const result = await target
.chooseControl("black", "red")
.set("prompt", `好运:选择一种颜色,然后开始判定。如果颜色为你选择的颜色,你获得此牌且重复此流程。`)
.set("ai", () => (Math.random() > 0.4 ? "black" : "red"))
.forResult();
if (result?.control) {
const color = result.control;
game.log(player, "选择了", "#y" + color);
player.popup(color);
while (true) {
while (true) {
const result = await target
.chooseControl("black", "red")
.set("prompt", `好运:选择一种颜色,然后开始判定。如果颜色为你选择的颜色,你获得此牌且重复此流程。`)
.set("ai", () => (Math.random() > 0.4 ? "black" : "red"))
.forResult();
if (result?.control) {
const color = result.control;
game.log(player, "选择了", "#y" + color);
player.popup(color);
const judgeEvent = target.judge(card => {
if (get.color(card) == get.event().haoyun_color) {
return 1.5;
Expand All @@ -302,27 +302,22 @@ game.import("card", function () {
});
judgeEvent.set("haoyun_color", color);
judgeEvent.judge2 = result => result.bool;
if (!player.hasSkillTag("rejudge")) {
judgeEvent.set("callback", async event => {
if (event.judgeResult.color == event.getParent().haoyun_color && get.position(event.card, true) == "o") {
await event.player.gain(event.card, "gain2");
}
});
} else {
judgeEvent.set("callback", async event => {
if (event.judgeResult.color == event.getParent().haoyun_color) {
event.getParent().orderingCards.remove(event.card);
}
});
}
const result = await judgeEvent.forResult();
if (result?.bool && result?.card) {
event.cards.push(result.card);
judgeEvent.set("callback", async event => {
if (event.judgeResult.color == event.getParent().haoyun_color) {
event.getParent().orderingCards.remove(event.card);
}
});
const resultx = await judgeEvent.forResult();
if (resultx?.bool && resultx?.card) {
cards.push(resultx.card);
} else {
break;
}
}
}
if (cards.length) {
await player.gain(cards, "gain2");
}
},
ai: {
wuxie(target, card, player, viewer) {
Expand Down Expand Up @@ -914,7 +909,7 @@ game.import("card", function () {
ai: {
order: 6,
useful: 1.2,
value: 8,
value: 7,
result: {
target(player, target) {
const list = [];
Expand Down Expand Up @@ -1060,12 +1055,14 @@ game.import("card", function () {
)
.set("addCount", false);*/
if (!result?.bool) {
const damage = game.filterPlayer(current => current != target).sortBySeat();
const damage = game.filterPlayer2(current => current != target).sortBySeat();
if (damage.length) {
while (damage.length && target.isIn()) {
const current = damage.shift();
current.line(target, "yellow");
await target.damage(current);
if (current.isIn()) {
current.line(target, "yellow");
await target.damage(current);
}
}
}
break;
Expand Down Expand Up @@ -1098,8 +1095,8 @@ game.import("card", function () {
async content(event, trigger, player) {
player.$skill(get.translation(event.name), null, "thunder", null, "shen_jiaxu");
await game.delayx();
const targets = game.filterPlayer(target => target != player).sortBySeat();
player.line(targets);
const targets = game.filterPlayer2(target => target != player).sortBySeat();
player.line(targets.filter(target => target.isIn()));
game.broadcastAll(event => {
if (!_status.nisiwohuo) {
_status.nisiwohuo = [];
Expand Down Expand Up @@ -1332,7 +1329,7 @@ game.import("card", function () {
ai: {
order: 7,
useful: 3.5,
value: 9,
value: 8,
tag: {
draw: 2,
},
Expand Down
2 changes: 2 additions & 0 deletions character/collab/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import { lib, game, ui, get, ai, _status } from "../../noname.js";
const cards = {
olhuaquan_heavy: {
fullskin: true,
noname: true,
},
olhuaquan_light: {
fullskin: true,
noname: true,
},
ruyijingubang: {
fullskin: true,
Expand Down
5 changes: 3 additions & 2 deletions character/collab/skill.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const skills = {
["", "", "olhuaquan_light"],
];
const result = await player
.chooseButton([`###花拳###${get.skillInfoTranslation(event.skill)}`, [list, "vcard"]], true)
.chooseButton([`###花拳###${get.skillInfoTranslation(event.name)}`, [list, "vcard"]], true)
.set("ai", button => {
const card = get.event().card;
const bool = button.link == "olhuaquan_heavy";
Expand Down Expand Up @@ -91,6 +91,7 @@ const skills = {
},
async content(event, trigger, player) {
const [target] = event.targets;
await player.draw();
target.addMark(event.name);
if (target.countMark(event.name) >= 3 && !target.hasSkill(event.name + "_debuff")) {
target.clearMark(event.name);
Expand Down Expand Up @@ -162,7 +163,7 @@ const skills = {
},
onremove(player, skill) {
delete player.storage[skill];
game.log(player, "站立了过来");
game.log("读秒结束,", player, "站立了过来");
},
marktext: "💫",
intro: {
Expand Down
4 changes: 3 additions & 1 deletion character/collab/translate.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,13 @@ const translates = {
olhuaquan: "花拳",
olhuaquan_info: "锁定技,你使用黑色牌指定其他角色后,为此牌秘密选择一个效果:1.重拳,造成的伤害+1;2.轻拳,使用后你摸一张牌。然后其他目标角色依次猜测你选择的效果。",
olhuaquan_heavy: "重拳",
olhuaquan_heavy_bg: "重拳",
olhuaquan_heavy_info: "造成的伤害+1",
olhuaquan_light: "轻拳",
olhuaquan_light_bg: "轻拳",
olhuaquan_light_info: "使用后你摸一张牌",
olsanou: "三殴",
olsanou_info: "锁定技,其他角色受到你的伤害后或猜错〖花拳〗的效果后,获得一个「击倒」标记。一名角色获得至少3个「击倒」标记后移除此标记并进入“击倒”状态。“击倒”状态的角色始终跳过出牌阶段。角色于“击倒”状态时,有10张牌离开牌堆或进入弃牌堆后,其脱离“击倒”状态。",
olsanou_info: "锁定技,其他角色受到你的伤害后或猜错〖花拳〗的效果后,你摸一张牌并令其获得一个「击倒」标记。一名角色获得至少3个「击倒」标记后移除此标记并进入“击倒”状态。“击倒”状态的角色始终跳过出牌阶段。角色于“击倒”状态时,有10张牌离开牌堆或进入弃牌堆后,其脱离“击倒”状态。",
};

export default translates;
105 changes: 43 additions & 62 deletions character/jsrg/skill.js
Original file line number Diff line number Diff line change
Expand Up @@ -4947,27 +4947,22 @@ const skills = {
}
return event.targets.some(i => i.isIn() && i.hasHistory("lose", evt => evt.cards2.length)) && player.getExpansions("jsrgshacheng").length;
},
direct: true,
group: "jsrgshacheng_build",
content() {
"step 0";
if (_status.connectMode) {
game.broadcastAll(function () {
_status.noclearcountdown = true;
});
}
var targets = trigger.targets.filter(i => i.isIn() && i.hasHistory("lose", evt => evt.cards2.length));
player
.chooseTarget(get.prompt("jsrgshacheng"), "令一名目标角色摸X张牌,然后移去一张“城”(X为对应角色本回合失去过的牌数且至多为5)", (card, player, target) => {
return get.event("targets").includes(target);
})
.set("targets", targets)
.set("ai", target => {
return target == get.event("targetx") ? 1 : 0;
})
.set(
"targetx",
(() => {
async cost(event, trigger, player) {
const cards = player.getExpansions("jsrgshacheng");
const targets = trigger.targets.filter(i => i.isIn() && i.hasHistory("lose", evt => evt.cards2.length));
const result = await player
.chooseButtonTarget({
createDialog: [`###${get.prompt(event.skill)}###移去一张“城”,令一名目标角色摸X张牌(X为该角色本回合失去过的牌数且至多为5)`, cards],
targets: targets,
filterButton: true,
filterTarget(card, player, target) {
return get.event().targets.includes(target);
},
ai2(target) {
return target == get.event("targetx") ? 1 : 0;
},
targetx: (() => {
let info = [];
targets.filter(target => {
let att = get.attitude(player, target);
Expand Down Expand Up @@ -4997,47 +4992,31 @@ const skills = {
return null;
}
return info[0];
})()
);
"step 1";
if (result.bool) {
event.target = result.targets[0];
var cards = player.getExpansions("jsrgshacheng");
if (cards.length == 1) {
event._result = { bool: true, links: cards };
} else {
player.chooseButton([`沙城:移去一张“城”`, cards], true);
}
} else {
if (_status.connectMode) {
game.broadcastAll(function () {
delete _status.noclearcountdown;
game.stopCountChoose();
});
}
event.finish();
}
"step 2";
if (_status.connectMode) {
game.broadcastAll(function () {
delete _status.noclearcountdown;
game.stopCountChoose();
});
}
if (result.bool) {
player.logSkill("jsrgshacheng", target);
player.loseToDiscardpile(result.links);
target.draw(
Math.min(
5,
target
.getHistory("lose")
.map(evt => evt.cards2.length)
.reduce((p, c) => p + c, 0)
)
);
})(),
})
.forResult();
if (result?.links?.length && result.targets?.length) {
event.result = {
bool: true,
targets: result.targets,
cost_data: result.links,
};
}
},
async content(event, trigger, player) {
const cards = event.cost_data,
[target] = event.targets;
await player.loseToDiscardpile(cards);
await target.draw(
Math.min(
5,
target
.getHistory("lose")
.map(evt => evt.cards2.length)
.reduce((p, c) => p + c, 0)
)
);
},
marktext: "城",
intro: {
content: "expansion",
Expand Down Expand Up @@ -5074,9 +5053,11 @@ const skills = {
return event.hasNature("ice") && event.cards?.someInD();
},
forced: true,
content() {
var cards = trigger.cards.filterInD();
player.addToExpansion(cards, "gain2").gaintag.add("jsrgshacheng");
async content(event, trigger, player) {
const cards = trigger.cards.filterInD();
const next = player.addToExpansion(cards, "gain2");
next.gaintag.add("jsrgshacheng");
await next;
},
global: "jsrgninghan_frozen",
subSkill: {
Expand Down
Loading