This commit is contained in:
copcap 2024-05-18 20:08:44 +08:00
parent 2c13a4f089
commit 6e9e06c55c
No known key found for this signature in database
GPG Key ID: 30E7AB6699451AEE
6 changed files with 188 additions and 1 deletions

View File

@ -1,4 +1,5 @@
const characters = {
yadan: ["male", "qun", 4, ["olqingya", "oltielun"]],
sp_sunce: ["male", "qun", 4, ["olliantao"]],
ol_liupi: ["male", "qun", 4, ["olyicheng"]],
ol_lukai: ["male", "wu", 3, ["olxuanzhu", "oljiane"]],

View File

@ -1,4 +1,5 @@
const characterIntro = {
yadan: "雅丹《三国演义》虚构人物西羌丞相。诸葛亮伐魏时魏大都督曹真驰书赴羌西羌国王彻里吉任命雅丹与元帅越吉起兵15万前去增援中了诸葛亮之计被伏兵所困。",
liupan: "刘磐(生卒年不详),山阳高平人,荆州牧刘表从子。与南阳人黄忠共守长沙攸县。为人骁勇,数次为寇于艾、西安诸县。江东孙策于是分海昏、建昌为左右六县,以东莱太史慈为建昌都尉,治海昏,并督诸将共拒刘磐。于是刘磐绝迹不复为寇。",
guotu: "郭图205年字公则颍川治今河南省禹州市人。东汉末年袁绍帐下谋士。韩馥统冀州时郭图与荀谌等人奉袁绍之命说服韩馥让位。袁绍统一河北后郭图与审配等人力劝袁绍统率大军攻打曹操。袁绍死后袁尚继位。郭图与辛评为袁谭效力挑唆袁谭攻击袁尚。建安十年205年郭图和袁谭一同被曹操所杀。",
tianchou: "田畴169年或170年-214年或216年字子泰东汉右北平郡无终人东汉末年隐士。田畴好文习武。汉初平年间其受刘虞派遣去长安呈送指控公孙赞奏章献帝大悦封为骑都尉田畴不受。携诏返回时刘虞已被公孙所杀田畴到刘墓祭拜被公孙所提不久释放。田畴回故乡后率家族及随从数百人隐居徐无山致力农桑数年间增至5000家。制定法条兴建学校一时民风良好乌桓、鲜卑纷纷与其结交。汉建安二十年207年曹操北征乌桓田畴请为向导。上徐无山、出卢龙、过平冈、登白狼堆、至柳城曹军大胜封田畴为亭侯坚辞不受。曹念田功四次封赏终不受乃拜为议郎。建安二十一年216年田畴去世。",

View File

@ -2,6 +2,186 @@ import { lib, game, ui, get, ai, _status } from "../../noname.js";
/** @type { importCharacterConfig['skill'] } */
const skills = {
//鸭蛋
olqingya: {
audio: 2,
trigger: {
player: "useCardToPlayered",
},
filter(event, player) {
if (event.targets.length != 1 || event.target == player || event.target.hasSkill("nodis")) return false;
if (event.card.name != "sha") return false;
const target = event.target;
let left = [],
right = [],
left2 = player,
right2 = player;
while (left2 != target && right2 != target) {
left2 = left2.getPrevious();
right2 = right2.getNext();
if (left2 != target) left.push(left2);
if (right2 != target) right.push(right2);
}
if (target == left2) {
for (const i of left) {
if (i.countDiscardableCards(player)) return true;
}
}
if (target == right2) {
for (const i of right) {
if (i.countDiscardableCards(player)) return true;
}
}
return false;
},
aiJudge(player, target, bool) {
let left = [],
right = [],
left2 = player,
right2 = player,
left3 = false,
right3 = false;
let eff_left = 0,
eff_right = 0;
while (left2 != target && right2 != target) {
left2 = left2.getPrevious();
right2 = right2.getNext();
if (left2 != target) left.push(left2);
if (right2 != target) right.push(right2);
}
const card = { name: "guohe", position: "h" };
if (target == left2) {
for (const i of left) {
if (i.countDiscardableCards(player)) {
left3 = true;
eff_left += get.effect(i, card, player, player);
}
}
}
if (target == right2) {
for (const i of right) {
if (i.countDiscardableCards(player)) {
right3 = true;
eff_right += get.effect(i, card, player, player);
}
}
}
if (left3 && right3) {
if (!bool) return Math.max(eff_left, eff_right);
if (eff_left > Math.max(0, eff_right)) return "↖顺时针";
if (eff_right > Math.max(0, eff_left)) return "逆时针↗";
return "cancel2";
} else if (left3) {
if (bool) return eff_left > 0 ? "↖顺时针" : "cancel2";
return eff_left;
} else if (right3) {
if (bool) return eff_right > 0 ? "逆时针↗" : "cancel2";
return eff_right;
} else return bool ? "cancel2" : 0;
},
async cost(event, trigger, player) {
const choices = [];
const target = trigger.target;
let left = [],
right = [],
left2 = player,
right2 = player;
while (left2 != target && right2 != target) {
left2 = left2.getPrevious();
right2 = right2.getNext();
if (left2 != target) left.push(left2);
if (right2 != target) right.push(right2);
}
if (target == left2) {
for (const i of left) {
if (lib.filter.targetEnabled2(trigger.card, player, i)) {
choices.push("↖顺时针");
break;
}
}
}
if (target == right2) {
for (const i of right) {
if (lib.filter.targetEnabled2(trigger.card, player, i)) {
choices.push("逆时针↗");
break;
}
}
}
choices.push("cancel2");
const result = await player
.chooseControl(choices)
.set("prompt", get.prompt("olqingya"))
.set("prompt2", `弃置自己和${get.translation(trigger.target)}某个方向之间的所有角色(不包括你与其)各一张手牌`)
.set("choices", choices)
.set("ai", () => {
var evt = _status.event.getTrigger();
return lib.skill.olqingya.aiJudge(evt.player, evt.target, true);
})
.forResult();
if (result.control !== "cancel2") {
event.result = {
bool: true,
cost_data: {
control: result.control,
},
};
}
},
async content(event, trigger, player) {
const result = event.cost_data;
const targets = [];
game.log(player, "选择了", "#g" + result.control);
if (result.control == "↖顺时针") {
let current = player.getPrevious();
while (current != trigger.target) {
if (current.countDiscardableCards(player)) targets.push(current);
current = current.getPrevious();
}
} else {
let current = player.getNext();
while (current != trigger.target) {
if (current.countDiscardableCards(player)) targets.push(current);
current = current.getNext();
}
}
for (const current of targets) {
if (!current.countDiscardableCards(player)) continue;
player.line(current);
await player.discardPlayerCard(current, true);
}
await game.asyncDelayx();
},
ai: {
effect: {
player_use(card, player, target) {
if (!target || player._olqingya_judging || ui.selected.targets.length || player == target || target.hasSkill("nodis")) return;
if (typeof card != "object" || card.name != "sha") return false;
player._olqingya_judging = true;
var effect = lib.skill.olqingya.aiJudge(player, target);
delete player._olqingya_judging;
if (effect > 0) return [1, effect / Math.max(0.01, get.attitude(player, player))];
},
},
},
},
oltielun: {
audio: 2,
mod: {
globalFrom(from, to, distance) {
let usedCount = 0;
const stats = from.stat.slice();
stats.reverse();
for (const stat of stats) {
Object.values(stat.card).forEach(cnt => {
usedCount += cnt;
});
if (stat.isRound) break;
}
return distance - usedCount;
},
},
},
//SP孙策
olliantao: {
audio: 2,

View File

@ -1,7 +1,7 @@
const characterSort = {
sp_tianji: ["sunhao", "liuxie", "caoang", "hetaihou", "sunluyu", "ol_wangrong", "zuofen", "ol_bianfuren", "qinghegongzhu", "tengfanglan", "ruiji", "caoxiancaohua", "caoyu"],
sp_sibi: ["ol_lukai", "yangxiu", "guotu", "chenlin", "chengyu", "shixie", "fuwan", "wangyun", "zhugejin", "simalang", "maliang", "buzhi", "dongyun", "kanze", "sunqian", "xizhicai", "sunshao", "duxi", "jianggan", "ol_dengzhi", "ol_yangyi", "ol_dongzhao", "ol_chendeng", "jin_yanghu", "wangyan", "xiahouxuan", "quhuang", "zhanghua", "wangguan", "sunhong", "caoxi", "tianchou"],
sp_tianzhu: ["liyi", "zhangyan", "niujin", "hejin", "hansui", "wutugu", "yanbaihu", "shamoke", "zhugedan", "huangzu", "gaogan", "tadun", "fanjiangzhangda", "ahuinan", "dongtuna", "ol_wenqin"],
sp_tianzhu: ["yadan", "liyi", "zhangyan", "niujin", "hejin", "hansui", "wutugu", "yanbaihu", "shamoke", "zhugedan", "huangzu", "gaogan", "tadun", "fanjiangzhangda", "ahuinan", "dongtuna", "ol_wenqin"],
sp_nvshi: ["ol_dingshangwan", "lingju", "guanyinping", "zhangxingcai", "mayunlu", "dongbai", "zhaoxiang", "ol_zhangchangpu", "daxiaoqiao", "jin_guohuai", "ol_hujinding"],
sp_shaowei: ["simahui", "zhangbao", "zhanglu", "zhugeguo", "xujing", "zhangling", "huangchengyan", "zhangzhi", "lushi"],
sp_huben: ["duanjiong", "ol_mengda", "caohong", "xiahouba", "zhugeke", "zumao", "wenpin", "litong", "mazhong", "heqi", "quyi", "luzhi", "yuejin", "dingfeng", "wuyan", "ol_zhuling", "tianyu", "huojun", "zhaoyǎn", "dengzhong", "ol_furong", "macheng", "ol_zhangyì", "ol_zhujun", "maxiumatie", "luoxian", "ol_huban", "haopu", "ol_qianzhao"],

View File

@ -1239,6 +1239,11 @@ const translates = {
sp_sunce_prefix: "SP",
olliantao: "连讨",
olliantao_info: "出牌阶段开始时你可以令一名其他角色选择一个颜色然后你依次将此颜色的所有手牌当作【决斗】对其使用直到有一方进入濒死状态然后你摸X张牌X为你本次以此法造成的伤害数。若没有角色因本次技能结算受到伤害你摸三张牌本回合手牌上限+3且本回合你不能使用【杀】。",
yadan: "雅丹",
olqingya: "倾轧",
olqingya_info: "当你使用【杀】指定唯一目标后,你可从逆时针方向和顺时针方向中选择一个你与其之间角色最少的方向。你弃置该方向下你与其之间的角色各一张手牌,然后你可以于本回合下个阶段结束时使用其中一张牌。",
oltielun: "铁轮",
oltielun_info: "锁定技。你计算与其他角色的距离-XX为你本轮使用的牌数。",
};
export default translates;

BIN
image/character/yadan.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB