OL谋庞统
This commit is contained in:
parent
8975b245a4
commit
3c1fb5129d
|
@ -10,6 +10,7 @@ const characters = {
|
|||
ol_yufan: ["male", "wu", 3, ["olzongxuan", "olzhiyan"], ["tempname:re_yufan", "die_audio:re_yufan"]],
|
||||
ol_chengpu: ["male", "wu", 4, ["dclihuo", "olchunlao"], ["tempname:xin_chengpu", "die_audio:xin_chengpu"]],
|
||||
ol_wangyi: ["female", "wei", 3, ["olzhenlie", "olmiji"]],
|
||||
ol_sb_pangtong: ["male", "shu", 3, ["olsbhongtu", "olsbqiwu"]],
|
||||
};
|
||||
|
||||
export default characters;
|
||||
|
|
|
@ -2,6 +2,246 @@ import { lib, game, ui, get, ai, _status } from "../../noname.js";
|
|||
|
||||
/** @type { importCharacterConfig['skill'] } */
|
||||
const skills = {
|
||||
//谋庞统
|
||||
olsbhongtu: {
|
||||
audio: 2,
|
||||
trigger: {
|
||||
global: ["phaseZhunbeiEnd", "phaseJudgeEnd", "phaseDrawEnd", "phaseUseEnd", "phaseDiscardEnd", "phaseJieshuEnd"],
|
||||
},
|
||||
filter(event, player) {
|
||||
let count = 0;
|
||||
player.checkHistory("gain", evt => {
|
||||
if (evt.getParent(event.name) !== event) return;
|
||||
count += evt.cards.length;
|
||||
});
|
||||
return count >= 2;
|
||||
},
|
||||
derivation: ["nzry_feijun", "qianxi"],
|
||||
prompt2: "你可以摸三张牌,展示三张手牌,令一名其他角色选择是否使用其中一张牌并令你随机弃置其中另一张牌。若使用牌的点数于三张牌中满足以下条件,其获得如下技能或效果直到其下一个回合的回合结束:唯一最大:〖飞军〗;不为最大且不为最小:〖潜袭〗;唯一最小:手牌上限+2。若其未以此法使用牌,你对其与你各造成1点火焰伤害。",
|
||||
check(event, player) {
|
||||
if (
|
||||
game.hasPlayer(current => {
|
||||
return current !== player && get.attitude(player, current) > 0;
|
||||
})
|
||||
)
|
||||
return true;
|
||||
const eff = get.damageEffect(player, player, player, "fire");
|
||||
if (
|
||||
game.hasPlayer(current => {
|
||||
return (
|
||||
get.damageEffect(current, player, player, "fire") > eff &&
|
||||
player.countCards("h", card => {
|
||||
return !current.hasUseTarget(card);
|
||||
}) >=
|
||||
2 + (player.getHp() > 1)
|
||||
);
|
||||
})
|
||||
)
|
||||
return true;
|
||||
return false;
|
||||
},
|
||||
async content(event, trigger, player) {
|
||||
await player.draw(3);
|
||||
if (player.countCards("h") < 3) return;
|
||||
const [cards, targets] = await player
|
||||
.chooseCardTarget({
|
||||
prompt: "鸿图:请展示三张手牌并选择一名角色",
|
||||
prompt2: "你选择的角色须选择是否使用其中的一张牌,并令你随机弃置其中的另一张牌。",
|
||||
position: "h",
|
||||
filterCard: true,
|
||||
selectCard: 3,
|
||||
filterTarget: lib.filter.notMe,
|
||||
forced: true,
|
||||
hasFriend: game.hasPlayer(current => {
|
||||
return current !== player && get.attitude(player, current) > 0;
|
||||
}),
|
||||
ai1(card) {
|
||||
const player = get.player(),
|
||||
val = player.getUseValue(card);
|
||||
if (get.event("hasFriend")) {
|
||||
if (
|
||||
ui.selected.cards.some(cardx => {
|
||||
return player.getUseValue(cardx) > 5;
|
||||
})
|
||||
)
|
||||
return -val - get.value(card);
|
||||
return val - 5;
|
||||
}
|
||||
if (
|
||||
game.hasPlayer(current => {
|
||||
return get.attitude(get.player(), current) < 0 && !current.hasUseTarget(card);
|
||||
})
|
||||
)
|
||||
return 100 - val;
|
||||
return -val;
|
||||
},
|
||||
ai2(target) {
|
||||
const att = get.attitude(get.player(), target);
|
||||
if (!ui.selected.cards.length) return 0;
|
||||
if (ui.selected.cards.every(card => !target.hasUseTarget(card))) {
|
||||
return 10 * (get.damageEffect(target, player, player, "fire") - get.damageEffect(player, player, player, "fire"));
|
||||
}
|
||||
return Math.max(...ui.selected.cards.map(card => target.getUseValue(card) * att));
|
||||
},
|
||||
})
|
||||
.forResult("cards", "targets");
|
||||
if (!cards || !cards.length || !targets || !targets.length) return;
|
||||
const [target] = targets;
|
||||
player.line(target, "green");
|
||||
await player.showCards(cards, `${get.translation(player)}对${get.translation(target)}发动了【鸿图】`);
|
||||
const links = await target
|
||||
.chooseButton([`鸿图:是否使用${get.translation(player)}展示的其中一张牌?`, cards])
|
||||
.set("filterButton", button => {
|
||||
const player = get.player(),
|
||||
card = button.link;
|
||||
const cardx = get.autoViewAs(
|
||||
{
|
||||
name: get.name(card),
|
||||
nature: get.nature(card),
|
||||
},
|
||||
[card]
|
||||
);
|
||||
return player.hasUseTarget(cardx, null, false);
|
||||
})
|
||||
.set("ai", button => {
|
||||
return get.player().getUseValue(button.link);
|
||||
})
|
||||
.forResultLinks();
|
||||
if (!links || !links.length) {
|
||||
for (const current of [target, player]) {
|
||||
if (!current.isIn()) continue;
|
||||
player.line(current, "fire");
|
||||
await current.damage("fire");
|
||||
}
|
||||
} else {
|
||||
const [card] = links;
|
||||
cards.remove(card);
|
||||
const cardx = get.autoViewAs(
|
||||
{
|
||||
name: get.name(card),
|
||||
nature: get.nature(card),
|
||||
},
|
||||
[card]
|
||||
);
|
||||
const owner = get.owner(card);
|
||||
const next = target
|
||||
.chooseUseTarget(cardx, [card], true, false)
|
||||
.set("throw", false)
|
||||
.set("owner", owner)
|
||||
.set("oncard", card => {
|
||||
const owner = get.event().getParent().owner;
|
||||
if (owner) owner.$throw(card.cards);
|
||||
});
|
||||
if (card.name === cardx.name && get.is.sameNature(card, cardx, true)) next.set("viewAs", false);
|
||||
await next;
|
||||
const restCards = cards.filter(card => {
|
||||
return get.owner(card) === player && get.position(card) === "h" && lib.filter.cardDiscardable(card, player, "olsbhongtu");
|
||||
});
|
||||
if (restCards.length) {
|
||||
player.discard(restCards.randomGet());
|
||||
}
|
||||
const num = get.number(card, player);
|
||||
let skill = null;
|
||||
if (
|
||||
cards.every(cardx => {
|
||||
if (cardx === card) return true;
|
||||
return get.number(cardx) < num;
|
||||
})
|
||||
) {
|
||||
skill = "nzry_feijun";
|
||||
} else if (
|
||||
cards.every(cardx => {
|
||||
if (cardx === card) return true;
|
||||
return get.number(cardx) > num;
|
||||
})
|
||||
) {
|
||||
target.addSkill("olsbhongtu_limit");
|
||||
target.addMark("olsbhongtu_limit", 2, false);
|
||||
} else {
|
||||
skill = "qianxi";
|
||||
}
|
||||
let skillName = null;
|
||||
if (skill) {
|
||||
skillName = `olsbhongtu_${player.playerid}`;
|
||||
target.addAdditionalSkills(skillName, [skill]);
|
||||
}
|
||||
target.when({ player: "phaseBegin" }).then(() => {
|
||||
player.storage.olsbhongtu_phased = true;
|
||||
});
|
||||
target
|
||||
.when({ player: "phaseEnd" })
|
||||
.filter(() => {
|
||||
return target.storage.olsbhongtu_phased;
|
||||
})
|
||||
.assign({
|
||||
firstDo: true,
|
||||
priority: Infinity,
|
||||
})
|
||||
.vars({
|
||||
skillName,
|
||||
})
|
||||
.then(() => {
|
||||
delete player.storage.olsbhongtu_phased;
|
||||
if (skillName) {
|
||||
player.removeAdditionalSkills(skillName);
|
||||
} else {
|
||||
player.removeSkill("olsbhongtu_limit");
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
subSkill: {
|
||||
limit: {
|
||||
markimage: "image/card/handcard.png",
|
||||
intro: {
|
||||
content(storage, player) {
|
||||
return "手牌上限+" + storage;
|
||||
},
|
||||
},
|
||||
charlotte: true,
|
||||
mod: {
|
||||
maxHandcard(player, num) {
|
||||
return num + player.countMark("olsbhongtu_limit");
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
},
|
||||
olsbqiwu: {
|
||||
audio: 2,
|
||||
trigger: {
|
||||
player: "damageBegin4",
|
||||
},
|
||||
filter(event, player) {
|
||||
if (!event.source) return false;
|
||||
if (event.source !== player && !event.source.inRangeOf(player)) return false;
|
||||
return (
|
||||
game
|
||||
.getGlobalHistory(
|
||||
"everything",
|
||||
evt => {
|
||||
return evt.name == "damage" && evt.player == player;
|
||||
},
|
||||
event
|
||||
)
|
||||
.indexOf(event) === 0
|
||||
);
|
||||
},
|
||||
async cost(event, trigger, player) {
|
||||
event.result = await player
|
||||
.chooseToDiscard(get.prompt("olsbqiwu"), `你可以弃置一张红色牌,防止${get.translation(trigger.source)}对你造成的${trigger.num}点伤害。`, "chooseonly", { color: "red" }, "he")
|
||||
.set("ai", card => {
|
||||
if (get.event("goon")) return 6 - get.value(card);
|
||||
return 0;
|
||||
})
|
||||
.set("goon", get.damageEffect(player, trigger.source, player) < 0)
|
||||
.forResult();
|
||||
},
|
||||
async content(event, trigger, player) {
|
||||
await player.discard(event.cards);
|
||||
trigger.cancel();
|
||||
},
|
||||
},
|
||||
//王异
|
||||
olzhenlie: {
|
||||
audio: 2,
|
||||
|
|
|
@ -2,7 +2,7 @@ const characterSort = {
|
|||
onlyOL_yijiang1: ["ol_jianyong", "ol_lingtong", "ol_gaoshun"],
|
||||
onlyOL_yijiang2: ["ol_caozhang", "ol_chengpu", "ol_wangyi"],
|
||||
onlyOL_yijiang3: ["ol_yufan"],
|
||||
onlyOL_sb: ["ol_sb_jiangwei", "ol_sb_guanyu", "ol_sb_taishici", "ol_sb_yuanshao"],
|
||||
onlyOL_sb: ["ol_sb_jiangwei", "ol_sb_guanyu", "ol_sb_taishici", "ol_sb_yuanshao", "ol_sb_pangtong"],
|
||||
};
|
||||
|
||||
const characterSortTranslate = {
|
||||
|
|
|
@ -72,6 +72,12 @@ const translates = {
|
|||
olzhenlie_info: "当你成为其他角色使用【杀】或普通锦囊牌的目标后,你可以失去1点体力并令此牌对你无效,然后你选择一项:①获得使用者的一张牌;②发动一次〖秘计〗。",
|
||||
olmiji: "秘计",
|
||||
olmiji_info: "结束阶段,若你已受伤,则你可以摸X张牌,然后你可以将至多X张牌任意分配给其他角色(X为你已损失的体力值)。",
|
||||
ol_sb_pangtong: "OL谋庞统",
|
||||
ol_sb_pangtong_prefix: "OL谋",
|
||||
olsbhongtu: "鸿图",
|
||||
olsbhongtu_info: "一名角色的阶段结束时,若你于此阶段得到过至少两张牌,你可以摸三张牌,展示三张手牌,令一名其他角色选择是否使用其中一张牌并令你随机弃置其中另一张牌。若使用牌的点数于三张牌中满足以下条件,其获得如下技能或效果直到其下一个回合的回合结束:唯一最大,其获得〖飞军〗;不为唯一最大且不为唯一最小,其获得〖潜袭〗;唯一最小,其手牌上限+2。若其未以此法使用牌,你对其与你各造成1点火焰伤害。",
|
||||
olsbqiwu: "栖梧",
|
||||
olsbqiwu_info: "当你每回合首次受到伤害时,若伤害来源为你或在你的攻击范围内,你可以弃置一张红色牌,防止此伤害。",
|
||||
};
|
||||
|
||||
export default translates;
|
||||
|
|
|
@ -11,7 +11,7 @@ const characterReplaces = {
|
|||
dianwei: ["dianwei", "ol_dianwei", "re_dianwei"],
|
||||
xunyu: ["xunyu", "ol_xunyu", "re_xunyu", "sb_xunyu"],
|
||||
sp_zhugeliang: ["sp_zhugeliang", "ol_sp_zhugeliang", "re_sp_zhugeliang", "sb_sp_zhugeliang"],
|
||||
pangtong: ["pangtong", "ol_pangtong", "re_pangtong", "sb_pangtong"],
|
||||
pangtong: ["pangtong", "ol_pangtong", "re_pangtong", "ol_sb_pangtong", "sb_pangtong"],
|
||||
re_jsp_pangtong: ["re_jsp_pangtong", "jsrg_pangtong", "sp_pangtong"],
|
||||
taishici: ["taishici", "re_taishici", "ol_sb_taishici"],
|
||||
re_yuanshao: ["re_yuanshao", "ol_yuanshao", "xin_yuanshao", "ol_sb_yuanshao", "star_yuanshao", "sb_yuanshao"],
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 96 KiB |
Loading…
Reference in New Issue