diff --git a/character/huicui.js b/character/huicui.js
index 5812e5a8d..02e1423d9 100644
--- a/character/huicui.js
+++ b/character/huicui.js
@@ -4370,61 +4370,52 @@ game.import("character", function () {
game.addGlobalSkill("dcmoyu_ai");
},
onremove() {
- if (!game.hasPlayer((i) => i.hasSkill("dcmoyu"), true))
- game.removeGlobalSkill("dcmoyu_ai");
+ if (!game.hasPlayer(i => i.hasSkill("dcmoyu"), true)) game.removeGlobalSkill("dcmoyu_ai");
},
enable: "phaseUse",
filter(event, player) {
return game.hasPlayer((current) => lib.skill.dcmoyu.filterTarget(null, player, current));
},
filterTarget(card, player, target) {
- return (
- player != target &&
- !player.getStorage("dcmoyu_clear").includes(target) &&
- target.countGainableCards(player, "hej")
- );
+ return player != target && !player.getStorage("dcmoyu_clear").includes(target) && target.countGainableCards(player, "hej");
},
- async content(event,trigger,player) {
+ async content(event, trigger, player) {
+ const target = event.target;
player.addTempSkill("dcmoyu_clear");
player.markAuto("dcmoyu_clear", [target]);
await player.gainPlayerCard(target, "hej", true, 1 + player.hasSkill("dcmoyu_add"));
player.removeSkill("dcmoyu_add");
const num = player.getStorage("dcmoyu_clear").length;
const result = await target
- .chooseToUse(function (card, player, event) {
- if (get.name(card) != "sha") return false;
- return lib.filter.filterCard.apply(this, arguments);
- }, "是否对" +
- get.translation(player) +
- "使用一张无距离限制的【杀】?")
+ .chooseToUse(
+ function (card, player, event) {
+ if (get.name(card) != "sha") return false;
+ return lib.filter.filterCard.apply(this, arguments);
+ },
+ "是否对" + get.translation(player) + "使用一张无距离限制的【杀】?"
+ )
.set("targetRequired", true)
.set("complexSelect", true)
.set("filterTarget", function (card, player, target) {
- if (
- target != _status.event.sourcex &&
- !ui.selected.targets.includes(_status.event.sourcex)
- )
- return false;
+ if (target != _status.event.sourcex && !ui.selected.targets.includes(_status.event.sourcex)) return false;
return lib.filter.targetEnabled.apply(this, arguments);
})
.set("sourcex", player)
.set("num", num)
- .set("oncard", (card) => {
+ .set("oncard", card => {
_status.event.baseDamage = _status.event.getParent().num;
})
.forResult();
if (result.bool) {
if (
- player.hasHistory("damage", (evt) => {
+ player.hasHistory("damage", evt => {
return evt.card && evt.card.name == "sha" && evt.getParent(4) == event;
})
) {
player.tempBanSkill("dcmoyu");
- }
- else {
+ } else {
player.addTempSkill("dcmoyu_add", "phaseChange");
}
-
}
},
subSkill: {
@@ -4440,6 +4431,7 @@ game.import("character", function () {
},
add: {
charlotte: true,
+ mark: true,
marktext: "欲",
intro: { content: "欲望加速,下次抢两张!" },
},
diff --git a/character/sp2.js b/character/sp2.js
index 475cd1ad8..66bc5ecf5 100644
--- a/character/sp2.js
+++ b/character/sp2.js
@@ -2363,7 +2363,7 @@ game.import("character", function () {
content: function () {
"step 0";
var skill = trigger.sourceSkill || trigger.skill;
- player.removeSkill(skill);
+ player.removeSkills(skill);
player.unmarkAuto("dclongsong_remove", [skill]);
},
},
@@ -2373,9 +2373,9 @@ game.import("character", function () {
audio: "dclongsong",
trigger: { player: "phaseUseBegin" },
filter(event, player) {
- return game.hasPlayer((target) => {
+ return game.hasPlayer(target => {
if (target == player) return false;
- return target.hasCard((card) => {
+ return target.hasCard(card => {
if (get.position(card) == "h") return true;
return get.color(card) == "red" && lib.filter.canBeGained(card, player, target);
}, "he");
@@ -2387,26 +2387,22 @@ game.import("character", function () {
prompt: get.prompt2("longsong"),
filterTarget(card, player, target) {
if (target === player) return false;
- const skills = lib.skill.dclongsong
- .getSkills(target)
- .map((skill) => get.translation(skill));
+ const skills = lib.skill.dclongsong.getSkills(target).map(skill => get.translation(skill));
if (skills.length) {
target.prompt(skills.join("
"));
}
- return target.hasCard((card) => {
+ return ui.selected.cards.length || target.hasCard(card => {
if (get.position(card) == "h") return true;
- return (
- get.color(card) == "red" &&
- lib.filter.canBeGained(card, player, target)
- );
+ return get.color(card) == "red" && lib.filter.canBeGained(card, player, target);
}, "he");
},
filterCard: { color: "red" },
selectCard: [0, 1],
+ multitarget: true,
ai1(card) {
const ai2 = get.event("ai2");
if (
- game.hasPlayer((current) => {
+ game.hasPlayer(current => {
return ai2(current) > 0;
})
) {
@@ -2417,43 +2413,26 @@ game.import("character", function () {
ai2(target) {
const player = get.event("player"),
att = get.attitude(player, target);
- if (
- att > 0 &&
- !target
- .getGainableCards(player, "he")
- .some((card) => get.color(card) == "red")
- )
- return 0;
- return (
- lib.skill.dclongsong.getSkills(target).length +
- (att > 0
- ? 0
- : Math.max(
- 0,
- get.effect(target, { name: "shunshou_copy2" }, player, player)
- ))
- );
+ if (att > 0 && !target.getGainableCards(player, "he").some(card => get.color(card) == "red")) return 0;
+ return lib.skill.dclongsong.getSkills(target).length + (att > 0 ? 0 : Math.max(0, get.effect(target, { name: "shunshou_copy2" }, player, player)));
},
})
.forResult();
},
async content(event, trigger, player) {
const target = event.targets[0],
- card = event.cards[0],
- gainableCards = target
- .getGainableCards(player, "he")
- .filter((card) => get.color(card) == "red");
- if (card) {
- await player.give(card, target);
+ cards = event.cards,
+ gainableCards = target.getGainableCards(player, "he").filter(card => get.color(card) == "red");
+ if (cards) {
+ await player.give(cards, target);
} else {
if (gainableCards.length) {
let dialog = ["龙诵:获得" + get.translation(target) + "的一张红色牌"];
- let cards1 = cards.filter((i) => get.position(i) == "h"),
- cards2 = cards.filter((i) => get.position(i) == "e");
+ let cards1 = gainableCards.filter(i => get.position(i) == "h"),
+ cards2 = gainableCards.filter(i => get.position(i) == "e");
if (cards1.length) {
dialog.push('