新杀李丰

This commit is contained in:
mengxinzxz 2024-05-09 20:11:16 +08:00
parent e336008638
commit 22516ff451
8 changed files with 217 additions and 67 deletions

View File

@ -1,4 +1,5 @@
const characters = { const characters = {
dc_lifeng: ["male", "shu", 3, ["dctunchu", "dcshuliang"]],
wupu: ["male", "qun", 4, ["dcduanti", "dcshicao"]], wupu: ["male", "qun", 4, ["dcduanti", "dcshicao"]],
dc_caoshuang: ["male", "wei", 4, ["dcjianzhuan", "dcfanshi"]], dc_caoshuang: ["male", "wei", 4, ["dcjianzhuan", "dcfanshi"]],
zangba: ["male", "wei", 4, ["rehengjiang"]], zangba: ["male", "wei", 4, ["rehengjiang"]],

View File

@ -1,3 +1,5 @@
const characterReplaces = {}; const characterReplaces = {
lifeng: ["dc_lifeng", "lifeng"],
};
export default characterReplaces; export default characterReplaces;

View File

@ -2,6 +2,155 @@ import { lib, game, ui, get, ai, _status } from "../../noname.js";
/** @type { importCharacterConfig['skill'] } */ /** @type { importCharacterConfig['skill'] } */
const skills = { const skills = {
//李丰
dctunchu: {
audio: 2,
trigger: { global: "gameDrawBegin" },
forced: true,
content() {
const me = player,
numx = trigger.num;
const sum = game.players.slice().concat(game.dead).length * 4;
trigger.num = function (player) {
return player == me ? sum : typeof numx == "function" ? numx(player) : numx;
};
},
mod: {
cardDiscardable(card, player) {
if (get.position(card) == "h") return false;
},
},
group: "dctunchu_limit",
subSkill: {
limit: {
audio: "dctunchu",
trigger: { player: "phaseZhunbeiBegin" },
filter(event, player) {
return player.countCards("h") > player.getHp();
},
forced: true,
content() {
player.addTempSkill("dctunchu_debuff");
player.addMark("dctunchu_debuff", 3, false);
},
},
debuff: {
mark: true,
intro: {
markcount(storage) {
return (storage || 0).toString();
},
content(storage) {
return "还可使用" + (storage || 0).toString() + "张牌";
},
},
charlotte: true,
onremove: true,
trigger: { player: "useCard0" },
filter(event, player) {
return player.hasMark("dctunchu_debuff");
},
forced: true,
popup: false,
firstDo: true,
content() {
player.removeMark("dctunchu_debuff", 1, false);
},
mod: {
cardEnabled(card, player) {
if (player.hasMark("dctunchu_debuff")) return;
if (get.itemtype(card) == "card" && get.position(card) == "h") return false;
if (card.cards && (card.cards || []).some(i => get.position(i) == "h")) return false;
},
cardSavable() {
return lib.skill.dctunchu_subSkill.debuff.mod.cardEnabled2.apply(this, arguments);
},
},
},
},
},
dcshuliang: {
audio: 2,
trigger: { global: "phaseEnd" },
filter(event, player) {
return player.countCards("h") && game.hasPlayer(target => !target.countCards("h"));
},
async cost(event, trigger, player) {
const num = Math.min(
player.countCards("h"),
game.countPlayer(target => !target.countCards("h"))
);
let list = [];
while (num - list.length > 0) {
const {
result: { bool, targets, cards },
} = await player
.chooseCardTarget({
prompt: list.length ? "是否继续发动【输粮】?" : get.prompt("dcshuliang"),
prompt2: lib.translate.dcshuliang_info,
position: "h",
animate: false,
filterCard(card, player) {
return !get.event("list").some(list => list[1] == card);
},
filterTarget(card, player, target) {
return !target.countCards("h") && !get.event("list").some(list => list[0] == target);
},
ai1(card) {
if (!ui.selected.targets.length) return false;
const target = ui.selected.targets[0];
if (card.name == "du" && !target.hasSkillTag("nodu") && get.attitude(player, target) < 0) return 200;
if (target.canUse(card, target) && get.attitude(player, target) > 0) return 5 + target.getUseValue(card);
return 1 + Math.random();
},
ai2(target) {
const player = get.event("player"),
att = get.attitude(player, target);
if (
player.hasCard(card => {
return card.name == "du" && !get.event("list").some(list => list[1] == card);
}, "h") &&
!target.countCards("h") &&
!get.event("list").some(list => list[0] == target) &&
!target.hasSkillTag("nodu")
)
return -200 * att;
return att;
},
})
.set("list", list);
if (bool) {
list.push([targets[0], cards[0]]);
player.addGaintag(cards, "olsujian_given");
} else break;
}
event.result = {
bool: Boolean(list.length),
targets: list.slice().map(list => list[0]),
cards: list.slice().map(list => list[1]),
cost_data: list,
};
},
async content(event, trigger, player) {
const list = event.cost_data;
await game
.loseAsync({
gain_list: list,
player: player,
cards: event.cards,
giver: player,
animate: "giveAuto",
})
.setContent("gaincardMultiple");
for (let i = 0; i < list.length; i++) {
const target = event.targets[i],
card = event.cards[i];
if (get.owner(card) == target && get.position(card) == "h" && target.canUse(card, target)) {
await target.chooseUseTarget(card);
}
}
},
},
//吴普 //吴普
dcduanti: { dcduanti: {
audio: 2, audio: 2,
@ -2797,7 +2946,7 @@ const skills = {
if (phaseDraw && phaseDraw.player === player) return false; if (phaseDraw && phaseDraw.player === player) return false;
const evt = player.getHistory("gain").find(i => { const evt = player.getHistory("gain").find(i => {
const phaseDraw = i.getParent("phaseDraw"); const phaseDraw = i.getParent("phaseDraw");
return (!phaseDraw || phaseDraw.player !== player); return !phaseDraw || phaseDraw.player !== player;
}); });
if (!evt) return false; if (!evt) return false;
if (event.name == "gain") { if (event.name == "gain") {
@ -3466,13 +3615,10 @@ const skills = {
"step 2"; "step 2";
if (trigger.source && trigger.source.isIn() && player.hasHistory("gain", evt => evt.getParent(2) == event.recast && evt.cards.some(value => get.name(value) == "sha"))) { if (trigger.source && trigger.source.isIn() && player.hasHistory("gain", evt => evt.getParent(2) == event.recast && evt.cards.some(value => get.name(value) == "sha"))) {
player player
.chooseToUse( .chooseToUse(function (card) {
function (card) {
if (get.name(card) != "sha") return false; if (get.name(card) != "sha") return false;
return lib.filter.filterCard.apply(this, arguments); return lib.filter.filterCard.apply(this, arguments);
}, }, "击逆:是否对" + get.translation(trigger.source) + "使用一张不可被响应的杀?")
"击逆:是否对" + get.translation(trigger.source) + "使用一张不可被响应的杀?"
)
.set("complexSelect", true) .set("complexSelect", true)
.set("filterTarget", function (card, player, target) { .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;
@ -3805,13 +3951,10 @@ const skills = {
player.removeSkill("dcmoyu_add"); player.removeSkill("dcmoyu_add");
const num = player.getStorage("dcmoyu_clear").length; const num = player.getStorage("dcmoyu_clear").length;
const result = await target const result = await target
.chooseToUse( .chooseToUse(function (card, player, event) {
function (card, player, event) {
if (get.name(card) != "sha") return false; if (get.name(card) != "sha") return false;
return lib.filter.filterCard.apply(this, arguments); return lib.filter.filterCard.apply(this, arguments);
}, }, "是否对" + get.translation(player) + "使用一张无距离限制的【杀】?")
"是否对" + get.translation(player) + "使用一张无距离限制的【杀】?"
)
.set("targetRequired", true) .set("targetRequired", true)
.set("complexSelect", true) .set("complexSelect", true)
.set("filterTarget", function (card, player, target) { .set("filterTarget", function (card, player, target) {
@ -3947,13 +4090,10 @@ const skills = {
"step 1"; "step 1";
var num = player.getStorage("oldmoyu_clear").length; var num = player.getStorage("oldmoyu_clear").length;
target target
.chooseToUse( .chooseToUse(function (card, player, event) {
function (card, player, event) {
if (get.name(card) != "sha") return false; if (get.name(card) != "sha") return false;
return lib.filter.filterCard.apply(this, arguments); return lib.filter.filterCard.apply(this, arguments);
}, }, "是否对" + get.translation(player) + "使用一张无距离限制的【杀】(伤害基数为" + num + "")
"是否对" + get.translation(player) + "使用一张无距离限制的【杀】(伤害基数为" + num + ""
)
.set("targetRequired", true) .set("targetRequired", true)
.set("complexSelect", true) .set("complexSelect", true)
.set("filterTarget", function (card, player, target) { .set("filterTarget", function (card, player, target) {
@ -4715,8 +4855,7 @@ const skills = {
if (color == "black") black++; if (color == "black") black++;
} }
} }
game.broadcastAll( game.broadcastAll(function (ind) {
function (ind) {
var bgColor = lib.skill.dchuiling_hint.markColor[ind][0], var bgColor = lib.skill.dchuiling_hint.markColor[ind][0],
text = '<span style="color: ' + lib.skill.dchuiling_hint.markColor[ind][1] + '">灵</span>'; text = '<span style="color: ' + lib.skill.dchuiling_hint.markColor[ind][1] + '">灵</span>';
for (var player of game.players) { for (var player of game.players) {
@ -4725,9 +4864,7 @@ const skills = {
player.marks.dchuiling.firstChild.innerHTML = text; player.marks.dchuiling.firstChild.innerHTML = text;
} }
} }
}, }, Math.sign(black - red) + 1);
Math.sign(black - red) + 1
);
}, },
}, },
}, },
@ -12198,9 +12335,13 @@ const skills = {
filter: function (event, player, name) { filter: function (event, player, name) {
if (player.hasSkill("zhiwei2")) return false; if (player.hasSkill("zhiwei2")) return false;
if (!game.hasPlayer(current => current != player)) return false; if (!game.hasPlayer(current => current != player)) return false;
if (get.mode() == "guozhan") return event.name == "showCharacter" && event.toShow.some(name => { if (get.mode() == "guozhan")
return (
event.name == "showCharacter" &&
event.toShow.some(name => {
return get.character(name, 3).includes("zhiwei"); return get.character(name, 3).includes("zhiwei");
}); })
);
return event.name != "showCharacter" && (name != "phaseBefore" || game.phaseNumber == 0); return event.name != "showCharacter" && (name != "phaseBefore" || game.phaseNumber == 0);
}, },
content: function () { content: function () {
@ -12374,42 +12515,39 @@ const skills = {
filter: function (event, player) { filter: function (event, player) {
if (player.isUnseen()) return false; if (player.isUnseen()) return false;
if (!player.isUnseen(2)) return true; if (!player.isUnseen(2)) return true;
return ( return (!player.isUnseen(0) && get.character(player.name1, 3).includes("wanggui")) || (!player.isUnseen(1) && get.character(player.name2, 3).includes("wanggui"));
!player.isUnseen(0) && get.character(player.name1, 3).includes("wanggui") ||
!player.isUnseen(1) && get.character(player.name2, 3).includes("wanggui")
);
}, },
usable: 1, usable: 1,
preHidden: true, preHidden: true,
async cost(event, trigger, player) { async cost(event, trigger, player) {
if (player.isUnseen(2)) event.result = await player if (player.isUnseen(2))
.chooseTarget( event.result = await player
get.prompt("wanggui"), .chooseTarget(get.prompt("wanggui"), "望归是否对与你势力不同的一名角色造成1点伤害", (card, player, target) => {
"望归是否对与你势力不同的一名角色造成1点伤害",
(card, player, target) => {
return target.isEnemyOf(player); return target.isEnemyOf(player);
} })
) .set("ai", target => {
.set("ai", (target) => {
let player = _status.event.player; let player = _status.event.player;
return get.damageEffect(target, player, player); return get.damageEffect(target, player, player);
}) })
.setHiddenSkill("wanggui") .setHiddenSkill("wanggui")
.forResult(); .forResult();
else event.result = await player else
event.result = await player
.chooseBool("望归:是否令与你势力相同的角色各摸一张牌?") .chooseBool("望归:是否令与你势力相同的角色各摸一张牌?")
.setHiddenSkill("wanggui") .setHiddenSkill("wanggui")
.set("logSkill", ["wanggui", game.filterPlayer(current => { .set("logSkill", [
"wanggui",
game.filterPlayer(current => {
return current.isFriendOf(player); return current.isFriendOf(player);
})]) }),
])
.forResult(); .forResult();
}, },
async content(event, trigger, player) { async content(event, trigger, player) {
if (player.isUnseen(2)) { if (player.isUnseen(2)) {
const target = event.targets[0]; const target = event.targets[0];
target.damage("nocard"); target.damage("nocard");
} } else {
else {
const targets = game.filterPlayer(current => { const targets = game.filterPlayer(current => {
return current.isFriendOf(player); return current.isFriendOf(player);
}); });

View File

@ -7,7 +7,7 @@ const characterSort = {
sp_jianghu: ["guanning", "huzhao", "dc_huangchengyan", "mengjie", "wanglie"], sp_jianghu: ["guanning", "huzhao", "dc_huangchengyan", "mengjie", "wanglie"],
sp_zongheng: ["huaxin", "luyusheng", "re_xunchen", "re_miheng", "fengxi", "re_dengzhi", "dc_yanghu", "zongyu"], sp_zongheng: ["huaxin", "luyusheng", "re_xunchen", "re_miheng", "fengxi", "re_dengzhi", "dc_yanghu", "zongyu"],
sp_taiping: ["guanhai", "liupi", "peiyuanshao", "zhangchu", "zhangkai", "dc_zhangmancheng"], sp_taiping: ["guanhai", "liupi", "peiyuanshao", "zhangchu", "zhangkai", "dc_zhangmancheng"],
sp_yanhan: ["dc_liuba", "dc_huangquan", "furongfuqian", "xianglang", "dc_huojun", "gaoxiang", "dc_wuban", "jiangfei"], sp_yanhan: ["dc_lifeng", "dc_liuba", "dc_huangquan", "furongfuqian", "xianglang", "dc_huojun", "gaoxiang", "dc_wuban", "jiangfei"],
sp_jishi: ["dc_jiben", "zhenghun", "dc_sunhanhua", "liuchongluojun", "wupu"], sp_jishi: ["dc_jiben", "zhenghun", "dc_sunhanhua", "liuchongluojun", "wupu"],
sp_raoting: ["dc_huanghao", "dc_sunziliufang", "dc_sunchen", "dc_jiachong"], sp_raoting: ["dc_huanghao", "dc_sunziliufang", "dc_sunchen", "dc_jiachong"],
sp_yijun: ["gongsundu", "mengyou", "dc_sp_menghuo", "gongsunxiu"], sp_yijun: ["gongsundu", "mengyou", "dc_sp_menghuo", "gongsunxiu"],

View File

@ -529,6 +529,11 @@ const translates = {
dcduanti_info: "锁定技。当你使用或打出牌结算结束后若此牌是你本局游戏使用或打出过的牌中的第5X张牌X∈N⁺你回复1点体力然后若你以此法增加的上限小于5你加1点体力上限。", dcduanti_info: "锁定技。当你使用或打出牌结算结束后若此牌是你本局游戏使用或打出过的牌中的第5X张牌X∈N⁺你回复1点体力然后若你以此法增加的上限小于5你加1点体力上限。",
dcshicao: "识草", dcshicao: "识草",
dcshicao_info: "出牌阶段,你可以声明一种类型,然后选择从牌堆顶或牌堆底摸一张牌。若此牌类型与你声明的类型不同,你观看牌堆另一端的两张牌,此技能本回合失效。", dcshicao_info: "出牌阶段,你可以声明一种类型,然后选择从牌堆顶或牌堆底摸一张牌。若此牌类型与你声明的类型不同,你观看牌堆另一端的两张牌,此技能本回合失效。",
dc_lifeng: "李丰",
dctunchu: "囤储",
dctunchu_info: "锁定技。①你的起始手牌数为游戏人数的四倍。②你的手牌不能被弃置。③准备阶段,若你的手牌数大于你的体力上限,则你本回合至多使用三张牌。",
dcshuliang: "输粮",
dcshuliang_info: "一名角色的回合结束时,你可以将任意张手牌交给任意名没有手牌的角色各一张,然后本次获得可以指定自己为目标的牌的角色可以依次选择是否选择本次获得的牌。",
}; };
export default translates; export default translates;

View File

@ -987,6 +987,7 @@ window.noname_character_rank = {
"ns_zhonglimu", "ns_zhonglimu",
"caoxiancaohua", "caoxiancaohua",
"dc_liuba", "dc_liuba",
"dc_lifeng",
"key_seira", "key_seira",
"lukai", "lukai",
"ol_lukai", "ol_lukai",
@ -2735,6 +2736,7 @@ window.noname_character_rank = {
"wangxiang", "wangxiang",
"duji", "duji",
"dc_liuba", "dc_liuba",
"dc_lifeng",
"bianxi", "bianxi",
"junk_sunquan", "junk_sunquan",
"clan_wuban", "clan_wuban",

View File

@ -116,7 +116,9 @@ const translates = {
zhugeguo: "诸葛果", zhugeguo: "诸葛果",
lingcao: "凌操", lingcao: "凌操",
lingju: "灵雎", lingju: "灵雎",
lifeng: "李丰", lifeng: "手杀李丰",
lifeng_prefix: "手杀",
gz_lifeng: "李丰",
jsp_guanyu: "SP关羽", jsp_guanyu: "SP关羽",
jsp_guanyu_prefix: "SP", jsp_guanyu_prefix: "SP",
zhuling: "朱灵", zhuling: "朱灵",

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB