Merge branch 'PR-Branch' of https://github.com/kuangshen04/noname into PR-Branch
This commit is contained in:
commit
ba0d91dff3
|
@ -82,8 +82,10 @@ const skills = {
|
|||
}
|
||||
list.forEach(name => {
|
||||
if (name !== "dc_wuyi") {
|
||||
const skills = get.character(name).skills;
|
||||
const skills = get.character(name, 3);
|
||||
skills.forEach(skill => {
|
||||
const info = get.info(skill);
|
||||
if (!info || (info.ai && info.ai.combo)) return;
|
||||
if (skill in _status.dcbenxi_map) return;
|
||||
const voices = game.parseSkillText(skill, name);
|
||||
if (
|
||||
|
@ -743,7 +745,7 @@ const skills = {
|
|||
player.addMark("dcbianzhuang", 1, false);
|
||||
if (player.countMark("dcbianzhuang") > 2) {
|
||||
player.storage.dcbianzhuang_inited = true;
|
||||
player.reinitCharacter("zhutiexiong", "wu_zhutiexiong");
|
||||
player.reinitCharacter(get.character(player.name2, 3).includes("dcbianzhuang") ? player.name2 : player.name1, "wu_zhutiexiong");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -807,11 +807,14 @@ const skills = {
|
|||
},
|
||||
noname_duocai2: { charlotte: true },
|
||||
nsbizhao: {
|
||||
unique: true,
|
||||
trigger: { player: "showCharacterAfter" },
|
||||
forced: true,
|
||||
hiddenSkill: true,
|
||||
filter(event, player) {
|
||||
return event.toShow && event.toShow.includes("ns_yanghu") && player != _status.currentPhase;
|
||||
return event.toShow && event.toShow.some(name => {
|
||||
return get.character(name, 3).includes("nsbizhao");
|
||||
}) && player != _status.currentPhase;
|
||||
},
|
||||
content() {
|
||||
player.addTempSkill("nsbizhao2", {
|
||||
|
@ -5175,7 +5178,7 @@ const skills = {
|
|||
trigger: { player: "dieBefore" },
|
||||
forced: true,
|
||||
filter(event, player) {
|
||||
return player.maxHp > 0;
|
||||
return player.maxHp > 0 && event.getParent().name != "giveup";
|
||||
},
|
||||
content() {
|
||||
trigger.cancel();
|
||||
|
@ -5276,7 +5279,7 @@ const skills = {
|
|||
.set("logSkill", "nsduijue");
|
||||
"step 1";
|
||||
if (result.bool) {
|
||||
player.addTempSkill("nsduijue_use");
|
||||
player.addTempSkill("nsduijue_use", "phaseUseAfter");
|
||||
player.storage.nsduijue_use = get.color(result.cards[0]);
|
||||
}
|
||||
},
|
||||
|
@ -5393,7 +5396,7 @@ const skills = {
|
|||
unique: true,
|
||||
forceunique: true,
|
||||
init(player) {
|
||||
if (player.storage.nscongjun_show) return false;
|
||||
if (player.storage.nscongjun_show || ![player.name1, player.name2].includes("ns_huamulan")) return false;
|
||||
var change = function (target) {
|
||||
if (target == player) {
|
||||
var list;
|
||||
|
@ -5424,7 +5427,12 @@ const skills = {
|
|||
show: {
|
||||
trigger: { global: "useCard" },
|
||||
filter(event, player) {
|
||||
return player.getEnemies().includes(event.player) && event.card.name == "wuxie" && event.getRand() < 0.1;
|
||||
return (
|
||||
player.storage.nscongjun_show &&
|
||||
event.card.name == "wuxie" &&
|
||||
event.getRand() < 0.1 &&
|
||||
player.getEnemies().includes(event.player)
|
||||
);
|
||||
},
|
||||
direct: true,
|
||||
skillAnimation: true,
|
||||
|
|
|
@ -6323,6 +6323,7 @@ const skills = {
|
|||
combo: "sbaiyin",
|
||||
effect: {
|
||||
target(card, player, target) {
|
||||
if (!target.hasSkill("sbaiyin") && !target.hasSkill("jilue") || !target.hasFriend()) return;
|
||||
if (player.hasSkillTag("jueqing", false, target)) return [1, -2];
|
||||
if (get.tag(card, "damage")) {
|
||||
if (target.hp == target.maxHp) {
|
||||
|
|
|
@ -630,7 +630,7 @@ game.import("character", function () {
|
|||
player.turnOver(false);
|
||||
"step 3";
|
||||
player.draw(4);
|
||||
player.reinit("gjqt_xieyi", "gjqt_chuqi");
|
||||
player.reinit(get.character(player.name2, 3).includes("humeng") ? player.name2 : player.name1, "gjqt_chuqi");
|
||||
player.hp = player.maxHp;
|
||||
"step 4";
|
||||
if (event.yanjia) {
|
||||
|
|
|
@ -2382,7 +2382,7 @@ game.import("character", function () {
|
|||
trigger: { player: "phaseBefore" },
|
||||
unique: true,
|
||||
skillAnimation: true,
|
||||
forceunique: true,
|
||||
//forceunique: true,
|
||||
filter() {
|
||||
return game.roundNumber >= 3;
|
||||
},
|
||||
|
@ -2407,7 +2407,7 @@ game.import("character", function () {
|
|||
};
|
||||
player.awakenSkill("szbianshen");
|
||||
"step 1";
|
||||
player.reinit("hs_shizugui", result.links[0]);
|
||||
player.reinit(get.character(player.name2, 3).includes("szbianshen") ? player.name2 : player.name1, result.links[0]);
|
||||
player.hp = player.maxHp;
|
||||
player.update();
|
||||
},
|
||||
|
@ -6851,7 +6851,7 @@ game.import("character", function () {
|
|||
guozai2: {
|
||||
mark: true,
|
||||
intro: {
|
||||
content: "结束阶段需弃置&张牌",
|
||||
content: "当前阶段结束时需弃置&张牌",
|
||||
},
|
||||
trigger: { player: "phaseUseEnd" },
|
||||
forced: true,
|
||||
|
@ -6887,7 +6887,7 @@ game.import("character", function () {
|
|||
guozaix2: {
|
||||
mark: true,
|
||||
intro: {
|
||||
content: "结束阶段需弃置&张牌",
|
||||
content: "当前阶段结束时需弃置&张牌",
|
||||
},
|
||||
trigger: { player: "phaseUseEnd" },
|
||||
forced: true,
|
||||
|
|
|
@ -12198,7 +12198,9 @@ const skills = {
|
|||
filter: function (event, player, name) {
|
||||
if (player.hasSkill("zhiwei2")) return false;
|
||||
if (!game.hasPlayer(current => current != player)) return false;
|
||||
if (get.mode() == "guozhan") return event.name == "showCharacter" && (event.toShow.includes("gz_luyusheng") || event.toShow.includes("luyusheng"));
|
||||
if (get.mode() == "guozhan") return event.name == "showCharacter" && event.toShow.some(name => {
|
||||
return get.character(name, 3).includes("zhiwei");
|
||||
});
|
||||
return event.name != "showCharacter" && (name != "phaseBefore" || game.phaseNumber == 0);
|
||||
},
|
||||
content: function () {
|
||||
|
@ -12298,8 +12300,8 @@ const skills = {
|
|||
player.removeSkill("zhiwei2");
|
||||
if (trigger.name != "die" || get.mode() != "guozhan") event.finish();
|
||||
"step 1";
|
||||
if (player.name1 == "gz_luyusheng" || player.name1 == "luyusheng") player.hideCharacter(0);
|
||||
if (player.name2 == "gz_luyusheng" || player.name2 == "luyusheng") player.hideCharacter(1);
|
||||
if (get.character(player.name1, 3).includes("zhiwei")) player.hideCharacter(0);
|
||||
if (get.character(player.name2, 3).includes("zhiwei")) player.hideCharacter(1);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -12369,73 +12371,73 @@ const skills = {
|
|||
player: "damageEnd",
|
||||
source: "damageSource",
|
||||
},
|
||||
direct: true,
|
||||
filter: function (event, player) {
|
||||
return player.hasSkill("wanggui") && !player.hasSkill("wanggui2");
|
||||
if (player.isUnseen()) return false;
|
||||
if (!player.isUnseen(2)) return true;
|
||||
return (
|
||||
!player.isUnseen(0) && get.character(player.name1, 3).includes("wanggui") ||
|
||||
!player.isUnseen(1) && get.character(player.name2, 3).includes("wanggui")
|
||||
);
|
||||
},
|
||||
usable: 1,
|
||||
preHidden: true,
|
||||
content: function () {
|
||||
"step 0";
|
||||
player.addTempSkill("wanggui2");
|
||||
var bool = player.isUnseen(2);
|
||||
if (bool) {
|
||||
player
|
||||
.chooseTarget("望归:是否对一名势力不同的角色造成1点伤害?", function (card, player, target) {
|
||||
async cost(event, trigger, player) {
|
||||
if (player.isUnseen(2)) event.result = await player
|
||||
.chooseTarget(
|
||||
get.prompt("wanggui"),
|
||||
"望归:是否对与你势力不同的一名角色造成1点伤害?",
|
||||
(card, player, target) => {
|
||||
return target.isEnemyOf(player);
|
||||
})
|
||||
.set("ai", function (target) {
|
||||
var player = _status.event.player;
|
||||
return get.damageEffect(target, player, player);
|
||||
})
|
||||
.setHiddenSkill("wanggui");
|
||||
} else event.goto(2);
|
||||
"step 1";
|
||||
if (result.bool) {
|
||||
var target = result.targets[0];
|
||||
player.logSkill("wanggui", target);
|
||||
target.damage();
|
||||
}
|
||||
)
|
||||
.set("ai", (target) => {
|
||||
let player = _status.event.player;
|
||||
return get.damageEffect(target, player, player);
|
||||
})
|
||||
.setHiddenSkill("wanggui")
|
||||
.forResult();
|
||||
else event.result = await player
|
||||
.chooseBool("望归:是否令与你势力相同的角色各摸一张牌?")
|
||||
.setHiddenSkill("wanggui")
|
||||
.set("logSkill", ["wanggui", game.filterPlayer(current => {
|
||||
return current.isFriendOf(player);
|
||||
})])
|
||||
.forResult();
|
||||
},
|
||||
async content(event, trigger, player) {
|
||||
if (player.isUnseen(2)) {
|
||||
const target = event.targets[0];
|
||||
target.damage("nocard");
|
||||
}
|
||||
event.finish();
|
||||
"step 2";
|
||||
player.chooseBool("望归:是否令所有与自己势力相同的角色各摸一张牌?").setHiddenSkill("wanggui");
|
||||
"step 3";
|
||||
if (result.bool) {
|
||||
var targets = game.filterPlayer(function (current) {
|
||||
else {
|
||||
const targets = game.filterPlayer(current => {
|
||||
return current.isFriendOf(player);
|
||||
});
|
||||
targets.sortBySeat();
|
||||
player.logSkill("wanggui", targets);
|
||||
game.asyncDraw(targets);
|
||||
} else event.finish();
|
||||
"step 4";
|
||||
game.delayx();
|
||||
}
|
||||
},
|
||||
},
|
||||
wanggui2: {},
|
||||
xibing: {
|
||||
audio: 2,
|
||||
trigger: { global: "useCardToPlayered" },
|
||||
filter: function (event, player) {
|
||||
if (player == event.player || event.targets.length != 1 || event.player.countCards("h") >= event.player.hp) return false;
|
||||
if (player == event.player || event.targets.length != 1) return false;
|
||||
var bool = function (card) {
|
||||
return (card.name == "sha" || get.type(card, false) == "trick") && get.color(card, false) == "black";
|
||||
};
|
||||
if (!bool(event.card)) return false;
|
||||
var evt = event.getParent("phaseUse");
|
||||
if (evt.player != event.player) return false;
|
||||
return (
|
||||
get.mode() != "guozhan" ||
|
||||
event.player.getHistory("useCard", function (evtx) {
|
||||
return bool(evtx.card) && evtx.getParent("phaseUse") == evt;
|
||||
})[0] == event.getParent()
|
||||
);
|
||||
return true;
|
||||
},
|
||||
usable: 1,
|
||||
logTarget: "player",
|
||||
check: function (event, player) {
|
||||
var target = event.player;
|
||||
var att = get.attitude(player, target);
|
||||
var num2 = Math.min(5, target.hp) - target.countCards("h");
|
||||
if (num2 <= 0) return att <= 0;
|
||||
if (num2 <= 0) return false;
|
||||
var num = target.countCards("h", function (card) {
|
||||
return target.hasValueTarget(card, null, true);
|
||||
});
|
||||
|
@ -12446,42 +12448,24 @@ const skills = {
|
|||
content: function () {
|
||||
"step 0";
|
||||
var num = Math.min(5, trigger.player.hp) - trigger.player.countCards("h");
|
||||
if (num > 0) trigger.player.draw(num);
|
||||
"step 1";
|
||||
trigger.player.addTempSkill("xibing2");
|
||||
player._xibing = true;
|
||||
if (get.mode() != "guozhan" || player.isUnseen(2) || trigger.player.isUnseen(2)) event.finish();
|
||||
"step 2";
|
||||
var target = trigger.player;
|
||||
var players1 = [player.name1, player.name2];
|
||||
var players2 = [target.name1, target.name2];
|
||||
player
|
||||
.chooseButton(2, ["是否暗置自己和" + get.translation(target) + "的各一张武将牌?", '<div class="text center">你的武将牌</div>', [players1, "character"], '<div class="text center">' + get.translation(target) + "的武将牌</div>", [players2, "character"]])
|
||||
.set("players", players1)
|
||||
.set("complexSelect", true)
|
||||
.set("filterButton", function (button) {
|
||||
return !get.is.jun(button.link) && (ui.selected.buttons.length == 0) == _status.event.players.includes(button.link);
|
||||
});
|
||||
"step 3";
|
||||
if (result.bool) {
|
||||
var target = trigger.player;
|
||||
player.hideCharacter(player.name1 == result.links[0] ? 0 : 1);
|
||||
target.hideCharacter(target.name1 == result.links[1] ? 0 : 1);
|
||||
player.addTempSkill("xibing3");
|
||||
target.addTempSkill("xibing3");
|
||||
if (num > 0) {
|
||||
trigger.player.draw(num);
|
||||
trigger.player.addTempSkill("xibing_banned");
|
||||
}
|
||||
},
|
||||
},
|
||||
xibing2: {
|
||||
mod: {
|
||||
cardEnabled2: function (card) {
|
||||
if (get.position(card) == "h") return false;
|
||||
subSkill:{
|
||||
banned: {
|
||||
mod: {
|
||||
cardEnabled(card) {
|
||||
return false;
|
||||
},
|
||||
cardSavable(card) {
|
||||
return false;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
xibing3: {
|
||||
ai: { nomingzhi: true },
|
||||
},
|
||||
//小虎
|
||||
remeibu: {
|
||||
audio: "meibu",
|
||||
|
|
|
@ -100,8 +100,7 @@ const translates = {
|
|||
spwanggui: "望归",
|
||||
spwanggui_info: "①当你受到伤害后,你可以摸一张牌,或和一名势力相同的其他角色各摸一张牌;②每回合限一次,当你造成伤害后,你可以对一名与你势力不同的角色造成1点伤害。",
|
||||
xibing: "息兵",
|
||||
xibing_info: "当一名其他角色在其出牌阶段内使用黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至当前体力值(至多摸至五张)且本回合不能再使用手牌。",
|
||||
xibing_info_guozhan: "当一名其他角色在其出牌阶段内使用第一张黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至当前体力(至多摸至五张)值且本回合不能再使用手牌。若你与其均明置了所有武将牌,则你可以暗置你与其各一张武将牌且本回合不能再明置此武将牌。",
|
||||
xibing_info: "每回合限一次,当其他角色于其出牌阶段内使用黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至当前体力值(至多摸至五张)。若其因此摸牌,其本回合不能再使用牌。",
|
||||
luyusheng: "陆郁生",
|
||||
zhente: "贞特",
|
||||
zhente2: "贞特",
|
||||
|
@ -167,7 +166,7 @@ const translates = {
|
|||
weimeng_info: "出牌阶段限一次,你可以获得一名其他角色的至多X张手牌,然后交给其等量的牌(X为你的体力值)。若你给出的牌点数之和:大于得到的牌,则你摸一张牌;小于得到的牌,弃置该角色区域内的一张牌。",
|
||||
mamidi: "马日磾",
|
||||
bingjie: "秉节",
|
||||
bingjie_info: "出牌阶段开始时,你可减1点体力上限,然后当你于本阶段内使用【杀】或普通锦囊牌指定其他角色为目标后,其弃置一张牌。若其弃置的牌与你使用的牌颜色相同,其无法响应此牌。",
|
||||
bingjie_info: "出牌阶段开始时,你可减1点体力上限,然后当你本回合使用【杀】或普通锦囊牌指定其他角色为目标后,其弃置一张牌。若其弃置的牌与你使用的牌颜色相同,其无法响应此牌。",
|
||||
zhengding: "正订",
|
||||
zhengding_info: "锁定技。当你于回合外使用或打出牌响应其他角色使用的牌时,若这两张牌颜色相同,则你加1点体力上限并回复1点体力。",
|
||||
dc_jiben: "吉本",
|
||||
|
|
|
@ -619,7 +619,7 @@ const skills = {
|
|||
},
|
||||
async content(event, trigger, player) {
|
||||
player.line(trigger.player);
|
||||
trigger.player.addTempSkill("jsrglonglin_forbid");
|
||||
trigger.player.addTempSkill("jsrglonglin_forbid", "phaseUseAfter");
|
||||
},
|
||||
},
|
||||
forbid: {
|
||||
|
@ -3647,7 +3647,7 @@ const skills = {
|
|||
},
|
||||
content: function () {
|
||||
"step 0";
|
||||
event.num = 0;
|
||||
target.addTempSkill("jsrgyangming_lose", "phaseUseAfter");
|
||||
"step 1";
|
||||
player.chooseToCompare(target).set(
|
||||
"small",
|
||||
|
@ -3667,9 +3667,11 @@ const skills = {
|
|||
.chooseBool("是否与其重复此拼点流程?")
|
||||
.set("ai", () => get.event("bool"))
|
||||
.set("bool", get.effect(target, "jsrgyangming", player, player) > 0);
|
||||
event.num++;
|
||||
game.broadcastAll((target)=>{
|
||||
target.storage.jsrgyangming_lose++;
|
||||
}, target);
|
||||
} else {
|
||||
if (event.num) target.draw(event.num);
|
||||
if (target.storage.jsrgyangming_lose) target.draw(target.storage.jsrgyangming_lose);
|
||||
player.recover();
|
||||
event.finish();
|
||||
}
|
||||
|
@ -3700,6 +3702,15 @@ const skills = {
|
|||
},
|
||||
},
|
||||
},
|
||||
subSkill: {
|
||||
lose: {
|
||||
init(player, skill) {
|
||||
player.storage[skill] = 0;
|
||||
},
|
||||
onremove: true,
|
||||
charlotte: true
|
||||
}
|
||||
}
|
||||
},
|
||||
//韩遂
|
||||
jsrgniluan: {
|
||||
|
@ -6014,6 +6025,9 @@ const skills = {
|
|||
lib.skill.sbyingmen.addVisitors(characters, player);
|
||||
game.delayx();
|
||||
},
|
||||
ai: {
|
||||
combo: "sbpingjian"
|
||||
},
|
||||
group: "sbyingmen_reload",
|
||||
subSkill: {
|
||||
reload: {
|
||||
|
@ -6654,7 +6668,12 @@ const skills = {
|
|||
group: "jsrgguanhuo_viewas",
|
||||
content: function () {
|
||||
"step 0";
|
||||
var count = player.getHistory("useSkill", evt => evt.skill == "jsrgguanhuo_viewas").length;
|
||||
var count = player.getHistory("useSkill", evt => {
|
||||
return (
|
||||
evt.skill == "jsrgguanhuo_viewas" &&
|
||||
evt.getParent("phaseUse") === trigger.getParent("phaseUse")
|
||||
);
|
||||
}).length;
|
||||
if (count == 1) {
|
||||
player.addTempSkill("jsrgguanhuo_ex", "phaseUseAfter");
|
||||
player.addMark("jsrgguanhuo_ex", 1, false);
|
||||
|
@ -6666,8 +6685,18 @@ const skills = {
|
|||
ai: {
|
||||
effect: {
|
||||
player: function (card, player) {
|
||||
if (_status.event.getParent().skill == "jsrgguanhuo_viewas" && player.getHistory("useSkill", evt => evt.skill == "jsrgguanhuo_viewas").length == 1) return "zeroplayertarget";
|
||||
if (_status.event.type == "phase" && _status.event.skill == "jsrgguanhuo_viewas" && player.getHistory("useSkill", evt => evt.skill == "jsrgguanhuo_viewas").length > 1 && player.countCards("h") <= 3) return [0, 0];
|
||||
if (_status.event.getParent().skill == "jsrgguanhuo_viewas" && player.getHistory("useSkill", evt => {
|
||||
return (
|
||||
evt.skill == "jsrgguanhuo_viewas" &&
|
||||
evt.getParent("phaseUse") === _status.event.getParent("phaseUse")
|
||||
);
|
||||
}).length == 1) return "zeroplayertarget";
|
||||
if (_status.event.type == "phase" && _status.event.skill == "jsrgguanhuo_viewas" && player.getHistory("useSkill", evt => {
|
||||
return (
|
||||
evt.skill == "jsrgguanhuo_viewas" &&
|
||||
evt.getParent("phaseUse") === _status.event.getParent("phaseUse")
|
||||
);
|
||||
}).length > 1 && player.countCards("h") <= 3) return [0, 0];
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -463,6 +463,8 @@ const skills = {
|
|||
},
|
||||
//加纳天善(旧)
|
||||
tenzen_yixing: {
|
||||
unique: true,
|
||||
forceunique: true,
|
||||
trigger: {
|
||||
global: "damageEnd",
|
||||
},
|
||||
|
@ -4756,6 +4758,8 @@ const skills = {
|
|||
},
|
||||
},
|
||||
yukito_yaxiang: {
|
||||
unique: true,
|
||||
forceunique: true,
|
||||
enable: "chooseToUse",
|
||||
limited: true,
|
||||
filter(event, player) {
|
||||
|
@ -7070,7 +7074,7 @@ const skills = {
|
|||
let num = 1 + event.cost_data;
|
||||
await player.draw(num).set("gaintag", ["shiorimiyuki_tingxian"]);
|
||||
await player.recover();
|
||||
player.addTempSkill("shiorimiyuki_tingxian2");
|
||||
player.addTempSkill("shiorimiyuki_tingxian2", "phaseUseAfter");
|
||||
},
|
||||
group: "shiorimiyuki_tingxian1",
|
||||
},
|
||||
|
@ -7565,6 +7569,7 @@ const skills = {
|
|||
trigger: { player: "phaseZhunbeiBegin" },
|
||||
limited: true,
|
||||
unique: true,
|
||||
forceunique: true,
|
||||
charlotte: true,
|
||||
skillAnimation: true,
|
||||
animationColor: "water",
|
||||
|
@ -7572,6 +7577,7 @@ const skills = {
|
|||
return player.isDamaged();
|
||||
},
|
||||
check(event, player) {
|
||||
if (![player.name1, player.name2].includes("key_mio")) return false;
|
||||
return player.hp <= 1 || player.getDamagedHp() > 1;
|
||||
},
|
||||
content() {
|
||||
|
@ -7640,12 +7646,14 @@ const skills = {
|
|||
limited: true,
|
||||
charlotte: true,
|
||||
unique: true,
|
||||
forceunique: true,
|
||||
skillAnimation: true,
|
||||
animationColor: "water",
|
||||
filter(event, player) {
|
||||
return player.isDamaged();
|
||||
},
|
||||
check(event, player) {
|
||||
if (![player.name1, player.name2].includes("key_midori")) return false;
|
||||
return player.hp <= 1 || player.getDamagedHp() > 1;
|
||||
},
|
||||
content() {
|
||||
|
@ -8690,7 +8698,7 @@ const skills = {
|
|||
});
|
||||
}
|
||||
} else {
|
||||
player.addTempSkill("zishou2", "phaseEnd");
|
||||
player.addTempSkill("zishou2", "phaseUseAfter");
|
||||
}
|
||||
},
|
||||
ai: { expose: 0.2 },
|
||||
|
@ -10574,9 +10582,15 @@ const skills = {
|
|||
},
|
||||
},
|
||||
umi_qihuan: {
|
||||
unique: true,
|
||||
forceunique: true,
|
||||
enable: "chooseToUse",
|
||||
filter(summer, umi) {
|
||||
return summer.type == "dying" && umi.isDying();
|
||||
return (
|
||||
summer.type == "dying" &&
|
||||
umi.isDying() &&
|
||||
[umi.name1, umi.name2].includes("key_umi")
|
||||
);
|
||||
},
|
||||
limited: true,
|
||||
skillAnimation: true,
|
||||
|
|
|
@ -1869,9 +1869,6 @@ const skills = {
|
|||
cardUsable: function (card, player) {
|
||||
if (player.countMark("mbzhixi") >= player.hp) return false;
|
||||
},
|
||||
cardRespondable: function (card, player) {
|
||||
if (player.countMark("mbzhixi") >= player.hp) return false;
|
||||
},
|
||||
cardSavable: function (card, player) {
|
||||
if (player.countMark("mbzhixi") >= player.hp) return false;
|
||||
},
|
||||
|
@ -7173,10 +7170,11 @@ const skills = {
|
|||
},
|
||||
check: function (event, player) {
|
||||
return (
|
||||
get.damageEffect(event.player, player, player) < 0 ||
|
||||
(!event.player.hasSkillTag("noe") &&
|
||||
get.damageEffect(event.player, player, player) <= 0 ||
|
||||
(get.attitude(player, event.player) <= 0 &&
|
||||
!event.player.hasSkillTag("noe") &&
|
||||
event.player.hasCard(function (card) {
|
||||
return get.value(card) > 6;
|
||||
return get.value(card) > 9 - event.player.hp;
|
||||
}, "e"))
|
||||
);
|
||||
},
|
||||
|
@ -14824,12 +14822,14 @@ const skills = {
|
|||
trigger.target.chooseToDiscard("he", true, 2);
|
||||
"step 1";
|
||||
if (result.bool && result.cards && result.cards.length) {
|
||||
if (result.cards.length == 1) {
|
||||
const cards = result.cards.filterInD("d");
|
||||
if (cards.length == 1) {
|
||||
event._result = { bool: true, links: result.cards.slice(0) };
|
||||
} else
|
||||
player.chooseButton(["选择获得其中的一张牌", result.cards.slice(0)], true).ai = function (button) {
|
||||
} else if (cards.length > 1) {
|
||||
player.chooseButton(["选择获得其中的一张牌", result.cards.slice(0)], true).set("ai", function (button) {
|
||||
return get.value(button.link);
|
||||
};
|
||||
});
|
||||
} else event.finish();
|
||||
} else event.finish();
|
||||
"step 2";
|
||||
if (result.links) player.gain(result.links, "gain2");
|
||||
|
|
|
@ -11913,7 +11913,7 @@ const skills = {
|
|||
player.loseHp();
|
||||
}
|
||||
"step 1";
|
||||
target.addTempSkill("reqiangxi_off");
|
||||
target.addTempSkill("reqiangxi_off", "phaseUseAfter");
|
||||
target.damage("nocard");
|
||||
},
|
||||
check: function (card) {
|
||||
|
@ -14207,7 +14207,7 @@ const skills = {
|
|||
.set("ai", () => {
|
||||
const player = get.event("player"),
|
||||
trigger = get.event().getTrigger();
|
||||
const cards = trigger.cards.filterInD();
|
||||
const cards = trigger.cards ? trigger.cards.filterInD() : [];
|
||||
if (get.event().controls.includes("拿牌")) {
|
||||
if (
|
||||
cards.reduce((sum, card) => {
|
||||
|
|
|
@ -2419,6 +2419,9 @@ const skills = {
|
|||
if (cards.length) player.loseToDiscardpile(cards);
|
||||
},
|
||||
group: ["nzry_mingren_1", "nzry_mingren_2"],
|
||||
ai:{
|
||||
combo: "nzry_zhenliang",
|
||||
},
|
||||
subSkill: {
|
||||
1: {
|
||||
audio: 2,
|
||||
|
|
|
@ -171,6 +171,9 @@ const skills = {
|
|||
result: { bool, moved },
|
||||
} = await player
|
||||
.chooseToMove("易城:请选择你要交换的牌")
|
||||
.set("filterMove", (from, to) => {
|
||||
return typeof to !== "number";
|
||||
})
|
||||
.set("list", [
|
||||
[
|
||||
"牌堆顶",
|
||||
|
@ -2825,7 +2828,7 @@ const skills = {
|
|||
},
|
||||
checkx: function (event, player) {
|
||||
var target = event.source;
|
||||
return get.damageEffect(player, target, target) <= 0;
|
||||
return get.damageEffect(player, target, player) <= 0;
|
||||
},
|
||||
forced: true,
|
||||
content: function () {
|
||||
|
@ -14611,7 +14614,7 @@ const skills = {
|
|||
if (!phsu || phsu.player != player) return false;
|
||||
if (
|
||||
player.getHistory("gain", function (evt) {
|
||||
return evt.getParent().name == "chengshang";
|
||||
return evt.getParent().name == "chengshang" && phsu === evt.getParent("phaseUse");
|
||||
}).length
|
||||
)
|
||||
return false;
|
||||
|
@ -17173,9 +17176,6 @@ const skills = {
|
|||
cardUsable: function (card, player) {
|
||||
if (player.storage.new_zhixi2 || player.countMark("new_zhixi") >= player.hp) return false;
|
||||
},
|
||||
cardRespondable: function (card, player) {
|
||||
if (player.storage.new_zhixi2 || player.countMark("new_zhixi") >= player.hp) return false;
|
||||
},
|
||||
cardSavable: function (card, player) {
|
||||
if (player.storage.new_zhixi2 || player.countMark("new_zhixi") >= player.hp) return false;
|
||||
},
|
||||
|
@ -19322,7 +19322,6 @@ const skills = {
|
|||
limited: true,
|
||||
skillAnimation: true,
|
||||
animationColor: "orange",
|
||||
forceunique: true,
|
||||
filter: function (event, player) {
|
||||
return player.storage.fanghun2 > 0;
|
||||
},
|
||||
|
@ -19380,7 +19379,7 @@ const skills = {
|
|||
player.awakenSkill("fuhan");
|
||||
"step 1";
|
||||
event.num = Math.min(event.num, 8);
|
||||
player.reinitCharacter("zhaoxiang", result.links[0]);
|
||||
player.reinitCharacter(get.character(player.name2, 3).includes("fuhan") ? player.name2 : player.name1, result.links[0]);
|
||||
"step 2";
|
||||
var num = event.num - player.maxHp;
|
||||
if (num > 0) player.gainMaxHp(num);
|
||||
|
@ -19398,7 +19397,6 @@ const skills = {
|
|||
limited: true,
|
||||
skillAnimation: true,
|
||||
animationColor: "orange",
|
||||
forceunique: true,
|
||||
filter: function (event, player) {
|
||||
return player.countMark("fanghun") > 0;
|
||||
},
|
||||
|
@ -22185,6 +22183,7 @@ const skills = {
|
|||
player.awakenSkill("zhiri");
|
||||
player.loseMaxHp();
|
||||
player.storage.zhiri = true;
|
||||
player.addSkills("xintan");
|
||||
},
|
||||
ai: {
|
||||
combo: "fentian",
|
||||
|
@ -24480,7 +24479,6 @@ const skills = {
|
|||
audio: 2,
|
||||
unique: true,
|
||||
juexingji: true,
|
||||
forceunique: true,
|
||||
derivation: "xiaoji",
|
||||
trigger: { player: "phaseZhunbeiBegin" },
|
||||
filter: function (event, player) {
|
||||
|
|
|
@ -3338,6 +3338,9 @@ const skills = {
|
|||
if (event.num > 0) event.redo();
|
||||
}
|
||||
},
|
||||
ai: {
|
||||
halfneg: true
|
||||
},
|
||||
},
|
||||
xiongrao: {
|
||||
audio: 2,
|
||||
|
|
|
@ -110,7 +110,7 @@ const translates = {
|
|||
xpchijie_info: "每回合每项各限一次。1.当其他角色使用的牌对你结算结束后,你可以令此牌对所有后续目标无效。2.其他角色使用的牌结算完成时,若你是此牌的目标之一且此牌未造成过伤害,则你可以获得此牌对应的所有实体牌。",
|
||||
xpchijie2: "持节",
|
||||
yinju: "引裾",
|
||||
yinju_info: "限定技,出牌阶段,你可以选择一名其他角色。若如此做,当你于此阶段内使用牌指定其为目标后,你与其各摸一张牌;当你即将对其造成伤害时,防止此伤害,然后其回复等量的体力。",
|
||||
yinju_info: "限定技,出牌阶段,你可以选择一名其他角色。若如此做,直到回合结束:1.当你使用牌指定其为目标后,你与其各摸一张牌;2.当你即将对其造成伤害时,防止此伤害,然后其回复等量的体力。",
|
||||
yinju2: "引裾",
|
||||
|
||||
spjiedao: "截刀",
|
||||
|
|
|
@ -6257,7 +6257,7 @@ const skills = {
|
|||
var history = current.getHistory("useCard");
|
||||
if (!history.length) return false;
|
||||
for (var evt of history) {
|
||||
if (evt.card && evt.card.name == "shunshou") {
|
||||
if (evt.card && evt.card.name == "shunshou" && evt.getParent("phaseUse") === event.getParent("phaseUse")) {
|
||||
targets.addArray(evt.targets);
|
||||
}
|
||||
}
|
||||
|
@ -8260,6 +8260,9 @@ const skills = {
|
|||
},
|
||||
},
|
||||
},
|
||||
ai:{
|
||||
combo: "twzhenliang",
|
||||
},
|
||||
},
|
||||
twzhenliang: {
|
||||
group: ["twzhenliang_1", "twzhenliang_2"],
|
||||
|
@ -14734,12 +14737,12 @@ const skills = {
|
|||
order: 2.9,
|
||||
result: {
|
||||
target: function (player, target) {
|
||||
if (get.attitude(player, target) >= 0) return -20;
|
||||
var cards = ui.selected.cards.slice(0);
|
||||
var names = [];
|
||||
for (var i of cards) names.add(i.name);
|
||||
if (names.length < player.hp) return 0;
|
||||
if (player.hasUnknown() && (player.identity != "fan" || !target.isZhu)) return 0;
|
||||
if (get.attitude(player, target) >= 0) return -20;
|
||||
return lib.card.sha.ai.result.target.apply(this, arguments);
|
||||
},
|
||||
},
|
||||
|
@ -15585,7 +15588,6 @@ const skills = {
|
|||
limited: true,
|
||||
skillAnimation: true,
|
||||
animationColor: "orange",
|
||||
forceunique: true,
|
||||
filter: function (event, player) {
|
||||
return player.countMark("fanghun") > 0;
|
||||
},
|
||||
|
|
|
@ -5075,6 +5075,7 @@ const skills = {
|
|||
},
|
||||
},
|
||||
dcxunbie: {
|
||||
unique: true,
|
||||
audio: 2,
|
||||
trigger: {
|
||||
player: "dying",
|
||||
|
@ -5090,7 +5091,9 @@ const skills = {
|
|||
characters.remove("dc_mifuren");
|
||||
}
|
||||
});
|
||||
return characters.length;
|
||||
return characters.length && [player.name1, player.name2].some(name => {
|
||||
return get.character(name, 3).includes("dcxunbie");
|
||||
});
|
||||
},
|
||||
check: () => true,
|
||||
skillAnimation: true,
|
||||
|
@ -5100,30 +5103,30 @@ const skills = {
|
|||
content: function () {
|
||||
"step 0";
|
||||
player.awakenSkill("dcxunbie");
|
||||
if (player.name1 == "ganfurenmifuren" || player.name2 == "ganfurenmifuren") {
|
||||
var characters = ["dc_ganfuren", "dc_mifuren"];
|
||||
game.countPlayer(current => {
|
||||
if (current.name1 == "dc_ganfuren" || current.name2 == "dc_ganfuren") {
|
||||
characters.remove("dc_ganfuren");
|
||||
}
|
||||
if (current.name1 == "dc_mifuren" || current.name2 == "dc_mifuren") {
|
||||
characters.remove("dc_mifuren");
|
||||
}
|
||||
});
|
||||
if (characters.length == 1) event._result = { control: characters[0] };
|
||||
else {
|
||||
player
|
||||
.chooseControl(characters)
|
||||
.set("dialog", ["选择要替换成的武将", [characters, "character"]])
|
||||
.set("ai", () => [0, 1].randomGet());
|
||||
var characters = ["dc_ganfuren", "dc_mifuren"];
|
||||
game.countPlayer(current => {
|
||||
if (current.name1 == "dc_ganfuren" || current.name2 == "dc_ganfuren") {
|
||||
characters.remove("dc_ganfuren");
|
||||
}
|
||||
} else event.goto(2);
|
||||
if (current.name1 == "dc_mifuren" || current.name2 == "dc_mifuren") {
|
||||
characters.remove("dc_mifuren");
|
||||
}
|
||||
});
|
||||
if (characters.length == 1) event._result = { control: characters[0] };
|
||||
else {
|
||||
player
|
||||
.chooseControl(characters)
|
||||
.set("dialog", ["选择要替换成的武将", [characters, "character"]])
|
||||
.set("ai", () => [0, 1].randomGet());
|
||||
}
|
||||
"step 1";
|
||||
var character = result.control;
|
||||
if (!_status.characterlist) {
|
||||
lib.skill.pingjian.initList();
|
||||
}
|
||||
player.reinitCharacter("ganfurenmifuren", character);
|
||||
player.reinitCharacter((get.character(player.name2, 3).includes("dcxunbie") ?
|
||||
player.name2 : player.name1
|
||||
), character);
|
||||
"step 2";
|
||||
player.recover(1 - player.hp);
|
||||
player.addTempSkill("dcxunbie_muteki", { player: "phaseAfter" });
|
||||
|
|
|
@ -308,9 +308,9 @@ game.import("character", function () {
|
|||
},
|
||||
content: function () {
|
||||
player.storage.yuexing2 = target;
|
||||
player.addTempSkill("yuexing2");
|
||||
player.addTempSkill("yuexing2", "phaseUseAfter");
|
||||
target.storage.yuexing2 = player;
|
||||
target.addTempSkill("yuexing2");
|
||||
target.addTempSkill("yuexing2", "phaseUseAfter");
|
||||
},
|
||||
ai: {
|
||||
order: function () {
|
||||
|
@ -2811,7 +2811,7 @@ game.import("character", function () {
|
|||
unique: true,
|
||||
forceunique: true,
|
||||
filter: function () {
|
||||
return Math.random() < 0.5;
|
||||
return Math.random() < 0.5 && [player.name1, player.name2].includes("pal_longkui");
|
||||
},
|
||||
derivation: ["diesha", "guijiang"],
|
||||
content: function () {
|
||||
|
|
|
@ -1238,7 +1238,10 @@ const skills = {
|
|||
aiOrder: function (player, card, num) {
|
||||
if (typeof card.number != "number") return;
|
||||
var history = player.getHistory("useCard", function (evt) {
|
||||
return evt.isPhaseUsing();
|
||||
return (
|
||||
evt.isPhaseUsing() &&
|
||||
evt.getParent("phaseUse") === _status.event.getParent("phaseUse")
|
||||
);
|
||||
});
|
||||
if (history.length == 0) return num + 10 * (14 - card.number);
|
||||
var num = get.number(history[0].card);
|
||||
|
@ -1253,7 +1256,10 @@ const skills = {
|
|||
},
|
||||
filter: function (event, player) {
|
||||
var history = player.getHistory("useCard", function (evt) {
|
||||
return evt.isPhaseUsing();
|
||||
return (
|
||||
evt.isPhaseUsing() &&
|
||||
evt.getParent("phaseUse") === event.getParent("phaseUse")
|
||||
);
|
||||
});
|
||||
if (history.length < 2) return false;
|
||||
var num = get.number(history[0].card);
|
||||
|
@ -1291,7 +1297,10 @@ const skills = {
|
|||
aiOrder: function (player, card, num) {
|
||||
if (typeof card.number != "number") return;
|
||||
var history = player.getHistory("useCard", function (evt) {
|
||||
return evt.isPhaseUsing();
|
||||
return (
|
||||
evt.isPhaseUsing() &&
|
||||
evt.getParent("phaseUse") === _status.event.getParent("phaseUse")
|
||||
);
|
||||
});
|
||||
if (history.length == 0) return num + 10 * card.number;
|
||||
var num = get.number(history[0].card);
|
||||
|
@ -1306,7 +1315,10 @@ const skills = {
|
|||
},
|
||||
filter: function (event, player) {
|
||||
var history = player.getHistory("useCard", function (evt) {
|
||||
return evt.isPhaseUsing();
|
||||
return (
|
||||
evt.isPhaseUsing() &&
|
||||
evt.getParent("phaseUse") === event.getParent("phaseUse")
|
||||
);
|
||||
});
|
||||
if (history.length < 2) return false;
|
||||
var num = get.number(history[0].card);
|
||||
|
|
|
@ -11661,7 +11661,7 @@ const skills = {
|
|||
threaten: 0.8,
|
||||
effect: {
|
||||
target: function (card, player, target) {
|
||||
if (get.tag(card, "damage")) {
|
||||
if (get.tag(card, "damage") && (player.hasSkill("paiyi") || player.hasSkill("zili"))) {
|
||||
if (player.hasSkillTag("jueqing", false, target)) return [1, -2];
|
||||
if (!target.hasFriend()) return;
|
||||
if (target.hp >= 4) return [0.5, get.tag(card, "damage") * 2];
|
||||
|
@ -14447,7 +14447,8 @@ const skills = {
|
|||
aiOrder: function (player, card, num) {
|
||||
if (typeof card == "object" && player.isPhaseUsing()) {
|
||||
var evt = player.getLastUsed();
|
||||
if (evt && evt.card && ((get.suit(evt.card) && get.suit(evt.card) == get.suit(card)) || (evt.card.number && evt.card.number == get.number(card)))) {
|
||||
if (!evt || !evt.card || evt.getParent("phaseUse") !== _status.event.getParent("phaseUse")) return num;
|
||||
if ((get.suit(evt.card) && get.suit(evt.card) == get.suit(card)) || (evt.card.number && evt.card.number == get.number(card))) {
|
||||
return num + 10;
|
||||
}
|
||||
}
|
||||
|
@ -14460,7 +14461,7 @@ const skills = {
|
|||
if (!evt || !evt.card) return false;
|
||||
if (!player.isPhaseUsing()) return false;
|
||||
var evt2 = evt.getParent("phaseUse");
|
||||
if (!evt2 || evt2.name != "phaseUse" || evt2.player != player) return false;
|
||||
if (!evt2 || evt2.name != "phaseUse" || evt2 !== event.getParent("phaseUse")) return false;
|
||||
return (get.suit(evt.card) != "none" && get.suit(evt.card) == get.suit(event.card)) || (typeof get.number(evt.card, false) == "number" && get.number(evt.card, false) == get.number(event.card));
|
||||
},
|
||||
content: function () {
|
||||
|
|
|
@ -946,12 +946,15 @@ const skills = {
|
|||
},
|
||||
},
|
||||
gaoling: {
|
||||
unique: true,
|
||||
audio: 2,
|
||||
trigger: { player: "showCharacterAfter" },
|
||||
hiddenSkill: true,
|
||||
filter: function (event, player) {
|
||||
return (
|
||||
event.toShow.includes("xuangongzhu") &&
|
||||
event.toShow.some(name => {
|
||||
return get.character(name, 3).includes("gaoling");
|
||||
}) &&
|
||||
player != _status.currentPhase &&
|
||||
game.hasPlayer(function (current) {
|
||||
return current.isDamaged();
|
||||
|
|
|
@ -816,7 +816,11 @@ game.import("character", function () {
|
|||
forceunique: true,
|
||||
enable: "phaseUse",
|
||||
filter: function (event, player) {
|
||||
return !player.hasSkill("tongyu_guiyin") && !player.getStat("damage");
|
||||
return (
|
||||
!player.hasSkill("tongyu_guiyin") &&
|
||||
!player.getStat("damage") &&
|
||||
[player.name1, player.name2].includes("yxs_luobinhan")
|
||||
);
|
||||
},
|
||||
derivation: ["lzhangyi", "jimin", "tongyu"],
|
||||
content: function () {
|
||||
|
@ -848,7 +852,11 @@ game.import("character", function () {
|
|||
forceunique: true,
|
||||
enable: "phaseUse",
|
||||
filter: function (event, player) {
|
||||
return player.countCards("he") > 0 && !player.hasSkill("tongyu_guiyin");
|
||||
return (
|
||||
player.countCards("he") > 0 &&
|
||||
!player.hasSkill("tongyu_guiyin") &&
|
||||
[player.name1, player.name2].includes("yxs_luobinhan")
|
||||
);
|
||||
},
|
||||
filterCard: true,
|
||||
position: "he",
|
||||
|
|
168
mode/guozhan.js
168
mode/guozhan.js
|
@ -1158,50 +1158,56 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
const targets = list
|
||||
.slice()
|
||||
.filter((i) => (event.num1 - event.num2) * get.sgn(0.5 - list.indexOf(i)) <= 0);
|
||||
return targets.some((i) => i.countGainableCards(list[1 - list.indexOf(i)], "e"));
|
||||
return targets.some((i) => {
|
||||
const target = list[1 - list.indexOf(i)];
|
||||
return target.hasCard((card) => {
|
||||
return lib.filter.canBeGained(card, i, target);
|
||||
}, "e");
|
||||
});
|
||||
},
|
||||
async cost(event, trigger, player) {
|
||||
let users = [];
|
||||
const list = [event.player, event.target];
|
||||
const list = [trigger.player, trigger.target];
|
||||
let targets = list
|
||||
.slice()
|
||||
.filter((i) => (event.num1 - event.num2) * get.sgn(0.5 - list.indexOf(i)) <= 0);
|
||||
targets = targets
|
||||
.filter((i) => i.countGainableCards(list[1 - list.indexOf(i)], "e"))
|
||||
.sortBySeat(player);
|
||||
.filter((i) => (trigger.num1 - trigger.num2) * get.sgn(0.5 - list.indexOf(i)) <= 0);
|
||||
targets = targets.filter((i) => {
|
||||
const target = list[1 - list.indexOf(i)];
|
||||
return target.hasCard((card) => {
|
||||
return lib.filter.canBeGained(card, i, target);
|
||||
}, "e");
|
||||
}).sortBySeat(player);
|
||||
for (const i of targets) {
|
||||
const aim = list[1 - list.indexOf(i)];
|
||||
const {
|
||||
result: { bool },
|
||||
} = await i
|
||||
.chooseBool(
|
||||
} = await i.chooseBool(
|
||||
get.prompt("fakehanzhan"),
|
||||
"获得" + get.translation(aim) + "装备区的一张牌"
|
||||
)
|
||||
.set(
|
||||
"choice",
|
||||
target.hasCard((card) => {
|
||||
return get.value(card, aim) * get.attitude(i, aim) < 0;
|
||||
}, "e")
|
||||
);
|
||||
).set("choice", aim.hasCard((card) => {
|
||||
return get.value(card, aim) * get.attitude(i, aim) < 0;
|
||||
}, "e"));
|
||||
if (bool) users.push(i);
|
||||
}
|
||||
event.result = { bool: Boolean(users.length), targets: users };
|
||||
},
|
||||
logLine: false,
|
||||
async content(event, trigger, player) {
|
||||
const list = [trigger.player, trigger.target];
|
||||
let targets = list
|
||||
.slice()
|
||||
.filter((i) => (trigger.num1 - trigger.num2) * get.sgn(0.5 - list.indexOf(i)) <= 0);
|
||||
targets = targets
|
||||
.filter(
|
||||
(i) =>
|
||||
i.countGainableCards(list[1 - list.indexOf(i)], "e") &&
|
||||
event.targets.includes(i)
|
||||
)
|
||||
.filter((i) => {
|
||||
const target = list[1 - list.indexOf(i)];
|
||||
return target.hasCard((card) => {
|
||||
return lib.filter.canBeGained(card, i, target);
|
||||
}, "e");
|
||||
})
|
||||
.sortBySeat(player);
|
||||
for (const i of targets) {
|
||||
const aim = list[1 - list.indexOf(i)];
|
||||
i.line(aim, "green");
|
||||
await i.gainPlayerCard(aim, "e", true);
|
||||
}
|
||||
},
|
||||
|
@ -2501,14 +2507,37 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
},
|
||||
fakexibing: {
|
||||
audio: "xibing",
|
||||
inherit: "xibing",
|
||||
filter: function (event, player) {
|
||||
if (player == event.player || event.targets.length != 1 || event.player.countCards("h") >= event.player.hp) return false;
|
||||
var bool = function (card) {
|
||||
return (card.name == "sha" || get.type(card, false) == "trick") && get.color(card, false) == "black";
|
||||
};
|
||||
if (!bool(event.card)) return false;
|
||||
var evt = event.getParent("phaseUse");
|
||||
if (evt.player != event.player) return false;
|
||||
return event.player.getHistory("useCard", function (evtx) {
|
||||
return bool(evtx.card) && evtx.getParent("phaseUse") == evt;
|
||||
})[0] == event.getParent();
|
||||
},
|
||||
logTarget: "player",
|
||||
check: function (event, player) {
|
||||
var target = event.player;
|
||||
var att = get.attitude(player, target);
|
||||
var num2 = Math.min(5, target.hp) - target.countCards("h");
|
||||
if (num2 <= 0) return att <= 0;
|
||||
var num = target.countCards("h", function (card) {
|
||||
return target.hasValueTarget(card, null, true);
|
||||
});
|
||||
if (!num) return att > 0;
|
||||
return (num - num2) * att < 0;
|
||||
},
|
||||
preHidden: true,
|
||||
content() {
|
||||
"step 0";
|
||||
var num = trigger.player.hp - trigger.player.countCards("h");
|
||||
if (num > 0) trigger.player.draw(num);
|
||||
"step 1";
|
||||
trigger.player.addTempSkill("xibing2");
|
||||
player._xibing = true;
|
||||
trigger.player.addTempSkill("fakexibing_banned");
|
||||
if (get.mode() != "guozhan" || player.isUnseen(2) || trigger.player.isUnseen(2))
|
||||
event.finish();
|
||||
"step 2";
|
||||
|
@ -2537,10 +2566,22 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
var target = trigger.player;
|
||||
player.hideCharacter(player.name1 == result.links[0] ? 0 : 1);
|
||||
target.hideCharacter(target.name1 == result.links[1] ? 0 : 1);
|
||||
player.addTempSkill("xibing3");
|
||||
target.addTempSkill("xibing3");
|
||||
player.addTempSkill("fakexibing_nomingzhi");
|
||||
target.addTempSkill("fakexibing_nomingzhi");
|
||||
}
|
||||
},
|
||||
subSkill: {
|
||||
banned: {
|
||||
mod: {
|
||||
cardEnabled2: function (card) {
|
||||
if (get.position(card) == "h") return false;
|
||||
},
|
||||
},
|
||||
},
|
||||
nomingzhi: {
|
||||
ai: { nomingzhi: true },
|
||||
},
|
||||
},
|
||||
},
|
||||
fakechengshang: {
|
||||
audio: "chengshang",
|
||||
|
@ -2595,14 +2636,14 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
const storage = player.getStorage("fakechengshang_effect");
|
||||
const list = lib.card.list
|
||||
.filter((list) => {
|
||||
const type = get.type(card[2]);
|
||||
const type = get.type(list[2]);
|
||||
if (type != "basic" && type != "trick") return false;
|
||||
return storage.some(
|
||||
(card) =>
|
||||
card[0] == list[0] && card[1] == list[1] && card[2] != list[2]
|
||||
);
|
||||
})
|
||||
.map((card) => [get.translation(type), "", card[2], card[3]]);
|
||||
.map((card) => [get.translation(get.type2(card[2])), "", card[2], card[3]]);
|
||||
return ui.create.dialog("承赏", [list, "vcard"]);
|
||||
},
|
||||
filter(button, player) {
|
||||
|
@ -2674,8 +2715,15 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
},
|
||||
},
|
||||
fakezhiwei: {
|
||||
unique: true,
|
||||
audio: "zhiwei",
|
||||
inherit: "zhiwei",
|
||||
filter: function (event, player, name) {
|
||||
if (!game.hasPlayer(current => current != player)) return false;
|
||||
return event.name == "showCharacter" && event.toShow.some(name => {
|
||||
return get.character(name, 3).includes("fakezhiwei");
|
||||
});
|
||||
},
|
||||
content() {
|
||||
"step 0";
|
||||
player
|
||||
|
@ -3724,21 +3772,19 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
audio: "mobiledanshou",
|
||||
trigger: { global: "phaseZhunbeiBegin" },
|
||||
filter(event, player) {
|
||||
return ["h", "e", "j"].some((pos) =>
|
||||
player.getCards(pos).every((card) => lib.filter.cardDiscardable(card, player))
|
||||
);
|
||||
return ["h", "e", "j"].some((pos) =>{
|
||||
const cards = player.getCards(pos);
|
||||
return cards.length > 0 && cards.every((card) => lib.filter.cardDiscardable(card, player));
|
||||
});
|
||||
},
|
||||
async cost(event, trigger, player) {
|
||||
let list = [],
|
||||
map = { h: "手牌区", e: "装备区", j: "判定区" };
|
||||
list.addArray(
|
||||
["h", "e", "j"]
|
||||
.filter((pos) => {
|
||||
return player
|
||||
.getCards(pos)
|
||||
.every((card) => lib.filter.cardDiscardable(card, player));
|
||||
})
|
||||
.map((i) => map[i])
|
||||
["h", "e", "j"].filter((pos) => {
|
||||
const cards = player.getCards(pos);
|
||||
return cards.length > 0 && cards.every((card) => lib.filter.cardDiscardable(card, player));
|
||||
}).map((i) => map[i])
|
||||
);
|
||||
list.push("cancel2");
|
||||
const {
|
||||
|
@ -3787,7 +3833,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
result: { control },
|
||||
} = await player
|
||||
.chooseControl("摸牌", "增加摸牌数")
|
||||
.set("prompt", "胆守:请选择一项")
|
||||
.set("prompt", `胆守:请选择一项(当前为${get.translation(trigger.name)})`)
|
||||
.set("ai", () => {
|
||||
const player = get.event().player,
|
||||
trigger = get.event().getTrigger();
|
||||
|
@ -4914,6 +4960,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
},
|
||||
},
|
||||
fakebaoqie: {
|
||||
unique: true,
|
||||
audio: "baoqie",
|
||||
trigger: { player: "showCharacterEnd" },
|
||||
filter(event, player) {
|
||||
|
@ -5087,6 +5134,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
},
|
||||
},
|
||||
fakehuirong: {
|
||||
unique: true,
|
||||
audio: "huirong",
|
||||
trigger: { player: "showCharacterEnd" },
|
||||
filter(event, player) {
|
||||
|
@ -5258,6 +5306,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
},
|
||||
},
|
||||
fakeshiren: {
|
||||
unique: true,
|
||||
audio: "shiren",
|
||||
trigger: { player: "showCharacterEnd" },
|
||||
filter(event, player) {
|
||||
|
@ -6410,7 +6459,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
})
|
||||
)
|
||||
return false;
|
||||
return event.toShow.some((name) => lib.character[name][3].includes("gzjinyu"));
|
||||
return event.toShow.some((name) => get.character(name, 3).includes("gzjinyu"));
|
||||
},
|
||||
logTarget: function (event, player) {
|
||||
return game
|
||||
|
@ -6439,8 +6488,8 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
.set("prompt", "近谀:请暗置一张武将牌")
|
||||
.set("ai", function () {
|
||||
var target = _status.event.player;
|
||||
if (target.name == "gz_pengyang") return "主将";
|
||||
if (target.name2 == "gz_pengyang") return "副将";
|
||||
if (get.character(target.name, 3).includes("gzjinyu")) return "主将";
|
||||
if (get.character(target.name2, 3).includes("gzjinyu")) return "副将";
|
||||
if (
|
||||
lib.character[target.name][3].some((skill) => {
|
||||
var info = get.info(skill);
|
||||
|
@ -7526,11 +7575,14 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
},
|
||||
//黄权
|
||||
gzdianhu: {
|
||||
unique: true,
|
||||
audio: "xinfu_dianhu",
|
||||
trigger: { player: "showCharacterAfter" },
|
||||
forced: true,
|
||||
filter: function (event, player) {
|
||||
return event.toShow.includes("gz_xf_huangquan") && !player.storage.gzdianhu_effect;
|
||||
return event.toShow.some(name => {
|
||||
return get.character(name, 3).includes("gzdianhu");
|
||||
}) && !player.storage.gzdianhu_effect;
|
||||
},
|
||||
content: function () {
|
||||
"step 0";
|
||||
|
@ -8647,7 +8699,9 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
audio: "xuanbei",
|
||||
trigger: { player: "showCharacterAfter" },
|
||||
filter: function (event, player) {
|
||||
return !player.storage.gzxuanbei && event.toShow.includes("gz_yangyan");
|
||||
return !player.storage.gzxuanbei && event.toShow.some(name => {
|
||||
return get.character(name, 3).includes("gzxuanbei");
|
||||
});
|
||||
},
|
||||
forced: true,
|
||||
locked: false,
|
||||
|
@ -9567,7 +9621,9 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
trigger: { player: "showCharacterAfter" },
|
||||
forced: true,
|
||||
filter: function (event, player) {
|
||||
return event.toShow.includes("gz_liaohua") && !player.storage.gzdangxian_draw;
|
||||
return event.toShow.some(name => {
|
||||
return get.character(name, 3).includes("gzdangxian");
|
||||
}) && !player.storage.gzdangxian_draw;
|
||||
},
|
||||
content: function () {
|
||||
player.storage.gzdangxian_draw = true;
|
||||
|
@ -13040,7 +13096,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
},
|
||||
content: function () {
|
||||
trigger.cancel();
|
||||
player.removeCharacter(player.name1 == "gz_yanbaihu" ? 0 : 1);
|
||||
player.removeCharacter(get.character(player.name1, 3).includes("gzyjili") ? 0 : 1);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -14723,7 +14779,9 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
},
|
||||
forced: true,
|
||||
filter: function (event, player) {
|
||||
return event.toShow.includes("gz_zuoci") && !player.storage.yigui_init;
|
||||
return event.toShow.some(name => {
|
||||
return get.character(name, 3).includes("yigui");
|
||||
}) && !player.storage.yigui_init;
|
||||
},
|
||||
content: function () {
|
||||
player.storage.yigui_init = true;
|
||||
|
@ -16349,8 +16407,9 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
if (event.filterName(event.current.name2)) list.push("副将");
|
||||
if (list.length > 1)
|
||||
event.current.chooseControl(["主将", "副将"]).set("ai", function () {
|
||||
if (player.name1 == "gz_fazheng") return 0;
|
||||
if (player.name2 == "gz_fazheng") return 1;
|
||||
let player = _status.event.player;
|
||||
if (get.character(player.name1, 3).includes("gzxuanhuo")) return 0;
|
||||
if (get.character(player.name2, 3).includes("gzxuanhuo")) return 1;
|
||||
return Math.random() > 0.5 ? 0 : 1;
|
||||
}).prompt = "选择并展示一张武将牌,然后执行军令";
|
||||
else event._result = { index: list[0] == "主将" ? 0 : 1 };
|
||||
|
@ -17010,9 +17069,9 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (event.target.name == "gz_zhoutai") {
|
||||
if (get.character(event.target.name, 3).includes("buqu")) {
|
||||
choice = "主将";
|
||||
} else if (event.target.name2 == "gz_zhoutai") {
|
||||
} else if (get.character(event.target.name2, 3).includes("buqu")) {
|
||||
choice = "副将";
|
||||
}
|
||||
player
|
||||
|
@ -20606,12 +20665,15 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
},
|
||||
},
|
||||
gzguixiu: {
|
||||
unique: true,
|
||||
audio: "guixiu",
|
||||
trigger: { player: ["showCharacterAfter", "removeCharacterBefore"] },
|
||||
filter: function (event, player) {
|
||||
if (event.name == "removeCharacter" || event.name == "changeVice")
|
||||
return event.toRemove == "gz_mifuren" && player.isDamaged();
|
||||
return event.toShow.includes("gz_mifuren");
|
||||
return get.character(event.toRemove, 3).includes("gzguixiu") && player.isDamaged();
|
||||
return event.toShow.some(name => {
|
||||
return get.character(name, 3).includes("gzguixiu");
|
||||
});
|
||||
},
|
||||
content: function () {
|
||||
if (trigger.name == "showCharacter") {
|
||||
|
@ -23773,7 +23835,7 @@ game.import("mode", function (lib, game, ui, get, ai, _status) {
|
|||
"副将技。①此武将牌计算体力上限时减少半个阴阳鱼。②结束阶段,你可以弃置一张非基本牌并选择一名友方角色,令其选择摸两张牌或回复1点体力,然后其可以变更副将。",
|
||||
fakexibing: "息兵",
|
||||
fakexibing_info:
|
||||
"当一名其他角色在其出牌阶段内使用第一张黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至体力值且本回合不能再使用手牌。若你与其均明置了所有武将牌,则你可以暗置你与其各一张武将牌且本回合不能再明置此武将牌。",
|
||||
"手牌数小于体力值的其他角色于其出牌阶段内使用第一张黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至体力值且本回合不能再使用手牌。若你与其均明置了所有武将牌,则你可以暗置你与其各一张武将牌且本回合不能再明置此武将牌。",
|
||||
fakechengshang: "承赏",
|
||||
fakechengshang_info:
|
||||
"出牌阶段限一次,当你使用存在花色和点数且指定了其他势力角色为目标的牌结算完毕后,若你未因此牌造成过伤害,则你可以摸一张牌,然后本阶段你可以将一张手牌当作初始游戏牌堆中与此牌花色和点数相同的另一张基本牌或普通锦囊牌使用一次。",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export const rootURL = new URL(import.meta.url);
|
||||
export const rootURL = new URL("../", import.meta.url);
|
||||
|
||||
export { GNC, gnc, setGNC } from "./noname/gnc/index.js";
|
||||
export { AI, ai, setAI } from "./noname/ai/index.js";
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -142,17 +142,14 @@ Reflect.defineProperty(HTMLDivElement.prototype, "setBackground", {
|
|||
gzbool = false;
|
||||
const mode = get.mode();
|
||||
if (type == "character") {
|
||||
nameinfo = get.character(name);
|
||||
if (lib.characterPack[`mode_${mode}`] && lib.characterPack[`mode_${mode}`][name]) {
|
||||
if (mode == "guozhan") {
|
||||
nameinfo = lib.character[name];
|
||||
if (name.startsWith("gz_shibing")) name = name.slice(3, 11);
|
||||
else {
|
||||
if (
|
||||
lib.config.mode_config.guozhan.guozhanSkin &&
|
||||
lib.character[name] &&
|
||||
lib.character[name].hasSkinInGuozhan
|
||||
)
|
||||
if (lib.config.mode_config.guozhan.guozhanSkin && nameinfo && nameinfo.hasSkinInGuozhan){
|
||||
gzbool = true;
|
||||
}
|
||||
name = name.slice(3);
|
||||
}
|
||||
} else modeimage = mode;
|
||||
|
@ -161,8 +158,6 @@ Reflect.defineProperty(HTMLDivElement.prototype, "setBackground", {
|
|||
name = name.split("::");
|
||||
modeimage = name[0];
|
||||
name = name[1];
|
||||
} else {
|
||||
nameinfo = get.character(name);
|
||||
}
|
||||
}
|
||||
let imgPrefixUrl;
|
||||
|
|
|
@ -5848,6 +5848,7 @@ export class Player extends HTMLDivElement {
|
|||
return get.is.sameNature(natures, naturesx);
|
||||
};
|
||||
if (next.hasNature("poison")) delete next._triggered;
|
||||
else if(next.unreal) next._triggered = 2;
|
||||
next.setContent("damage");
|
||||
next.filterStop = function () {
|
||||
if (this.source && this.source.isDead()) delete this.source;
|
||||
|
|
|
@ -1042,7 +1042,7 @@ export class Create {
|
|||
.setContent(function () {
|
||||
game.log(player, "投降");
|
||||
player.popup("投降");
|
||||
player.die("nosource").includeOut = true;
|
||||
player.die("nosource").set("_triggered", null).includeOut = true;
|
||||
}).player = player;
|
||||
}
|
||||
if (_status.paused && _status.imchoosing && !_status.auto) {
|
||||
|
|
Loading…
Reference in New Issue