新杀谋曹昂

This commit is contained in:
mengxinzxz 2024-06-01 17:43:18 +08:00
parent 04ee0c519a
commit c76d75d984
5 changed files with 120 additions and 0 deletions

View File

@ -1,4 +1,5 @@
const characters = {
dc_sb_caoang: ["male", "wei", 4, ["dcsbfengmin", "dcsbzhiwang", "dcsbjueying"]],
dc_caoshuang: ["male", "wei", 4, ["dcjianzhuan", "dcfanshi"]],
dc_simashi: ["male", "wei", 3, ["dcsanshi", "dczhenrao", "dcchenlve"]],
dc_wangling: ["male", "wei", 4, ["dcjichou", "dcmouli"], ["clan:太原王氏"]],

View File

@ -14,6 +14,7 @@ const characterReplaces = {
caomao: ["caomao", "mb_caomao"],
sp_zhenji: ["sp_zhenji", "jsrg_zhenji"],
zhugejin: ["zhugejin", "dc_sb_zhugejin"],
caoang: ["dc_sb_caoang", "caoang"],
};
export default characterReplaces;

View File

@ -3,6 +3,114 @@ import cards from "../sp2/card.js";
/** @type { importCharacterConfig['skill'] } */
const skills = {
//曹昂
dcsbfengmin: {
audio: 2,
trigger: { global: ["loseAfter", "equipAfter", "addJudgeAfter", "gainAfter", "loseAsyncAfter", "addToExpansionAfter"] },
filter(event, player) {
const target = _status.currentPhase;
if (
!target ||
!target.isIn() ||
!Array.from({ length: 5 })
.map((_, i) => i + 1)
.reduce((sum, i) => sum + target.countEmptySlot(i), 0)
)
return false;
const evt = event.getl(player);
return evt && evt.player == target && (evt.es || []).length;
},
logTarget: () => _status.currentPhase,
async content(event, trigger, player) {
player.addMark("dcsbfengmin", 1, false);
const target = _status.currentPhase;
await player.draw(
Array.from({ length: 5 })
.map((_, i) => i + 1)
.reduce((sum, i) => sum + target.countEmptySlot(i), 0)
);
if (player.countMark("dcsbfengmin") > player.getDamagedHp()) {
player.tempBanSkill("dcsbfengmin");
}
},
intro: { content: "本局游戏已发动过#次此技能" },
},
dcsbzhiwang: {
audio: 2,
trigger: { player: "dying" },
filter(event, player) {
const evt = event.getParent(),
evtx = event.getParent(3);
if (!evt || evt.name != "damage" || !evtx || evtx.name != "useCard") return false;
return game.hasPlayer(target => target != player);
},
usable: 1,
async cost(event, trigger, player) {
event.result = await player
.chooseTarget(get.prompt("dcsbzhiwang"), lib.filter.notMe)
.set("ai", target => {
return get.attitude(get.event("player"), target);
})
.forResult();
},
async content(event, trigger, player) {
if (trigger.source) delete trigger.source;
if (trigger.getParent().source) delete trigger.getParent().source;
event.targets[0].addTempSkill("dcsbzhiwang_effect");
event.targets[0].markAuto("dcsbzhiwang_effect", [player]);
},
subSkill: {
effect: {
charlotte: true,
onremove: true,
trigger: { global: "phaseEnd" },
forced: true,
popup: false,
async content(event, trigger, player) {
let cards = game
.getGlobalHistory("everything", evt => {
if (evt.name != "dying") return false;
if (!player.getStorage("dcsbzhiwang_effect").includes(evt.player)) return false;
const evtx = evt.getParent(3);
return (evtx.cards || []).someInD("d");
})
.reduce((cards, evt) => cards.addArray(evt.getParent(3).cards.filterInD("d")), []);
while (cards.length) {
const result = await player
.chooseButton(["质亡:是否使用其中的一张牌?", cards])
.set("filterButton", button => {
return get.event("player").hasUseTarget(button.link, false);
})
.set("ai", button => {
if (button.link.name == "jiu") return 10;
return get.event("player").getUseValue(button.link);
})
.forResult();
if (result.bool) {
const card = result.links[0];
cards.remove(card);
player.$gain2(card, false);
await game.asyncDelayx();
await player.chooseUseTarget(true, card, false);
}
}
},
intro: { content: "本回合结束时,可以使用令$进入濒死的牌" },
},
},
},
dcsbjueying: {
audio: 2,
trigger: { player: "damageBegin4" },
filter(event, player) {
const cards = player.getEquips("jueying");
return cards.length && cards.every(card => lib.filter.cardDiscardable(card, player));
},
content() {
player.discard(player.getEquips("jueying"));
trigger.cancel();
},
},
//诸葛瑾
dcsbtaozhou: {
audio: 2,

View File

@ -16,6 +16,7 @@ const characterSort = {
sp2_mouding: ["dc_sb_jiaxu", "dc_sb_lusu", "dc_sb_zhouyu", "dc_sb_simayi"],
sp2_zhonghu: ["dc_jiangji", "dc_wangling", "dc_simashi", "dc_caoshuang"],
sp2_zijing: ["dc_sb_zhugejin"],
sp2_waitingforsort: ["dc_sb_caoang"],
};
const characterSortTranslate = {
@ -36,6 +37,7 @@ const characterSortTranslate = {
sp2_mouding: "谋定天下",
sp2_zhonghu: "冢虎狼顾",
sp2_zijing: "子敬邀刀",
sp2_waitingforsort: "等待分包",
};
export { characterSort, characterSortTranslate };

View File

@ -615,6 +615,14 @@ const translates = {
dc_caoshuang_prefix: "新杀谋",
dc_jiangji: "新杀谋蒋济",
dc_jiangji_prefix: "新杀谋",
dc_sb_caoang: "新杀谋曹昂",
dc_sb_caoang_prefix: "新杀谋",
dcsbfengmin: "丰愍",
dcsbfengmin_info: "锁定技,一名角色于其回合内失去装备区的牌后,你摸等同于其装备区空缺装备栏数的牌,然后若你发动〖丰愍〗的次数大于你的体力上限,〖丰愍〗于本回合失效。",
dcsbzhiwang: "质死",
dcsbzhiwang_info: "每回合限一次,当你因受到牌造成的伤害进入濒死状态时,你可以将此伤害改为无来源并选择一名其他角色,其于本回合结束时可以使用本回合令你进入濒死状态的牌。",
dcsbjueying: "绝影",
dcsbjueying_info: "当你受到伤害时,你可以弃置装备区里的【绝影】,然后防止此伤害。",
};
export default translates;