noname/character/old.js

1509 lines
47 KiB
JavaScript
Raw Normal View History

2024-04-15 18:10:02 +00:00
import { lib, game, ui, get, ai, _status } from "../noname.js";
game.import("character", function () {
2020-09-25 10:40:43 +00:00
return {
2024-04-15 18:10:02 +00:00
name: "old",
connect: true,
characterSort: {
old: {
old_standard: ["ol_yuanshu"],
old_shenhua: [
"old_shen_zhaoyun",
"old_caocao",
"yuji",
"zhangjiao",
"old_zhugezhan",
"old_guanqiujian",
"xiahouyuan",
"weiyan",
"old_xiaoqiao",
"pangde",
"xuhuang",
"junk_sunquan",
"huangzhong",
"new_caoren",
"old_chendao",
],
old_refresh: ["old_zhangfei", "old_huatuo", "old_zhaoyun", "ol_huaxiong", "old_guanyu"],
old_yijiang1: [
"masu",
"xushu",
"xin_yujin",
"old_xusheng",
"old_lingtong",
"fazheng",
"old_gaoshun",
"re_yujin",
],
old_yijiang2: [
"old_zhonghui",
"madai",
"old_handang",
"old_liubiao",
"oldre_liubiao",
"old_guanzhang",
"old_wangyi",
],
old_yijiang3: ["liru", "old_zhuran", "old_fuhuanghou", "old_caochong"],
old_yijiang4: ["old_caozhen", "old_chenqun", "old_zhuhuan", "old_caorui"],
old_yijiang5: ["old_caoxiu", "old_zhuzhi"],
old_yijiang67: ["ol_zhangrang", "old_huanghao", "old_liyan"],
old_sp: [
"old_shixie",
"panfeng",
"old_wanglang",
"old_maliang",
"old_zhangxingcai",
"old_wangyun",
"old_dingfeng",
"old_guanyinping",
],
old_yingbian: ["junk_simayi", "old_yangyan", "old_yangzhi"],
old_mobile: ["old_caochun"],
2020-09-25 10:40:43 +00:00
},
},
2024-04-15 18:10:02 +00:00
character: {
old_shixie: ["male", "qun", 3, ["biluan", "lixia"]],
panfeng: ["male", "qun", 4, ["kuangfu"]],
old_shen_zhaoyun: ["male", "shen", 2, ["oldjuejing", "oldlonghun"], ["shu"]],
old_guanyinping: ["female", "shu", 3, ["xueji_old", "oldhuxiao", "oldwuji"]],
old_caocao: ["male", "shen", 3, ["junkguixin", "feiying"], ["die_audio"]],
old_chendao: ["male", "shu", 4, ["drlt_wanglie"]],
old_liyan: ["male", "shu", 3, ["duliang", "fulin"]],
old_guanzhang: ["male", "shu", 4, ["old_fuhun"]],
new_caoren: ["male", "wei", 4, ["moon_jushou", "jiewei"]],
huangzhong: ["male", "shu", 4, ["liegong"]],
junk_sunquan: ["male", "shen", 4, ["dili", "yuheng"], ["wei"]],
old_dingfeng: ["male", "wu", 4, ["fenxun", "duanbing"]],
old_huanghao: ["male", "shu", 3, ["oldqinqing", "oldhuisheng"]],
oldre_liubiao: ["male", "qun", 3, ["zishou", "zongshi"]],
old_liubiao: ["male", "qun", 4, ["oldzishou", "zongshi"]],
old_gaoshun: ["male", "qun", 4, ["xianzhen", "jinjiu"]],
old_caorui: ["male", "wei", 3, ["huituo", "oldmingjian", "xingshuai"], ["zhu"]],
old_handang: ["male", "wu", 4, ["oldgongji", "oldjiefan"]],
old_yangzhi: ["female", "jin", 3, ["wanyi", "maihuo"]],
old_yangyan: ["female", "jin", 3, ["xuanbei", "xianwan"]],
madai: ["male", "shu", 4, ["mashu", "oldqianxi"]],
xuhuang: ["male", "wei", 4, ["gzduanliang"]],
junk_simayi: [
"male",
"jin",
3,
["buchen", "smyyingshi", "xiongzhi", "quanbian"],
["hiddenSkill"],
],
fazheng: ["male", "shu", 3, ["enyuan", "xuanhuo"]],
ol_yuanshu: ["male", "qun", 4, ["wangzun", "tongji"]],
pangde: ["male", "qun", 4, ["mashu", "mengjin"]],
ol_huaxiong: ["male", "qun", 6, ["new_reyaowu"]],
old_wangyun: ["male", "qun", 4, ["wylianji", "moucheng"], ["clan:太原王氏"]],
old_xiaoqiao: ["female", "wu", 3, ["tianxiang", "hongyan"]],
weiyan: ["male", "shu", 4, ["kuanggu"]],
xiahouyuan: ["male", "wei", 4, ["shensu"]],
old_zhangxingcai: ["female", "shu", 3, ["oldshenxian", "qiangwu"]],
old_fuhuanghou: ["female", "qun", 3, ["oldzhuikong", "oldqiuyuan"]],
old_caochong: ["male", "wei", 3, ["oldrenxin", "oldchengxiang"]],
yuji: ["male", "qun", 3, ["old_guhuo"]],
zhangjiao: ["male", "qun", 3, ["leiji", "guidao", "huangtian"], ["zhu"]],
old_zhangfei: ["male", "shu", 4, ["new_repaoxiao", "new_tishen"]],
old_zhaoyun: ["male", "shu", 4, ["longdan", "new_yajiao"]],
old_huatuo: ["male", "qun", 3, ["jijiu", "chulao"]],
old_guanyu: ["male", "shu", 4, ["wusheng", "yijue"]],
old_caochun: ["male", "wei", 4, ["shanjia"]],
masu: ["male", "shu", 3, ["xinzhan", "huilei"]],
xushu: ["male", "shu", 3, ["xswuyan", "jujian"], ["border:wei"]],
liru: ["male", "qun", 3, ["juece", "mieji", "fencheng"]],
xin_yujin: ["male", "wei", 4, ["jieyue"]],
2020-09-25 10:40:43 +00:00
//lusu:['male','wu',3,['haoshi','dimeng']],
//yuanshao:['male','qun',4,['luanji','xueyi'],['zhu']],
2024-04-15 18:10:02 +00:00
old_zhonghui: ["male", "wei", 3, ["zzhenggong", "zquanji", "zbaijiang"], ["clan:颍川钟氏"]],
old_xusheng: ["male", "wu", 4, ["pojun"]],
old_zhuran: ["male", "wu", 4, ["olddanshou"]],
old_lingtong: ["male", "wu", 4, ["oldxuanfeng"]],
old_caoxiu: ["male", "wei", 4, ["taoxi"]],
old_caozhen: ["male", "wei", 4, ["sidi"]],
old_maliang: ["male", "shu", 3, ["xiemu", "naman"]],
old_chenqun: ["male", "wei", 3, ["dingpin", "oldfaen"]],
old_zhuhuan: ["male", "wu", 4, ["youdi"]],
old_zhuzhi: ["male", "wu", 4, ["anguo"]],
2024-04-15 18:10:02 +00:00
old_zhugezhan: ["male", "shu", 3, ["old_zuilun", "old_fuyin"]],
ol_zhangrang: ["male", "qun", 3, ["xintaoluan"], ["sex:male_castrated"]],
2020-10-27 10:59:52 +00:00
//ol_manchong:['male','wei',3,['yuce','junxing']],
2024-04-15 18:10:02 +00:00
old_guanqiujian: ["male", "wei", 4, ["drlt_zhenrong", "drlt_hongju"], []],
old_wanglang: ["male", "wei", 3, ["gushe", "jici"]],
old_wangyi: ["female", "wei", 3, ["oldzhenlie", "oldmiji"]],
re_yujin: ["male", "wei", 4, ["yizhong"]],
2020-09-25 10:40:43 +00:00
},
2024-04-15 18:10:02 +00:00
skill: {
2023-10-24 17:30:20 +00:00
//山包初版神赵
2024-04-15 18:10:02 +00:00
oldjuejing: {
audio: "xinjuejing",
trigger: { player: "phaseDrawBegin2" },
filter: function (event, player) {
return !event.numFixed && player.getHp() < player.maxHp;
2023-10-24 17:30:20 +00:00
},
2024-04-15 18:10:02 +00:00
forced: true,
content: function () {
trigger.num += player.getDamagedHp();
2023-10-24 17:30:20 +00:00
},
2024-04-15 18:10:02 +00:00
mod: {
maxHandcard: (player, num) => num + 2,
2023-10-24 17:30:20 +00:00
},
},
2024-04-15 18:10:02 +00:00
oldlonghun: {
audio: "relonghun",
inherit: "xinlonghun",
prompt: () =>
`${get.cnNumber(
Math.max(1, get.player().getHp())
)}牌当做杀牌当做桃牌当做闪牌当做无懈可击使用或打出`,
selectCard: () => Math.max(1, get.player().getHp()),
complexCard: true,
precontent: function () {
2023-10-24 17:30:20 +00:00
delete event.result.skill;
2024-04-15 18:10:02 +00:00
player.logSkill("oldlonghun");
2023-10-24 17:30:20 +00:00
},
2024-04-15 18:10:02 +00:00
ai: {
respondSha: true,
respondShan: true,
skillTagFilter: function (player, tag) {
2023-10-24 17:30:20 +00:00
var name;
2024-04-15 18:10:02 +00:00
switch (tag) {
case "respondSha":
name = "diamond";
break;
case "respondShan":
name = "club";
break;
case "save":
name = "heart";
break;
2023-10-24 17:30:20 +00:00
}
2024-04-15 18:10:02 +00:00
if (!player.countCards("hes", { suit: name })) return false;
2023-10-24 17:30:20 +00:00
},
2024-04-15 18:10:02 +00:00
order: function (item, player) {
if (player && _status.event.type == "phase") {
var max = 0;
var list = ["sha", "tao"];
var map = { sha: "diamond", tao: "heart" };
for (var i = 0; i < list.length; i++) {
var name = list[i];
if (
player.countCards("hes", function (card) {
return (
(name != "sha" || get.value(card) < 5) &&
get.suit(card, player) == map[name]
);
}) >= Math.max(1, player.getHp()) &&
player.getUseValue({
name: name,
nature: name == "sha" ? "fire" : null,
}) > 0
) {
var temp = get.order({
name: name,
nature: name == "sha" ? "fire" : null,
});
if (temp > max) max = temp;
2023-10-24 17:30:20 +00:00
}
}
2024-04-15 18:10:02 +00:00
max /= 1.1;
2023-10-24 17:30:20 +00:00
return max;
}
return 2;
},
},
2024-04-15 18:10:02 +00:00
hiddenCard: function (player, name) {
if (name == "wuxie" && _status.connectMode && player.countCards("hes") > 0) return true;
if (name == "wuxie")
return (
player.countCards("hes", { suit: "spade" }) >= Math.max(1, get.player().getHp())
);
if (name == "tao")
return (
player.countCards("hes", { suit: "heart" }) >= Math.max(1, get.player().getHp())
);
2023-10-24 17:30:20 +00:00
},
},
//魏武帝
2024-04-15 19:16:01 +00:00
junkguixin: {
forbid: ["guozhan"],
init: function () {
if (!_status.junkguixin) {
_status.junkguixin = [];
if (!_status.characterlist) {
2023-10-15 16:12:04 +00:00
lib.skill.pingjian.initList();
}
2024-04-15 18:10:02 +00:00
for (const name of _status.characterlist) {
if (!lib.character[name][3]) continue;
_status.junkguixin.addArray(
lib.character[name][3].filter((skill) => {
var info = get.info(skill);
return info && info.zhuSkill && (!info.ai || !info.ai.combo);
})
);
}
}
},
2024-04-15 18:10:02 +00:00
unique: true,
audio: "guixin",
trigger: { player: "phaseEnd" },
direct: true,
content: function () {
"step 0";
var controls = ["获得技能", "修改势力", "cancel2"];
if (!_status.junkguixin.some((skill) => !player.hasSkill(skill, null, false, false)))
controls.shift();
player
.chooseControl(controls)
.set("prompt", get.prompt2("junkguixin"))
.set("ai", () => (_status.event.controls.length == 3 ? "获得技能" : "cancel2"));
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.control != "cancel2") {
var next = game.createEvent("junkguixinx");
next.player = player;
next.setContent(lib.skill.junkguixin["content_" + result.control]);
}
},
2024-04-15 18:10:02 +00:00
content_获得技能: function () {
"step 0";
var list = _status.junkguixin
.slice()
.filter((skill) => !player.hasSkill(skill, null, false, false));
if (!list.length) {
event.finish();
return;
}
list = list.map((skill) => {
return [
skill,
2024-04-15 18:10:02 +00:00
'<div class="popup text" style="width:calc(100% - 10px);display:inline-block"><div class="skill">【' +
get.translation(skill) +
"】</div><div>" +
lib.translate[skill + "_info"] +
"</div></div>",
];
});
2024-04-15 18:10:02 +00:00
player
.chooseButton(["归心:选择获得一个主公技", [list, "textbutton"]], true)
.set("ai", (button) => 1 + Math.random());
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
player.logSkill("junkguixin");
player.addSkills(result.links[0]);
}
},
2024-04-15 18:10:02 +00:00
content_修改势力: function () {
"step 0";
player
.chooseTarget(
"请选择【归心】的目标",
"更改一名其他角色的势力",
lib.filter.notMe,
true
)
.set("ai", (target) => 1 + Math.random());
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var target = result.targets[0];
event.target = target;
player.logSkill("junkguixin", target);
var list = lib.group.slice();
list.removeArray(["shen", target.group]);
player
.chooseControl(list)
.set("prompt", "请选择" + get.translation(target) + "变更的势力")
.set("ai", () => _status.event.controls.randomGet());
} else event.finish();
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
if (result.control) {
player.popup(get.translation(result.control + "2"));
target.changeGroup(result.control);
}
},
},
2024-04-15 18:10:02 +00:00
oldqinqing: {
audio: "qinqing",
mode: ["identity", "versus"],
available: function (mode) {
if (mode == "versus" && _status.mode != "four") return false;
if (mode == "identity" && _status.mode == "purple") return false;
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
trigger: { player: "phaseJieshuBegin" },
direct: true,
filter: function (event, player) {
var zhu = get.zhu(player);
if (!zhu || !zhu.isZhu) return false;
return game.hasPlayer(function (current) {
return current != zhu && current != player && current.inRange(zhu);
2023-03-31 11:34:38 +00:00
});
2024-04-15 18:10:02 +00:00
},
content: function () {
"step 0";
player
.chooseTarget(get.prompt2("dcqinqing"), function (card, player, target) {
var zhu = get.zhu(player);
return target != player && target.inRange(zhu);
})
.set("ai", function (target) {
var zhu = get.zhu(player);
var he = target.countCards("he");
if (get.attitude(_status.event.player, target) > 0) {
if (target.countCards("h") > zhu.countCards("h") + 1) return 0.1;
} else {
if (he > zhu.countCards("h") + 1) return 2;
if (he > 0) return 1;
}
return 0;
});
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var target = result.targets[0];
event.target = target;
player.logSkill("dcqinqing", target);
if (target.countDiscardableCards(player, "he"))
player.discardPlayerCard(target, "he", true);
2023-03-31 11:34:38 +00:00
target.draw();
2024-04-15 18:10:02 +00:00
} else {
2023-03-31 11:34:38 +00:00
event.finish();
}
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
var zhu = get.zhu(player);
if (zhu && zhu.isIn()) {
if (target.countCards("h") > zhu.countCards("h")) player.draw();
2023-03-31 11:34:38 +00:00
}
2024-04-15 18:10:02 +00:00
},
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
oldhuisheng: {
audio: "huisheng",
trigger: { player: "damageBegin4" },
direct: true,
filter: function (event, player) {
if (!player.countCards("he")) return false;
if (!event.source || event.source == player || !event.source.isIn()) return false;
if (player.storage.oldhuisheng && player.storage.oldhuisheng.includes(event.source))
return false;
2023-03-31 11:34:38 +00:00
return true;
},
2024-04-15 18:10:02 +00:00
init: function (player) {
if (player.storage.oldhuisheng) player.storage.oldhuisheng = [];
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
content: function () {
"step 0";
if (!player.storage.oldhuisheng) player.storage.oldhuisheng = [];
2023-03-31 11:34:38 +00:00
player.storage.oldhuisheng.push(trigger.source);
2024-04-15 18:10:02 +00:00
var att = get.attitude(player, trigger.source) > 0;
var goon = false;
if (player.hp == 1) {
goon = true;
} else {
var he = player.getCards("he");
var num = 0;
for (var i = 0; i < he.length; i++) {
if (get.value(he[i]) < 8) {
2023-03-31 11:34:38 +00:00
num++;
2024-04-15 18:10:02 +00:00
if (num >= 2) {
goon = true;
break;
2023-03-31 11:34:38 +00:00
}
}
}
}
2024-04-15 18:10:02 +00:00
player
.chooseCard(
"he",
[1, player.countCards("he")],
get.prompt2("oldhuisheng", trigger.source)
)
.set("ai", function (card) {
if (_status.event.att) {
return 10 - get.value(card);
}
if (_status.event.goon) {
return 8 - get.value(card);
}
if (!ui.selected.cards.length) {
return 7 - get.value(card);
}
return 0;
})
.set("goon", goon)
.set("att", att);
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
player.logSkill("oldhuisheng", trigger.source);
2023-03-31 11:34:38 +00:00
game.delay();
2024-04-15 18:10:02 +00:00
event.num = result.cards.length;
var goon = false;
if (event.num > 2 || get.attitude(trigger.source, player) >= 0) {
goon = true;
2023-03-31 11:34:38 +00:00
}
2024-04-15 18:10:02 +00:00
var forced = false;
var str = "获得其中一张牌并防止伤害";
if (trigger.source.countCards("he") < event.num) {
forced = true;
} else {
str += ",或取消并弃置" + get.cnNumber(result.cards.length) + "张牌";
2023-03-31 11:34:38 +00:00
}
2024-04-15 18:10:02 +00:00
trigger.source
.chooseButton([str, result.cards], forced)
.set("ai", function (button) {
if (_status.event.goon) {
return get.value(button.link);
}
return get.value(button.link) - 8;
})
.set("goon", goon);
} else {
2023-03-31 11:34:38 +00:00
event.finish();
}
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var card = result.links[0];
trigger.source.gain(card, player, "giveAuto", "bySelf");
2023-03-31 11:34:38 +00:00
trigger.cancel();
2024-04-15 18:10:02 +00:00
} else {
trigger.source.chooseToDiscard(event.num, true, "he");
2023-03-31 11:34:38 +00:00
}
2024-04-15 18:10:02 +00:00
},
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
oldzishou: {
audio: "zishou",
audioname: ["re_liubiao"],
trigger: { player: "phaseDrawBegin2" },
check: function (event, player) {
return (
(player.countCards("h") <= 2 && player.getDamagedHp() >= 2) ||
player.skipList.includes("phaseUse")
);
},
filter: function (event, player) {
return !event.numFixed && player.isDamaged();
},
content: function () {
trigger.num += player.getDamagedHp();
player.skip("phaseUse");
},
ai: {
threaten: 1.5,
},
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
oldgongji: {
audio: "gongji",
enable: ["chooseToUse", "chooseToRespond"],
locked: false,
filterCard: { type: "equip" },
position: "hes",
viewAs: {
name: "sha",
storage: { oldgongji: true },
},
viewAsFilter: function (player) {
if (!player.countCards("hes", { type: "equip" })) return false;
},
prompt: "将一张装备牌当无距离限制的【杀】使用或打出",
check: function (card) {
var val = get.value(card);
if (_status.event.name == "chooseToRespond") return 1 / Math.max(0.1, val);
return 5 - val;
},
mod: {
targetInRange: function (card) {
if (card.storage && card.storage.oldgongji) return true;
2023-03-31 11:34:38 +00:00
},
},
2024-04-15 18:10:02 +00:00
ai: {
respondSha: true,
skillTagFilter: function (player) {
if (!player.countCards("hes", { type: "equip" })) return false;
2023-03-31 11:34:38 +00:00
},
},
},
2024-04-15 18:10:02 +00:00
oldjiefan: {
audio: "jiefan",
enable: "chooseToUse",
filter: function (event, player) {
return event.type == "dying" && _status.currentPhase && _status.currentPhase.isIn();
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
direct: true,
content: function () {
player
.chooseToUse(function (card, player, event) {
if (get.name(card) != "sha") return false;
return lib.filter.filterCard.apply(this, arguments);
}, get.prompt2("oldjiefan"))
.set("targetRequired", true)
.set("complexSelect", true)
.set("filterTarget", function (card, player, target) {
if (
target != _status.currentPhase &&
!ui.selected.targets.includes(_status.currentPhase)
)
return false;
return lib.filter.filterTarget.apply(this, arguments);
})
.set("logSkill", "oldjiefan")
.set("oncard", function () {
_status.event.player.addTempSkill("oldjiefan_recover");
})
.set("custom", {
add: {},
replace: {
window: () => {
ui.click.cancel();
},
},
});
},
ai: {
save: true,
order: 3,
result: { player: 1 },
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
subSkill: {
recover: {
2023-11-30 22:41:08 +00:00
// audio:'jiefan',
2024-04-15 18:10:02 +00:00
trigger: { source: "damageBegin2" },
filter: function (event, player) {
return event.getParent(4).name == "oldjiefan";
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
forced: true,
popup: false,
charlotte: true,
content: function () {
2023-03-31 11:34:38 +00:00
trigger.cancel();
2024-04-15 18:10:02 +00:00
var evt = event.getParent("_save");
var card = { name: "tao", isCard: true };
if (evt && evt.dying && player.canUse(card, evt.dying)) {
player.useCard(card, evt.dying, "oldjiefan_recover");
2023-03-31 11:34:38 +00:00
}
2024-04-15 18:10:02 +00:00
},
},
},
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
oldmingjian: {
audio: "mingjian",
trigger: { player: "phaseUseBefore" },
filter: function (event, player) {
return player.countCards("h");
},
direct: true,
content: function () {
"step 0";
player
.chooseTarget(
get.prompt("oldmingjian"),
"跳过出牌阶段并将所有手牌交给一名其他角色,你结束此回合,然后其于此回合后获得一个额外的出牌阶段",
lib.filter.notMe
)
.set("ai", (target) => {
var player = _status.event.player,
att = get.attitude(player, target);
if (target.hasSkillTag("nogain")) return 0.01 * att;
if (player.countCards("h") == player.countCards("h", "du")) return -att;
if (target.hasJudge("lebu")) att *= 1.25;
if (get.attitude(player, target) > 3) {
var basis = get.threaten(target) * att;
if (
player == get.zhu(player) &&
player.hp <= 2 &&
player.countCards("h", "shan") &&
!game.hasPlayer(function (current) {
return (
get.attitude(current, player) > 3 &&
current.countCards("h", "tao") > 0
);
})
)
return 0;
if (target.countCards("h") + player.countCards("h") > target.hp + 2)
return basis * 0.8;
return basis;
}
return 0;
});
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
var target = result.targets[0];
event.target = target;
player.logSkill("oldmingjian", target);
player.give(player.getCards("h"), target);
2023-03-31 11:34:38 +00:00
trigger.cancel();
2024-04-15 18:10:02 +00:00
} else event.finish();
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
var evt = trigger.getParent("phase");
if (evt) {
game.log(player, "结束了回合");
2023-03-31 11:34:38 +00:00
evt.finish();
}
2024-04-15 18:10:02 +00:00
var next = target.insertPhase();
next._noTurnOver = true;
next.phaseList = ["phaseUse"];
2024-02-18 04:34:59 +00:00
//next.setContent(lib.skill.oldmingjian.phase);
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
phase: function () {
"step 0";
2023-03-31 11:34:38 +00:00
player.phaseUse();
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
game.broadcastAll(function () {
if (ui.tempnowuxie) {
2023-03-31 11:34:38 +00:00
ui.tempnowuxie.close();
delete ui.tempnowuxie;
}
});
},
},
2024-04-15 18:10:02 +00:00
oldshenxian: {
audio: "shenxian",
inherit: "shenxian",
2020-09-25 10:40:43 +00:00
},
2024-04-15 18:10:02 +00:00
old_guhuo: {
audio: 2,
enable: ["chooseToUse", "chooseToRespond"],
hiddenCard: function (player, name) {
return lib.inpile.includes(name) && player.countCards("hs") > 0;
},
filter: function (event, player) {
if (!player.countCards("hs")) return false;
for (var i of lib.inpile) {
var type = get.type(i);
if (
(type == "basic" || type == "trick") &&
event.filterCard(get.autoViewAs({ name: i }, "unsure"), player, event)
)
return true;
if (i == "sha") {
for (var j of lib.inpile_nature) {
if (
event.filterCard(
get.autoViewAs({ name: i, nature: j }, "unsure"),
player,
event
)
)
return true;
2023-03-31 11:34:38 +00:00
}
}
2020-09-25 10:40:43 +00:00
}
return false;
},
2024-04-15 18:10:02 +00:00
chooseButton: {
dialog: function (event, player) {
var list = [];
for (var i of lib.inpile) {
if (event.type != "phase")
if (!event.filterCard(get.autoViewAs({ name: i }, "unsure"), player, event))
continue;
var type = get.type(i);
if (type == "basic" || type == "trick") list.push([type, "", i]);
if (i == "sha") {
if (event.type != "phase")
if (
!event.filterCard(
get.autoViewAs({ name: i, nature: j }, "unsure"),
player,
event
)
)
continue;
for (var j of lib.inpile_nature) list.push(["基本", "", "sha", j]);
2020-09-25 10:40:43 +00:00
}
}
2024-04-15 18:10:02 +00:00
return ui.create.dialog("蛊惑", [list, "vcard"]);
2020-09-25 10:40:43 +00:00
},
2024-04-15 18:10:02 +00:00
check: function (button) {
var player = _status.event.player;
var order = Math.max(0, get.order(card) + 1);
var enemyNum = game.countPlayer(function (current) {
return (
current != player &&
(get.realAttitude || get.attitude)(current, player) < 0 &&
current.hp > 0
);
2023-03-31 11:34:38 +00:00
});
2024-04-15 18:10:02 +00:00
var card = { name: button.link[2], nature: button.link[3] };
if (
player.isDying() &&
!player.hasCard(function (cardx) {
if (get.suit(cardx) != "heart") return false;
var mod2 = game.checkMod(cardx, player, "unchanged", "cardEnabled2", player);
if (mod2 != "unchanged") return mod2;
var mod = game.checkMod(
cardx,
player,
player,
"unchanged",
"cardSavable",
player
);
if (mod != "unchanged") return mod;
var savable = get.info(cardx).savable;
if (typeof savable == "function") savable = savable(card, player, player);
return savable;
}, "hs")
) {
if (
!player.getStorage("old_guhuo_cheated").includes(card.name + card.nature) &&
Math.random() < 0.4
)
return 1;
2023-03-31 11:34:38 +00:00
return 0;
}
2024-04-15 18:10:02 +00:00
var val = _status.event.getParent().type == "phase" ? player.getUseValue(card) : 1;
if (
player.getStorage("old_guhuo_cheated").includes(card.name + card.nature) &&
!player.hasCard(function (cardx) {
if (card.name == cardx.name) {
if (card.name != "sha") return true;
return get.is.sameNature(card, cardx);
2023-03-31 11:34:38 +00:00
}
return false;
2024-04-15 18:10:02 +00:00
}, "hs") &&
Math.random() < 0.7
)
return 0;
if (val <= 0) return 0;
if (enemyNum) {
if (
!player.hasCard(function (cardx) {
if (card.name == cardx.name) {
if (card.name != "sha") return true;
return get.is.sameNature(card, cardx);
}
return false;
}, "hs")
) {
if (get.value(card, player, "raw") < 6)
return Math.sqrt(val) * (0.25 + Math.random() / 1.5);
if (enemyNum <= 2) return Math.sqrt(val) / 1.5 + order * 10;
2023-03-31 11:34:38 +00:00
return 0;
}
2024-04-15 18:10:02 +00:00
return 3 * val + order * 10;
2020-09-25 10:40:43 +00:00
}
2024-04-15 18:10:02 +00:00
return val + order * 10;
2020-09-25 10:40:43 +00:00
},
2024-04-15 18:10:02 +00:00
backup: function (links, player) {
2020-09-25 10:40:43 +00:00
return {
2024-04-15 18:10:02 +00:00
filterCard: function (card, player, target) {
var result = true;
var suit = card.suit,
number = card.number;
card.suit = "none";
card.number = null;
var mod = game.checkMod(card, player, "unchanged", "cardEnabled2", player);
if (mod != "unchanged") result = mod;
card.suit = suit;
card.number = number;
2023-03-31 11:34:38 +00:00
return result;
},
2024-04-15 18:10:02 +00:00
selectCard: 1,
position: "hs",
ignoreMod: true,
aiUse: Math.random(),
viewAs: {
name: links[0][2],
nature: links[0][3],
suit: "none",
number: null,
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
ai1: function (card) {
var player = _status.event.player;
var enemyNum = game.countPlayer(function (current) {
return (
current != player &&
(get.realAttitude || get.attitude)(current, player) < 0 &&
current.hp > 0
);
2023-03-31 11:34:38 +00:00
});
2024-04-15 18:10:02 +00:00
var cardx = lib.skill.old_guhuo_backup.viewAs;
if (enemyNum) {
if (
(card.name == cardx.name &&
(card.name != "sha" || get.is.sameNature(card, cardx))) ||
player
.getStorage("old_guhuo_cheated")
.includes(card.name + card.nature)
)
return (get.suit(card) == "heart" ? 8 : 4) + Math.random() * 3;
else if (lib.skill.old_guhuo_backup.aiUse < 0.5 && !player.isDying())
return 0;
2023-03-31 11:34:38 +00:00
}
2024-04-15 18:10:02 +00:00
return get.value(cardx) - get.value(card);
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
precontent: function () {
player.logSkill("old_guhuo");
player.addTempSkill("old_guhuo_guess");
var card = event.result.cards[0];
event.result.card.suit = get.suit(card);
event.result.card.number = get.number(card);
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
};
2020-09-25 10:40:43 +00:00
},
2024-04-15 18:10:02 +00:00
prompt: function (links, player) {
return (
"将一张手牌当做" +
(links[0][3] ? get.translation(links[0][3]) : "") +
"【" +
get.translation(links[0][2]) +
"】" +
(_status.event.name == "chooseToRespond" ? "打出" : "使用")
);
2020-09-25 10:40:43 +00:00
},
},
2024-04-15 18:10:02 +00:00
ai: {
save: true,
respondSha: true,
respondShan: true,
fireAttack: true,
skillTagFilter: function (player) {
if (!player.countCards("hs")) return false;
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
threaten: 1.2,
order: 10,
result: { player: 1 },
},
subSkill: {
cheated: {
trigger: {
player: "gainAfter",
global: "loseAsyncAfter",
2023-03-31 11:34:38 +00:00
},
2024-04-15 18:10:02 +00:00
charlotte: true,
forced: true,
silent: true,
popup: false,
firstDo: true,
onremove: true,
filter: function (event, player) {
if (event.getParent().name == "draw") return true;
var cards = event.getg(player);
if (!cards.length) return false;
return game.hasPlayer((current) => {
if (current == player) return false;
var evt = event.getl(current);
if (evt && evt.cards && evt.cards.length) return true;
2023-03-31 11:34:38 +00:00
return false;
});
},
2024-04-15 18:10:02 +00:00
content: function () {
player.removeSkill("old_guhuo_cheated");
},
},
},
2020-09-25 10:40:43 +00:00
},
2024-04-15 18:10:02 +00:00
old_guhuo_guess: {
audio: "old_guhuo",
trigger: {
player: ["useCardBefore", "respondBefore"],
},
forced: true,
silent: true,
popup: false,
firstDo: true,
charlotte: true,
filter: function (event, player) {
return event.skill && event.skill.indexOf("old_guhuo_") == 0;
},
content: function () {
"step 0";
event.fake = false;
event.goon = true;
event.betrayers = [];
var card = trigger.cards[0];
if (
card.name != trigger.card.name ||
(card.name == "sha" && !get.is.sameNature(trigger.card, card))
)
event.fake = true;
if (event.fake) {
player.addSkill("old_guhuo_cheated");
player.markAuto("old_guhuo_cheated", [trigger.card.name + trigger.card.nature]);
2020-09-25 10:40:43 +00:00
}
2024-04-15 18:10:02 +00:00
player.popup(trigger.card.name, "metal");
player.lose(card, ui.ordering).relatedEvent = trigger;
trigger.throw = false;
trigger.skill = "old_guhuo_backup";
game.log(
player,
"声明",
trigger.targets && trigger.targets.length ? "对" : "",
trigger.targets || "",
trigger.name == "useCard" ? "使用" : "打出",
trigger.card
);
event.prompt =
get.translation(player) +
"声明" +
(trigger.targets && trigger.targets.length
? "对" + get.translation(trigger.targets)
: "") +
(trigger.name == "useCard" ? "使用" : "打出") +
(get.translation(trigger.card.nature) || "") +
get.translation(trigger.card.name) +
",是否质疑?";
event.targets = game
.filterPlayer((i) => i != player && i.hp > 0)
.sortBySeat(_status.currentPhase);
2024-04-15 18:10:02 +00:00
game.broadcastAll(
function (card, player) {
_status.old_guhuoNode = card.copy("thrown");
if (lib.config.cardback_style != "default") {
_status.old_guhuoNode.style.transitionProperty = "none";
2023-03-31 11:34:38 +00:00
ui.refresh(_status.old_guhuoNode);
2024-04-15 18:10:02 +00:00
_status.old_guhuoNode.classList.add("infohidden");
2023-03-31 11:34:38 +00:00
ui.refresh(_status.old_guhuoNode);
2024-04-15 18:10:02 +00:00
_status.old_guhuoNode.style.transitionProperty = "";
} else {
_status.old_guhuoNode.classList.add("infohidden");
2023-03-31 11:34:38 +00:00
}
2024-04-15 18:10:02 +00:00
_status.old_guhuoNode.style.transform =
"perspective(600px) rotateY(180deg) translateX(0)";
player.$throwordered2(_status.old_guhuoNode);
},
trigger.cards[0],
player
);
event.onEnd01 = function () {
_status.old_guhuoNode.removeEventListener(
"webkitTransitionEnd",
_status.event.onEnd01
);
setTimeout(function () {
_status.old_guhuoNode.style.transition = "all ease-in 0.3s";
_status.old_guhuoNode.style.transform = "perspective(600px) rotateY(270deg)";
var onEnd = function () {
_status.old_guhuoNode.classList.remove("infohidden");
_status.old_guhuoNode.style.transition = "all 0s";
ui.refresh(_status.old_guhuoNode);
_status.old_guhuoNode.style.transform = "perspective(600px) rotateY(-90deg)";
ui.refresh(_status.old_guhuoNode);
_status.old_guhuoNode.style.transition = "";
ui.refresh(_status.old_guhuoNode);
_status.old_guhuoNode.style.transform = "";
_status.old_guhuoNode.removeEventListener("webkitTransitionEnd", onEnd);
};
2023-03-31 11:34:38 +00:00
_status.old_guhuoNode.listenTransition(onEnd);
2024-04-15 18:10:02 +00:00
}, 300);
2023-03-31 11:34:38 +00:00
};
2024-04-15 18:10:02 +00:00
if (!event.targets.length) event.goto(3);
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
event.target = event.targets.shift();
event.target
.chooseButton([event.prompt, [["reguhuo_ally", "reguhuo_betray"], "vcard"]], true)
.set("ai", function (button) {
var player = _status.event.player;
var evt = _status.event.getParent("old_guhuo_guess"),
evtx = evt.getTrigger();
if (!evt) return Math.random();
var card = { name: evtx.card.name, nature: evtx.card.nature, isCard: true };
var ally = button.link[2] == "reguhuo_ally";
if (ally && (player.hp <= 1 || get.attitude(player, evt.player) >= 0)) return 1.1;
if (!ally && get.effect(player, { name: "losehp" }, player, player) >= 0)
return 10;
if (!ally && get.attitude(player, evt.player) < 0) {
if (evtx.name == "useCard") {
var eff = 0;
var targetsx = evtx.targets || [];
for (var target of targetsx) {
var isMe = target == evt.player;
eff +=
get.effect(target, card, evt.player, player) / (isMe ? 1.35 : 1);
}
eff /= 1.5 * targetsx.length || 1;
if (eff > 0) return 0;
if (eff < -7)
return (
(Math.random() + Math.pow(-(eff + 7) / 8, 2)) /
Math.sqrt(evt.betrayers.length + 1) +
(player.hp - 3) * 0.05 +
Math.max(0, 4 - evt.player.hp) * 0.05 -
(player.hp == 1 && !get.tag(card, "damage") ? 0.2 : 0)
);
return (
Math.pow(
(get.value(card, evt.player, "raw") - 4) / (eff == 0 ? 3.1 : 10),
2
) /
Math.sqrt(evt.betrayers.length || 1) +
(player.hp - 3) * 0.05 +
Math.max(0, 4 - evt.player.hp) * 0.05
);
2023-03-31 11:34:38 +00:00
}
2024-04-15 18:10:02 +00:00
if (
evt.player
.getStorage("old_guhuo_cheated")
.includes(card.name + card.nature)
)
return Math.random() + 0.3;
2023-03-31 11:34:38 +00:00
}
2024-04-15 18:10:02 +00:00
return Math.random();
});
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
if (result.links[0][2] == "reguhuo_betray") {
2023-03-31 11:34:38 +00:00
target.addExpose(0.2);
2024-04-15 18:10:02 +00:00
game.log(target, "#y质疑");
target.popup("质疑!", "fire");
2023-03-31 11:34:38 +00:00
event.betrayers.push(target);
2024-04-15 18:10:02 +00:00
} else {
game.log(target, "#g不质疑");
target.popup("不质疑", "wood");
2023-03-31 11:34:38 +00:00
}
2024-04-15 18:10:02 +00:00
if (targets.length) event.goto(1);
2024-04-15 18:31:36 +00:00
"step 3";
2023-03-31 11:34:38 +00:00
game.delayx();
2024-04-15 18:10:02 +00:00
game.broadcastAll(function (onEnd) {
_status.event.onEnd01 = onEnd;
if (_status.old_guhuoNode) _status.old_guhuoNode.listenTransition(onEnd, 300);
}, event.onEnd01);
2024-04-15 18:31:36 +00:00
"step 4";
2023-03-31 11:34:38 +00:00
game.delay(2);
2024-04-15 18:31:36 +00:00
"step 5";
2024-04-15 18:10:02 +00:00
if (!event.betrayers.length) {
2023-03-31 11:34:38 +00:00
event.goto(7);
}
2024-04-15 18:31:36 +00:00
"step 6";
2024-04-15 18:10:02 +00:00
if (event.fake) {
for (var target of event.betrayers) {
target.popup("质疑正确", "wood");
2020-09-25 10:40:43 +00:00
}
2024-04-15 18:10:02 +00:00
event.goon = false;
} else {
for (var target of event.betrayers) {
target.popup("质疑错误", "fire");
2023-03-31 11:34:38 +00:00
target.loseHp();
}
2024-04-15 18:10:02 +00:00
if (get.suit(trigger.cards[0], player) != "heart") {
event.goon = false;
2020-09-25 10:40:43 +00:00
}
}
2024-04-15 18:31:36 +00:00
"step 7";
2024-04-15 18:10:02 +00:00
if (!event.goon) {
game.log(player, "声明的", trigger.card, "作废了");
2023-03-31 11:34:38 +00:00
trigger.cancel();
trigger.getParent().goto(0);
2024-04-15 18:10:02 +00:00
trigger.line = false;
2023-03-31 11:34:38 +00:00
}
2024-04-15 18:31:36 +00:00
"step 8";
2023-03-31 11:34:38 +00:00
game.delay();
2024-04-15 18:31:36 +00:00
"step 9";
2024-04-15 18:10:02 +00:00
if (!event.goon) {
if (event.fake) game.asyncDraw(event.betrayers);
2023-03-31 11:34:38 +00:00
game.broadcastAll(ui.clear);
}
2020-09-25 10:40:43 +00:00
},
},
2024-04-15 18:10:02 +00:00
old_zuilun: {
audio: "xinfu_zuilun",
subSkill: {
e: {},
h: {},
},
enable: "phaseUse",
usable: 2,
filterTarget: function (card, player, target) {
if (player == target) return false;
var pos = "he";
if (player.hasSkill("old_zuilun_h")) pos = "e";
if (player.hasSkill("old_zuilun_e")) pos = "h";
return target.countGainableCards(player, pos) > 0;
},
content: function () {
"step 0";
var pos = "he";
if (player.hasSkill("old_zuilun_h")) pos = "e";
if (player.hasSkill("old_zuilun_e")) pos = "h";
player.gainPlayerCard(target, pos, true);
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool && result.cards && result.cards.length) {
2020-09-25 10:40:43 +00:00
target.draw();
2024-04-15 18:10:02 +00:00
var pos = result.cards[0].original;
if (pos == "h" || pos == "e")
player.addTempSkill("old_zuilun_" + pos, "phaseUseAfter");
2020-09-25 10:40:43 +00:00
}
},
2024-04-15 18:10:02 +00:00
ai: {
order: 7,
result: {
target: -1,
2020-09-25 10:40:43 +00:00
},
},
},
2024-04-15 18:10:02 +00:00
old_fuyin: {
mod: {
targetEnabled: function (card, player, target) {
if (
(card.name == "juedou" || card.name == "sha" || card.name == "huogong") &&
player != target &&
player.countCards("h") >= target.countCards("h") &&
target.hasEmptySlot(2)
)
return false;
2020-09-25 10:40:43 +00:00
},
},
},
2024-04-15 18:10:02 +00:00
old_jijun: {
marktext: "方",
audio: "xinfu_jijun",
intro: {
content: "expansion",
markcount: "expansion",
},
onremove: function (player, skill) {
var cards = player.getExpansions(skill);
if (cards.length) player.loseToDiscardpile(cards);
},
enable: "phaseUse",
filterCard: true,
selectCard: [1, Infinity],
filter: function (event, player) {
return player.countCards("h") > 0;
},
check: function (card) {
var player = _status.event.player;
if (36 - player.getExpansions("old_jijun").length <= player.countCards("h")) return 1;
return 5 - get.value(card);
},
discard: false,
lose: false,
content: function () {
player.addToExpansion(cards, player, "give").gaintag.add("old_jijun");
},
ai: { order: 1, result: { player: 1 } },
2020-09-25 10:40:43 +00:00
},
2024-04-15 18:10:02 +00:00
old_fangtong: {
trigger: {
player: "phaseJieshuBegin",
2020-09-25 10:40:43 +00:00
},
2024-04-15 18:10:02 +00:00
audio: "xinfu_fangtong",
forced: true,
skillAnimation: true,
animationColor: "metal",
filter: function (event, player) {
return player.getExpansions("old_jijun").length > 35;
2020-09-25 10:40:43 +00:00
},
2024-04-15 18:10:02 +00:00
content: function () {
var winners = player.getFriends();
game.over(player == game.me || winners.includes(game.me));
2020-09-25 10:40:43 +00:00
},
},
2024-04-15 18:10:02 +00:00
oldanxu: {
enable: "phaseUse",
usable: 1,
multitarget: true,
audio: 2,
filterTarget: function (card, player, target) {
if (player == target) return false;
var num = target.countCards("h");
if (ui.selected.targets.length) {
return num < ui.selected.targets[0].countCards("h");
2020-09-25 10:40:43 +00:00
}
2024-04-15 18:10:02 +00:00
var players = game.filterPlayer();
for (var i = 0; i < players.length; i++) {
if (num > players[i].countCards("h")) return true;
2020-09-25 10:40:43 +00:00
}
return false;
},
2024-04-15 18:10:02 +00:00
selectTarget: 2,
content: function () {
"step 0";
var gainner, giver;
if (targets[0].countCards("h") < targets[1].countCards("h")) {
gainner = targets[0];
giver = targets[1];
} else {
gainner = targets[1];
giver = targets[0];
2020-09-25 10:40:43 +00:00
}
2024-04-15 18:10:02 +00:00
gainner.gainPlayerCard(giver, "h", true).set("visible", true);
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool && result.links.length && get.suit(result.links[0]) != "spade") {
2020-09-25 10:40:43 +00:00
player.draw();
}
},
2024-04-15 18:10:02 +00:00
ai: {
order: 10.5,
threaten: 2,
result: {
target: function (player, target) {
var num = target.countCards("h");
var att = get.attitude(player, target);
if (ui.selected.targets.length == 0) {
if (att > 0) return -1;
var players = game.filterPlayer();
for (var i = 0; i < players.length; i++) {
var num2 = players[i].countCards("h");
var att2 = get.attitude(player, players[i]);
if (att2 >= 0 && num2 < num) return -1;
2020-09-25 10:40:43 +00:00
}
return 0;
2024-04-15 18:10:02 +00:00
} else {
2020-09-25 10:40:43 +00:00
return 1;
}
},
2024-04-15 18:10:02 +00:00
player: 0.1,
},
},
2020-09-25 10:40:43 +00:00
},
2024-04-15 18:10:02 +00:00
oldfaen: {
audio: "faen",
trigger: { global: ["turnOverAfter", "linkAfter"] },
filter: function (event, player) {
if (event.name == "link") return event.player.isLinked();
2020-09-25 10:40:43 +00:00
return true;
},
2024-04-15 18:10:02 +00:00
check: function (event, player) {
return get.attitude(player, event.player) > 0;
2020-09-25 10:40:43 +00:00
},
2024-04-15 18:10:02 +00:00
logTarget: "player",
content: function () {
2020-09-25 10:40:43 +00:00
trigger.player.draw();
},
2024-04-15 18:10:02 +00:00
ai: {
expose: 0.2,
},
2020-09-25 10:40:43 +00:00
},
2024-04-15 18:10:02 +00:00
oldxuanfeng: {
audio: "xuanfeng",
trigger: {
player: ["loseAfter"],
global: [
"equipAfter",
"addJudgeAfter",
"gainAfter",
"loseAsyncAfter",
"addToExpansionAfter",
],
},
direct: true,
filter: function (event, player) {
var evt = event.getl(player);
return evt && evt.es && evt.es.length > 0;
},
content: function () {
"step 0";
player
.chooseTarget(get.prompt("oldxuanfeng"), function (card, player, target) {
if (target == player) return false;
return get.distance(player, target) <= 1 || player.canUse("sha", target, false);
})
.set("ai", function (target) {
if (get.distance(player, target) <= 1) {
return get.damageEffect(target, player, player) * 2;
} else {
return get.effect(target, { name: "sha" }, player, player);
}
});
2024-04-15 18:31:36 +00:00
"step 1";
2024-04-15 18:10:02 +00:00
if (result.bool) {
player.logSkill("oldxuanfeng", result.targets);
var target = result.targets[0];
var distance = get.distance(player, target);
if (distance <= 1 && player.canUse("sha", target, false)) {
player.chooseControl("出杀", "造成伤害").set("ai", function () {
return "造成伤害";
2023-03-31 11:34:38 +00:00
});
2024-04-15 18:10:02 +00:00
event.target = target;
} else if (distance <= 1) {
2020-09-25 10:40:43 +00:00
target.damage();
event.finish();
2024-04-15 18:10:02 +00:00
} else {
player.useCard({ name: "sha", isCard: true }, target, false).animate = false;
2020-09-25 10:40:43 +00:00
game.delay();
event.finish();
}
2024-04-15 18:10:02 +00:00
} else {
2020-09-25 10:40:43 +00:00
event.finish();
}
2024-04-15 18:31:36 +00:00
"step 2";
2024-04-15 18:10:02 +00:00
var target = event.target;
if (result.control == "出杀") {
player.useCard({ name: "sha", isCard: true }, target, false).animate = false;
2020-09-25 10:40:43 +00:00
game.delay();
2024-04-15 18:10:02 +00:00
} else {
2020-09-25 10:40:43 +00:00
target.damage();
}
},
2024-04-15 18:10:02 +00:00
ai: {
effect: {
target: function (card, player, target, current) {
if (get.type(card) == "equip") return [1, 3];
},
2020-09-25 10:40:43 +00:00
},
2024-04-15 18:10:02 +00:00
reverseEquip: true,
noe: true,
},
2020-09-25 10:40:43 +00:00
},
},
2024-04-15 18:10:02 +00:00
translate: {
old_zhangxingcai: "旧张星彩",
old_zhangxingcai_prefix: "旧",
old_xusheng: "旧徐盛",
old_xusheng_prefix: "旧",
old_lingtong: "旧凌统",
old_lingtong_prefix: "旧",
old_zhuran: "旧朱然",
old_zhuran_prefix: "旧",
old_caoxiu: "旧曹休",
old_caoxiu_prefix: "旧",
old_caozhen: "旧曹真",
old_caozhen_prefix: "旧",
old_maliang: "旧马良",
old_maliang_prefix: "旧",
old_chenqun: "旧陈群",
old_chenqun_prefix: "旧",
old_zhuhuan: "旧朱桓",
old_zhuhuan_prefix: "旧",
old_zhuzhi: "旧朱治",
old_zhuzhi_prefix: "旧",
old_zhugezhan: "旧诸葛瞻",
old_zhugezhan_prefix: "旧",
yuji: "旧于吉",
yuji_prefix: "旧",
old_zhangfei: "新杀张飞",
old_zhangfei_prefix: "新杀",
old_huatuo: "OL华佗",
old_huatuo_prefix: "OL",
old_guanyu: "旧关羽",
old_guanyu_prefix: "旧",
ol_zhangrang: "旧张让",
ol_zhangrang_prefix: "旧",
ol_liaohua: "OL廖化",
ol_liaohua_prefix: "OL",
ol_zhuran: "OL朱然",
ol_zhuran_prefix: "OL",
ol_manchong: "OL满宠",
ol_manchong_prefix: "OL",
old_fuhuanghou: "旧伏寿",
old_fuhuanghou_prefix: "旧",
old_caochong: "旧曹冲",
old_caochong_prefix: "旧",
old_guanqiujian: "旧毌丘俭",
old_guanqiujian_prefix: "旧",
old_wangyun: "旧王允",
old_wangyun_prefix: "旧",
old_zhaoyun: "新杀赵云",
old_zhaoyun_prefix: "新杀",
ol_huaxiong: "旧华雄",
ol_huaxiong_prefix: "旧",
old_xiaoqiao: "旧小乔",
old_xiaoqiao_prefix: "旧",
old_wanglang: "旧王朗",
old_wanglang_prefix: "旧",
old_wangyi: "旧王异",
old_wangyi_prefix: "旧",
xin_yujin: "节钺于禁",
xin_yujin_prefix: "节钺",
re_yujin: "毅重于禁",
re_yujin_prefix: "毅重",
2024-04-15 18:10:02 +00:00
old_guhuo: "蛊惑",
old_guhuo_info:
"你可以扣置一张手牌当做一张基本牌或普通锦囊牌使用或打出体力值不为0的其他角色依次选择是否质疑。然后若有质疑的角色你展示此牌若为假此牌作废这些角色摸一张牌若为真这些角色失去1点体力且若此牌不为♥此牌作废。",
old_guhuo_guess: "蛊惑",
old_jijun: "集军",
old_jijun_info: "出牌阶段,你可以将任意张手牌置于武将牌上,称为“方”。",
old_fangtong: "方统",
old_fangtong_info: "锁定技。结束阶段若你的“方”数目不小于36则以你的阵营胜利结束本局游戏。",
old_zuilun: "罪论",
old_zuilun_info:
"出牌阶段,你可以获得一名其他角色的一张牌(手牌、装备区各一次),然后该角色摸一张牌。",
old_fuyin: "父荫",
old_fuyin_info:
"锁定技。若你的装备区里没有防具牌,你不能成为手牌数不小于你的其他角色使用【杀】、【决斗】或【火攻】的目标。",
oldanxu: "安恤",
oldanxu_info:
"出牌阶段限一次。你可以选择手牌数不相等的两名其他角色,其中手牌少的角色获得手牌多的角色的一张手牌并展示之,然后若此牌不为黑桃,你摸一张牌。",
oldfaen: "法恩",
oldfaen_info: "当一名角色翻面或横置后,你可以令其摸一张牌。",
oldxuanfeng: "旋风",
oldxuanfeng_info:
"当你失去装备区里的牌后你可以选择一项1.视为对一名其他角色使用一张【杀】2.对一名距离为1的角色造成1点伤害。",
ol_yuanshu: "旧袁术",
ol_yuanshu_prefix: "旧",
fazheng: "旧法正",
fazheng_prefix: "旧",
junk_simayi: "旧晋司马懿",
junk_simayi_prefix: "旧晋",
madai: "旧马岱",
madai_prefix: "旧",
old_yangzhi: "旧杨芷",
old_yangzhi_prefix: "旧",
old_yangyan: "旧杨艳",
old_yangyan_prefix: "旧",
old_caorui: "旧曹叡",
old_caorui_prefix: "旧",
oldmingjian: "明鉴",
oldmingjian_info:
"出牌阶段开始前,你可以跳过此阶段并将所有手牌交给一名其他角色。若如此做,你结束当前回合,然后其获得一个额外的回合(仅包含出牌阶段)。",
old_handang: "旧韩当",
old_handang_prefix: "旧",
oldgongji: "弓骑",
oldgongji_info: "你可以将一张装备牌当做无距离限制的【杀】使用或打出。",
oldjiefan: "解烦",
oldjiefan_info:
"当一名角色A于你的回合外处于濒死状态时你可以对当前回合角色使用一张【杀】。当此【杀】造成伤害时你防止此伤害视为对A使用一张【桃】。",
old_gaoshun: "旧高顺",
old_gaoshun_prefix: "旧",
old_liubiao: "旧刘表",
old_liubiao_prefix: "旧",
oldre_liubiao: "RE刘表",
oldre_liubiao_prefix: "RE",
oldzishou: "自守",
oldzishou_info:
"摸牌阶段,若你已受伤,你可令额定摸牌数+XX为你已损失的体力值然后跳过下一个出牌阶段。",
old_huanghao: "旧黄皓",
old_huanghao_prefix: "旧",
oldqinqing: "寝情",
oldqinqing_info:
"结束阶段,你可以选择一名攻击范围内含有主公的其他角色,然后你弃置该角色的一张牌(无牌则不弃),并令其摸一张牌。若该角色的手牌数大于主公,你摸一张牌。",
oldhuisheng: "贿生",
oldhuisheng_info:
"每名角色限一次。当你受到其他角色对你造成的伤害时你可以令其观看你任意数量的牌并令其选择一项1.获得这些牌中的一张并防止此伤害2.弃置等量的牌。",
old_dingfeng: "旧丁奉",
old_dingfeng_prefix: "旧",
junk_sunquan: "旧神孙权",
junk_sunquan_prefix: "旧神",
new_caoren: "旧曹仁",
new_caoren_prefix: "旧",
old_liyan: "旧李严",
old_liyan_prefix: "旧",
old_chendao: "旧陈到",
old_chendao_prefix: "旧",
old_caocao: "旧神曹操",
old_caocao_prefix: "旧神",
junkguixin: "归心",
junkguixin_info:
"回合结束时,你可以选择一项:①获得剩余武将牌堆的所有主公技的其中一个技能;②更改一名其他角色的势力。",
old_caochun: "旧曹纯",
old_caochun_prefix: "旧",
old_guanyinping: "旧关银屏",
old_guanyinping_prefix: "旧",
old_shen_zhaoyun: "旧神赵云",
old_shen_zhaoyun_prefix: "旧神",
oldjuejing: "绝境",
oldjuejing_info: "锁定技。①摸牌阶段,你令额定摸牌数+XX为你已损失的体力值。②你的手牌上限+2。",
oldlonghun: "龙魂",
oldlonghun_info:
"你可以将花色相同的Y张牌按下列规则使用或打出♥当【桃】♦当火【杀】♣当【闪】♠当普【无懈可击】Y为你的体力值且至少为1。",
panfeng: "旧潘凤",
panfeng_prefix: "旧",
old_shixie: "旧士燮",
old_shixie_prefix: "旧",
2024-04-15 18:10:02 +00:00
old_standard: "标准包",
old_shenhua: "神话再临",
old_refresh: "界限突破",
old_yijiang1: "一将成名2011",
old_yijiang2: "一将成名2012",
old_yijiang3: "一将成名2013",
old_yijiang4: "一将成名2014",
old_yijiang5: "一将成名2015",
old_yijiang67: "原创设计",
old_sp: "SP",
old_yingbian: "文德武备",
old_mobile: "移动版",
},
2020-09-25 10:40:43 +00:00
};
});