新杀李丰
This commit is contained in:
parent
e336008638
commit
22516ff451
|
@ -1,4 +1,5 @@
|
|||
const characters = {
|
||||
dc_lifeng: ["male", "shu", 3, ["dctunchu", "dcshuliang"]],
|
||||
wupu: ["male", "qun", 4, ["dcduanti", "dcshicao"]],
|
||||
dc_caoshuang: ["male", "wei", 4, ["dcjianzhuan", "dcfanshi"]],
|
||||
zangba: ["male", "wei", 4, ["rehengjiang"]],
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
const characterReplaces = {};
|
||||
const characterReplaces = {
|
||||
lifeng: ["dc_lifeng", "lifeng"],
|
||||
};
|
||||
|
||||
export default characterReplaces;
|
||||
|
|
|
@ -2,6 +2,155 @@ import { lib, game, ui, get, ai, _status } from "../../noname.js";
|
|||
|
||||
/** @type { importCharacterConfig['skill'] } */
|
||||
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: {
|
||||
audio: 2,
|
||||
|
@ -2797,7 +2946,7 @@ const skills = {
|
|||
if (phaseDraw && phaseDraw.player === player) return false;
|
||||
const evt = player.getHistory("gain").find(i => {
|
||||
const phaseDraw = i.getParent("phaseDraw");
|
||||
return (!phaseDraw || phaseDraw.player !== player);
|
||||
return !phaseDraw || phaseDraw.player !== player;
|
||||
});
|
||||
if (!evt) return false;
|
||||
if (event.name == "gain") {
|
||||
|
@ -3466,13 +3615,10 @@ const skills = {
|
|||
"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"))) {
|
||||
player
|
||||
.chooseToUse(
|
||||
function (card) {
|
||||
.chooseToUse(function (card) {
|
||||
if (get.name(card) != "sha") return false;
|
||||
return lib.filter.filterCard.apply(this, arguments);
|
||||
},
|
||||
"击逆:是否对" + get.translation(trigger.source) + "使用一张不可被响应的杀?"
|
||||
)
|
||||
}, "击逆:是否对" + get.translation(trigger.source) + "使用一张不可被响应的杀?")
|
||||
.set("complexSelect", true)
|
||||
.set("filterTarget", function (card, player, target) {
|
||||
if (target != _status.event.sourcex && !ui.selected.targets.includes(_status.event.sourcex)) return false;
|
||||
|
@ -3805,13 +3951,10 @@ const skills = {
|
|||
player.removeSkill("dcmoyu_add");
|
||||
const num = player.getStorage("dcmoyu_clear").length;
|
||||
const result = await target
|
||||
.chooseToUse(
|
||||
function (card, player, event) {
|
||||
.chooseToUse(function (card, player, event) {
|
||||
if (get.name(card) != "sha") return false;
|
||||
return lib.filter.filterCard.apply(this, arguments);
|
||||
},
|
||||
"是否对" + get.translation(player) + "使用一张无距离限制的【杀】?"
|
||||
)
|
||||
}, "是否对" + get.translation(player) + "使用一张无距离限制的【杀】?")
|
||||
.set("targetRequired", true)
|
||||
.set("complexSelect", true)
|
||||
.set("filterTarget", function (card, player, target) {
|
||||
|
@ -3947,13 +4090,10 @@ const skills = {
|
|||
"step 1";
|
||||
var num = player.getStorage("oldmoyu_clear").length;
|
||||
target
|
||||
.chooseToUse(
|
||||
function (card, player, event) {
|
||||
.chooseToUse(function (card, player, event) {
|
||||
if (get.name(card) != "sha") return false;
|
||||
return lib.filter.filterCard.apply(this, arguments);
|
||||
},
|
||||
"是否对" + get.translation(player) + "使用一张无距离限制的【杀】(伤害基数为" + num + ")?"
|
||||
)
|
||||
}, "是否对" + get.translation(player) + "使用一张无距离限制的【杀】(伤害基数为" + num + ")?")
|
||||
.set("targetRequired", true)
|
||||
.set("complexSelect", true)
|
||||
.set("filterTarget", function (card, player, target) {
|
||||
|
@ -4715,8 +4855,7 @@ const skills = {
|
|||
if (color == "black") black++;
|
||||
}
|
||||
}
|
||||
game.broadcastAll(
|
||||
function (ind) {
|
||||
game.broadcastAll(function (ind) {
|
||||
var bgColor = lib.skill.dchuiling_hint.markColor[ind][0],
|
||||
text = '<span style="color: ' + lib.skill.dchuiling_hint.markColor[ind][1] + '">灵</span>';
|
||||
for (var player of game.players) {
|
||||
|
@ -4725,9 +4864,7 @@ const skills = {
|
|||
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) {
|
||||
if (player.hasSkill("zhiwei2")) 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 event.name != "showCharacter" && (name != "phaseBefore" || game.phaseNumber == 0);
|
||||
},
|
||||
content: function () {
|
||||
|
@ -12374,42 +12515,39 @@ const skills = {
|
|||
filter: function (event, player) {
|
||||
if (player.isUnseen()) return false;
|
||||
if (!player.isUnseen(2)) return true;
|
||||
return (
|
||||
!player.isUnseen(0) && get.character(player.name1, 3).includes("wanggui") ||
|
||||
!player.isUnseen(1) && get.character(player.name2, 3).includes("wanggui")
|
||||
);
|
||||
return (!player.isUnseen(0) && get.character(player.name1, 3).includes("wanggui")) || (!player.isUnseen(1) && get.character(player.name2, 3).includes("wanggui"));
|
||||
},
|
||||
usable: 1,
|
||||
preHidden: true,
|
||||
async cost(event, trigger, player) {
|
||||
if (player.isUnseen(2)) event.result = await player
|
||||
.chooseTarget(
|
||||
get.prompt("wanggui"),
|
||||
"望归:是否对与你势力不同的一名角色造成1点伤害?",
|
||||
(card, player, target) => {
|
||||
if (player.isUnseen(2))
|
||||
event.result = await player
|
||||
.chooseTarget(get.prompt("wanggui"), "望归:是否对与你势力不同的一名角色造成1点伤害?", (card, player, target) => {
|
||||
return target.isEnemyOf(player);
|
||||
}
|
||||
)
|
||||
.set("ai", (target) => {
|
||||
})
|
||||
.set("ai", target => {
|
||||
let player = _status.event.player;
|
||||
return get.damageEffect(target, player, player);
|
||||
})
|
||||
.setHiddenSkill("wanggui")
|
||||
.forResult();
|
||||
else event.result = await player
|
||||
else
|
||||
event.result = await player
|
||||
.chooseBool("望归:是否令与你势力相同的角色各摸一张牌?")
|
||||
.setHiddenSkill("wanggui")
|
||||
.set("logSkill", ["wanggui", game.filterPlayer(current => {
|
||||
.set("logSkill", [
|
||||
"wanggui",
|
||||
game.filterPlayer(current => {
|
||||
return current.isFriendOf(player);
|
||||
})])
|
||||
}),
|
||||
])
|
||||
.forResult();
|
||||
},
|
||||
async content(event, trigger, player) {
|
||||
if (player.isUnseen(2)) {
|
||||
const target = event.targets[0];
|
||||
target.damage("nocard");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
const targets = game.filterPlayer(current => {
|
||||
return current.isFriendOf(player);
|
||||
});
|
||||
|
|
|
@ -7,7 +7,7 @@ const characterSort = {
|
|||
sp_jianghu: ["guanning", "huzhao", "dc_huangchengyan", "mengjie", "wanglie"],
|
||||
sp_zongheng: ["huaxin", "luyusheng", "re_xunchen", "re_miheng", "fengxi", "re_dengzhi", "dc_yanghu", "zongyu"],
|
||||
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_raoting: ["dc_huanghao", "dc_sunziliufang", "dc_sunchen", "dc_jiachong"],
|
||||
sp_yijun: ["gongsundu", "mengyou", "dc_sp_menghuo", "gongsunxiu"],
|
||||
|
|
|
@ -529,6 +529,11 @@ const translates = {
|
|||
dcduanti_info: "锁定技。当你使用或打出牌结算结束后,若此牌是你本局游戏使用或打出过的牌中的第5X张牌(X∈N⁺),你回复1点体力,然后若你以此法增加的上限小于5,你加1点体力上限。",
|
||||
dcshicao: "识草",
|
||||
dcshicao_info: "出牌阶段,你可以声明一种类型,然后选择从牌堆顶或牌堆底摸一张牌。若此牌类型与你声明的类型不同,你观看牌堆另一端的两张牌,此技能本回合失效。",
|
||||
dc_lifeng: "李丰",
|
||||
dctunchu: "囤储",
|
||||
dctunchu_info: "锁定技。①你的起始手牌数为游戏人数的四倍。②你的手牌不能被弃置。③准备阶段,若你的手牌数大于你的体力上限,则你本回合至多使用三张牌。",
|
||||
dcshuliang: "输粮",
|
||||
dcshuliang_info: "一名角色的回合结束时,你可以将任意张手牌交给任意名没有手牌的角色各一张,然后本次获得可以指定自己为目标的牌的角色可以依次选择是否选择本次获得的牌。",
|
||||
};
|
||||
|
||||
export default translates;
|
||||
|
|
|
@ -987,6 +987,7 @@ window.noname_character_rank = {
|
|||
"ns_zhonglimu",
|
||||
"caoxiancaohua",
|
||||
"dc_liuba",
|
||||
"dc_lifeng",
|
||||
"key_seira",
|
||||
"lukai",
|
||||
"ol_lukai",
|
||||
|
@ -2735,6 +2736,7 @@ window.noname_character_rank = {
|
|||
"wangxiang",
|
||||
"duji",
|
||||
"dc_liuba",
|
||||
"dc_lifeng",
|
||||
"bianxi",
|
||||
"junk_sunquan",
|
||||
"clan_wuban",
|
||||
|
|
|
@ -116,7 +116,9 @@ const translates = {
|
|||
zhugeguo: "诸葛果",
|
||||
lingcao: "凌操",
|
||||
lingju: "灵雎",
|
||||
lifeng: "李丰",
|
||||
lifeng: "手杀李丰",
|
||||
lifeng_prefix: "手杀",
|
||||
gz_lifeng: "李丰",
|
||||
jsp_guanyu: "SP关羽",
|
||||
jsp_guanyu_prefix: "SP",
|
||||
zhuling: "朱灵",
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 45 KiB |
Loading…
Reference in New Issue