新杀谋诸葛瑾
This commit is contained in:
parent
a0263413fa
commit
eede18e04f
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,4 +1,5 @@
|
|||
const characters = {
|
||||
dc_sb_zhugejin: ["male", "wu", 3, ["dcsbtaozhou", "dcsbhoude"]],
|
||||
dc_sb_jiaxu: ["male", "qun", 3, ["dcsbsushen", "dcsbfumou"]],
|
||||
guanyue: ["male", "shu", 4, ["dcshouzhi", "dcfenhui"]],
|
||||
sp_zhenji: ["female", "qun", 3, ["dcjijie", "dchuiji"]],
|
||||
|
|
|
@ -13,6 +13,7 @@ const characterReplaces = {
|
|||
caofang: ["caofang", "jsrg_caofang"],
|
||||
caomao: ["caomao", "mb_caomao"],
|
||||
sp_zhenji: ["sp_zhenji", "jsrg_zhenji"],
|
||||
zhugejin: ["zhugejin", "dc_sb_zhugejin"],
|
||||
};
|
||||
|
||||
export default characterReplaces;
|
||||
|
|
|
@ -1,7 +1,250 @@
|
|||
import { lib, game, ui, get, ai, _status } from "../../noname.js";
|
||||
import cards from "../sp2/card.js";
|
||||
|
||||
/** @type { importCharacterConfig['skill'] } */
|
||||
const skills = {
|
||||
//诸葛瑾
|
||||
dcsbtaozhou: {
|
||||
audio: 2,
|
||||
enable: "phaseUse",
|
||||
filter(event, player) {
|
||||
return game.hasPlayer(current => {
|
||||
if (current.hasSkill("dcsbzijin")) return false;
|
||||
return current.countCards("h") > 0 && current !== player;
|
||||
});
|
||||
},
|
||||
derivation: "dcsbzijin",
|
||||
chooseButton: {
|
||||
dialog() {
|
||||
return ui.create.dialog("###讨州###请选择一个数字(对其他角色不可见)");
|
||||
},
|
||||
chooseControl(event, player) {
|
||||
const list = [1, 2, 3];
|
||||
list.push("cancel2");
|
||||
return list;
|
||||
},
|
||||
check() {
|
||||
const event = get.event(), player = get.player();
|
||||
if (
|
||||
game.hasPlayer(current => {
|
||||
return current !== player && get.attitude(player, current) > 0;
|
||||
})
|
||||
)
|
||||
return [0, 1, 2].randomGet();
|
||||
if (player.hasShan()) return 2;
|
||||
const rand = event.getRand();
|
||||
if (rand < 0.2) return 0;
|
||||
if (rand < 0.5) return 1;
|
||||
return 2;
|
||||
},
|
||||
backup(result, player) {
|
||||
return {
|
||||
audio: "dcsbtaozhou",
|
||||
chosenNumber: result.index + 1,
|
||||
filterCard: () => false,
|
||||
selectCard: -1,
|
||||
filterTarget(card, player, target) {
|
||||
if (target.hasSkill("dcsbzijin")) return false;
|
||||
return target.countCards("h") > 0 && target !== player;
|
||||
},
|
||||
async content(event, trigger, player) {
|
||||
const [target] = event.targets;
|
||||
const chosenNumber = get.info("dcsbtaozhou_backup").chosenNumber;
|
||||
const cards = await target
|
||||
.chooseToGive(`${get.translation(player)}对你发动了【讨州】`, "你可以交给其至多三张手牌", [1, 3])
|
||||
.set("ai", card => {
|
||||
if (get.event("att") > 0) {
|
||||
if (get.event("chosenNumber") < ui.selected.cards.length + (get.event("getRand")() < 0.5)) {
|
||||
return 5 - get.value(card);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return -get.value(card);
|
||||
})
|
||||
.set("att", get.attitude(target, player))
|
||||
.set("chosenNumber", chosenNumber)
|
||||
.forResultCards();
|
||||
const givenCount = (cards && cards.length) || 0;
|
||||
const delta = Math.abs(givenCount - chosenNumber);
|
||||
if (givenCount >= chosenNumber) {
|
||||
await game.asyncDraw([player, target]);
|
||||
} else {
|
||||
target.addSkill("dcsbtaozhou_debuff");
|
||||
target.addMark("dcsbtaozhou_debuff", delta, false);
|
||||
}
|
||||
if (delta >= 2) {
|
||||
const sha = get.autoViewAs({ name: "sha" });
|
||||
if (target.canUse(sha, player, false)) {
|
||||
await target.addSkills("dcsbzijin");
|
||||
await target.useCard(sha, player, "noai");
|
||||
}
|
||||
}
|
||||
const roundNumberToRestore = game.roundNumber + chosenNumber;
|
||||
player.tempBanSkill("dcsbtaozhou", "forever");
|
||||
player
|
||||
.when({ global: "roundStart" })
|
||||
.filter(() => {
|
||||
return game.roundNumber >= roundNumberToRestore;
|
||||
})
|
||||
.assign({
|
||||
firstDo: true,
|
||||
})
|
||||
.then(() => {
|
||||
delete player.storage[`temp_ban_dcsbtaozhou`];
|
||||
});
|
||||
},
|
||||
ai: {
|
||||
result: {
|
||||
player: 0.5,
|
||||
target() {
|
||||
const chosenNumber = get.info("dcsbtaozhou_backup").chosenNumber;
|
||||
if (chosenNumber > 1) return -1;
|
||||
return 0;
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
prompt: () => "请选择【讨州】的目标",
|
||||
},
|
||||
subSkill: {
|
||||
backup: {},
|
||||
debuff: {
|
||||
trigger: { player: "damageBegin3" },
|
||||
forced: true,
|
||||
charlotte: true,
|
||||
async content(event, trigger, player) {
|
||||
trigger.num++;
|
||||
player.removeMark("dcsbtaozhou_debuff", 1, false);
|
||||
if (!player.countMark("dcsbtaozhou_debuff")){
|
||||
player.removeSkill("dcsbtaozhou_debuff");
|
||||
}
|
||||
},
|
||||
intro: {
|
||||
content: "下&次受到伤害时,伤害+1",
|
||||
},
|
||||
},
|
||||
},
|
||||
ai: {
|
||||
order: 9.6,
|
||||
result: {
|
||||
player: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
dcsbzijin: {
|
||||
audio: 2,
|
||||
trigger: {
|
||||
player: "useCardAfter",
|
||||
},
|
||||
filter(event, player) {
|
||||
return !game.hasPlayer2(current => {
|
||||
return current.hasHistory("damage", evt => evt.card === event.card);
|
||||
}, true);
|
||||
},
|
||||
forced: true,
|
||||
async content(event, trigger, player) {
|
||||
const bool = await player
|
||||
.chooseToDiscard("自矜:弃置一张牌或失去1点体力", "he")
|
||||
.set("ai", card => {
|
||||
const player = get.player();
|
||||
if (get.effect(player, { name: "losehp" }, player, player) > 0) return 0;
|
||||
return 5 - get.value(card);
|
||||
})
|
||||
.forResultBool();
|
||||
if (!bool) await player.loseHp();
|
||||
},
|
||||
ai: {
|
||||
effect: {
|
||||
player_use(card, player) {
|
||||
if (get.effect(player, { name: "losehp" }, player) > 0) return;
|
||||
if (!get.tag(card, "damage") && get.value(card) < 5)
|
||||
return [
|
||||
0.2,
|
||||
player.hasCard(card => {
|
||||
return get.value(card) < 3;
|
||||
}, "he")
|
||||
? -0.1
|
||||
: -2,
|
||||
];
|
||||
},
|
||||
},
|
||||
neg: true,
|
||||
},
|
||||
},
|
||||
dcsbhoude: {
|
||||
audio: 2,
|
||||
trigger: {
|
||||
target: "useCardToTargeted",
|
||||
},
|
||||
filter(event, player) {
|
||||
const phaseUse = event.getParent("phaseUse");
|
||||
if (!phaseUse || phaseUse.name !== "phaseUse" || phaseUse.player === player) return false;
|
||||
const filter = card => {
|
||||
const color = get.color(card);
|
||||
return (get.name(card) === "sha" && color === "red") || (get.type(card) === "trick" && color === "black");
|
||||
};
|
||||
const evt = event.getParent();
|
||||
if (
|
||||
game
|
||||
.getGlobalHistory(
|
||||
"useCard",
|
||||
evt => {
|
||||
return filter(evt.card);
|
||||
},
|
||||
evt
|
||||
)
|
||||
.indexOf(evt) !== 0
|
||||
)
|
||||
return false;
|
||||
return filter(event.card);
|
||||
},
|
||||
async cost(event, trigger, player) {
|
||||
const target = trigger.player;
|
||||
let result;
|
||||
if (get.name(trigger.card) === "sha") {
|
||||
result = await player
|
||||
.chooseToDiscard(get.prompt("dcsbhoude", target), `弃置一张牌,令${get.translation(trigger.card)}对你无效。`, "chooseonly", "he")
|
||||
.set("ai", card => {
|
||||
if (!get.event("goon")) return 0;
|
||||
return 5.5 - get.value(card);
|
||||
})
|
||||
.set("goon", get.effect(player, trigger.card, target, player) < 0)
|
||||
.forResult();
|
||||
} else {
|
||||
result = await player
|
||||
.choosePlayerCard(`###${get.prompt("dcsbhoude", target)}###<div class="text center">弃置其的一张牌,令${get.translation(trigger.card)}对你无效。</div>`, target, "he")
|
||||
.set("ai", button => {
|
||||
if (!get.event("goon")) return 0;
|
||||
const val = get.buttonValue(button);
|
||||
if (get.attitude(get.player(), get.owner(button.link)) > 0) return -val;
|
||||
return val;
|
||||
})
|
||||
.set("goon", get.effect(player, trigger.card, target, player) < 0)
|
||||
.forResult();
|
||||
}
|
||||
if (result.bool) {
|
||||
event.result = {
|
||||
bool: true,
|
||||
cost_data: {
|
||||
cards: result.cards,
|
||||
links: result.links,
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
logTarget: "player",
|
||||
async content(event, trigger, player) {
|
||||
const target = trigger.player;
|
||||
const result = event.cost_data;
|
||||
if (result.links && result.links.length) {
|
||||
await target.discard(result.links, "notBySelf").set("discarder", player);
|
||||
} else {
|
||||
await player.discard(result.cards);
|
||||
}
|
||||
trigger.excluded.add(player);
|
||||
},
|
||||
},
|
||||
//谋贾诩
|
||||
dcsbsushen: {
|
||||
unique: true,
|
||||
|
@ -14413,6 +14656,7 @@ const skills = {
|
|||
player.changeZhuanhuanji("bazhan");
|
||||
"step 1";
|
||||
var target = event.recover;
|
||||
var cards = event.cards;
|
||||
if (result.bool && result.cards && result.cards.length) {
|
||||
cards = result.cards;
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ const characterSort = {
|
|||
sp2_gaoshan: ["wanglang", "liuhui", "zhangjian"],
|
||||
sp2_wumiao: ["wu_zhugeliang", "wu_luxun", "wu_guanyu"],
|
||||
sp2_mouding: ["dc_sb_jiaxu", "dc_sb_lusu", "dc_sb_zhouyu", "dc_sb_simayi"],
|
||||
sp2_zijing: ["dc_sb_zhugejin"],
|
||||
};
|
||||
|
||||
const characterSortTranslate = {
|
||||
|
@ -32,6 +33,7 @@ const characterSortTranslate = {
|
|||
sp2_gaoshan: "高山仰止",
|
||||
sp2_qifu: "祈福",
|
||||
sp2_mouding: "谋定天下",
|
||||
sp2_zijing: "子敬邀刀",
|
||||
};
|
||||
|
||||
export { characterSort, characterSortTranslate };
|
||||
|
|
|
@ -599,6 +599,14 @@ const translates = {
|
|||
dcsbrushi_info: "限定技,出牌阶段,你可以将你当前〖覆谋〗的状态、你的手牌数和你的体力值调整为你发动〖肃身〗时的记录,然后重置〖覆谋〗的发动次数。",
|
||||
dcsbfumou: "覆谋",
|
||||
dcsbfumou_info: "转换技,出牌阶段限一次,你可以观看一名其他角色A的手牌并展示其一半手牌:阴,并将这些牌交给另一名其他角色B,然后你与A各摸X张牌(X为A以此法失去的手牌数);阳,令A依次使用这些牌中所有其可以使用的牌(无距离限制且不可被响应)。",
|
||||
dc_sb_zhugejin: "新杀谋诸葛瑾",
|
||||
dc_sb_zhugejin_prefix: "新杀谋",
|
||||
dcsbtaozhou: "讨州",
|
||||
dcsbtaozhou_info: "出牌阶段,你可以选择一名有手牌的其他角色并从1/2/3中选择一个数字X,其可以选择是否交给你至多三张手牌。若其交给你的牌数Y:不小于X,则你与其各摸一张牌;小于X,则其下Z次受到的伤害+1(Z为X与Y之差)。若Z不小于2,则其获得〖自矜〗并视为对你使用一张【杀】。然后此技能失效直到下X轮游戏开始时。",
|
||||
dcsbhoude: "厚德",
|
||||
dcsbhoude_info: "当你于其他角色的出牌阶段内首次成为红色【杀】/黑色普通锦囊牌的目标后,你可以弃置你/其的一张牌,令此牌对你无效。",
|
||||
dcsbzijin: "自矜",
|
||||
dcsbzijin_info: "锁定技。①你不能成为〖讨州〗的目标。②当你使用牌结算结束后,若此牌未造成过伤害,你须弃置一张牌或失去1点体力。",
|
||||
};
|
||||
|
||||
export default translates;
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
export default {
|
||||
"#dcsbtaozhou1": "皇叔借荆州久矣,瑾特来讨要。",
|
||||
"#dcsbtaozhou2": "荆州弹丸之地,诸君岂可食言而肥?",
|
||||
"#dcsbhoude1": "君子有德,可以载天下之重。",
|
||||
"#dcsbhoude2": "南山有松,任尔风雨雷霆。",
|
||||
"#dc_sb_zhugejin:die": "吾数梦,琅琊旧园。",
|
||||
"#dcjijie1": "不知书,何由见之。",
|
||||
"#dcjijie2": "闻古贤女,未有不学前世成败者。",
|
||||
"#dchuiji1": "明眸善睐,瑰姿艳逸。",
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 75 KiB |
Loading…
Reference in New Issue