手杀新司马孚,将21版司马孚移动至TW包

This commit is contained in:
copcap 2024-05-21 04:50:15 +08:00
parent 6e9e06c55c
commit fd3b95c8e6
No known key found for this signature in database
GPG Key ID: 30E7AB6699451AEE
9 changed files with 239 additions and 117 deletions

View File

@ -1,4 +1,5 @@
const characters = {
mb_simafu: ["male", "wei", 3, ["mbpanxiang", "mbchenjie"]],
mb_sp_guanqiujian: ["male", "wei", 4, ["mbcuizhen", "mbkuili"]],
mb_caomao: ["male", "wei", 3, ["mbqianlong", "mbweitong"], ["zhu"]],
chengji: ["male", "wei", 4, ["mbkuangli", "mbxiongsi"]],

View File

@ -2,6 +2,124 @@ import { lib, game, ui, get, ai, _status } from "../../noname.js";
/** @type { importCharacterConfig['skill'] } */
const skills = {
//新司马孚
mbpanxiang: {
audio: 2,
trigger: {
global: "damageBegin3",
},
async cost(event, trigger, player) {
const { player: target, source, card } = trigger;
const [SUB, ADD] = ["减伤", "加伤"];
const list = ["减伤", "加伤"].filter(text => text !== (player.storage.mbpanxiang || {})[target.playerid]);
list.push("cancel2");
let prompt = `${get.translation(target)}即将受到${source ? "来自" + get.translation(source) : "无来源"}${trigger.num}点伤害,你可以选择一项:`;
const choiceTexts = [`⒈令此伤害-1${source && source.isIn() ? "" + get.translation(source) + "摸两张牌" : ""}`, `⒉令此伤害+1${get.translation(target)}摸三张牌。`];
if (!list.includes(SUB)) choiceTexts[0] = `<span style="text-decoration: line-through;">${choiceTexts[0]}(上次选过)</span>`;
if (!list.includes(ADD)) choiceTexts[1] = `<span style="text-decoration: line-through;">${choiceTexts[1]}(上次选过)</span>`;
choiceTexts.forEach(text => prompt += text);
const result = await player
.chooseControl(list)
.set("prompt", get.prompt("mbpanxiang", target))
.set("prompt2", prompt)
.set("ai", () => {
return get.event("choice");
})
.set(
"choice",
(() => {
const damageEff = get.damageEffect(target, source, player);
const att = get.attitude(player, target),
attSource = get.attitude(player, source);
const canFilterDamage = target.hasSkillTag("filterDamage", null, {
player: source,
card,
});
if (list.includes(ADD)) {
if (damageEff > 0) {
if (!canFilterDamage && target.getHp() <= trigger.num + 1) return ADD;
} else {
if (att > 0 && (damageEff === 0 || canFilterDamage)) return ADD;
if (
target.getHp() +
target.countCards("hs", card => {
return target.canSaveCard(card, target);
}) >
trigger.num + 1 &&
!list.includes(SUB)
)
return ADD;
}
}
if (list.includes(SUB)) {
if (att > 0 && attSource > 0) return SUB;
if (canFilterDamage && att > 0) return "cancel2";
if (damageEff > 0) {
if (target.getHp() > trigger.num && attSource > 0 && source.countCards("h") + source.getHp() <= 4) return SUB;
} else {
if (att > 0) {
if (trigger.num >= target.getHp()) return SUB;
if (
!source.countCards("hs", card => {
return source.canUse(card, target, true) && get.effect(target, card, source, player) > 0;
})
)
return Math.random() < 0.7 ? ADD : "cancel2";
} else {
if (attSource > 0) return SUB;
if (target.hasSkillTag("maixie") && trigger.num === 1 && damageEff < -20) return SUB;
}
}
}
return "cancel2";
})()
)
.forResult();
if (result.control !== "cancel2") {
event.result = {
bool: true,
cost_data: {
control: result.control,
},
};
}
},
logTarget: "player",
onremove: true,
async content(event, trigger, player) {
const { control } = event.cost_data;
const { player: target, source } = trigger;
if (!player.storage.mbpanxiang) player.storage.mbpanxiang = {};
player.storage.mbpanxiang[target.playerid] = control;
if (control === "减伤") {
trigger.num--;
game.log(player, "令此伤害", "#y-1");
if (source && source.isIn()) await source.draw(2);
} else {
trigger.num++;
game.log(player, "令此伤害", "#y+1");
await target.draw(3);
}
},
},
mbchenjie: {
audio: 2,
trigger: { global: "dieAfter" },
filter(event, player) {
return (
player.hasSkill("mbpanxiang", null, false, false) &&
player.hasHistory("useSkill", evt => {
return evt.skill === "mbpanxiang" && evt.targets.includes(event.player);
})
);
},
forced: true,
async content(event, trigger, player) {
const cards = player.getCards("hej", card => lib.filter.cardDiscardable(card, player, "mbchenjie"));
if (cards.length) await player.discard(cards);
await player.draw(4);
},
},
//李昭焦伯
mbzuoyou: {
audio: 2,
@ -7907,110 +8025,6 @@ const skills = {
},
ai: { combo: "jibing", expose: 0.2 },
},
//司马孚
xunde: {
audio: 2,
trigger: { global: "damageEnd" },
filter: function (event, player) {
return event.player.isIn() && get.distance(player, event.player) <= 1;
},
logTarget: "player",
check: function (event, player) {
return get.attitude(player, event.player) > 0 && (!event.source || get.attitude(player, event.source) < 0);
},
content: function () {
"step 0";
player.judge().set("callback", function () {
if (event.judgeResult.number > 5) {
var player = event.getParent(2)._trigger.player;
if (get.position(card, true) == "o") player.gain(card, "gain2");
}
});
"step 1";
if (result.number < 7) {
var source = trigger.source;
if (source && source.isIn() && source.countCards("h") > 0) {
player.line(source);
source.chooseToDiscard("h", true);
}
}
},
},
chenjie: {
audio: 2,
trigger: { global: "judge" },
filter: function (event, player) {
var suit = get.suit(event.player.judging[0], event.player);
return (
player.countCards("hes", function (card) {
if (_status.connectMode && get.position(card) != "e") return true;
return get.suit(card) == suit;
}) > 0
);
},
direct: true,
preHidden: true,
content: function () {
"step 0";
var suit = get.suit(trigger.player.judging[0], trigger.player);
player
.chooseCard(get.translation(trigger.player) + "的" + (trigger.judgestr || "") + "判定为" + get.translation(trigger.player.judging[0]) + "" + get.prompt("chenjie"), "hes", function (card) {
if (get.suit(card) != _status.event.suit) return false;
var player = _status.event.player;
var mod2 = game.checkMod(card, player, "unchanged", "cardEnabled2", player);
if (mod2 != "unchanged") return mod2;
var mod = game.checkMod(card, player, "unchanged", "cardRespondable", player);
if (mod != "unchanged") return mod;
return true;
})
.set("ai", function (card) {
var trigger = _status.event.getTrigger();
var player = _status.event.player;
var judging = _status.event.judging;
var result = trigger.judge(card) - trigger.judge(judging);
var attitude = get.attitude(player, trigger.player);
if (attitude == 0 || result == 0) return 0.1;
if (attitude > 0) {
return result + 0.01;
} else {
return 0.01 - result;
}
})
.set("judging", trigger.player.judging[0])
.set("suit", suit)
.setHiddenSkill(event.name);
"step 1";
if (result.bool) {
event.card = result.cards[0];
player.respond(result.cards, "highlight", "chenjie", "noOrdering");
} else {
event.finish();
}
"step 2";
if (result.bool) {
if (trigger.player.judging[0].clone) {
trigger.player.judging[0].clone.classList.remove("thrownhighlight");
game.broadcast(function (card) {
if (card.clone) {
card.clone.classList.remove("thrownhighlight");
}
}, trigger.player.judging[0]);
game.addVideo("deletenode", player, get.cardsInfo([trigger.player.judging[0].clone]));
}
game.cardsDiscard(trigger.player.judging[0]);
trigger.player.judging[0] = card;
trigger.orderingCards.add(card);
game.log(trigger.player, "的判定牌改为", card);
player.draw(2);
}
},
ai: {
rejudge: true,
tag: {
rejudge: 0.1,
},
},
},
//傅佥
jueyong: {
audio: 2,

View File

@ -1,5 +1,5 @@
const characterSort = {
mobile_default: ["mb_sp_guanqiujian", "mb_caomao", "chengji", "lizhaojiaobo", "xin_huojun", "muludawang", "mb_chengui", "mb_huban", "mb_xianglang", "yanxiang", "xin_wuban", "laimin", "baoxin", "jiangji", "liwei", "xin_guozhao", "miheng", "taoqian", "lingcao", "sunru", "lifeng", "zhuling", "liuye", "zhaotongzhaoguang", "majun", "simazhao", "wangyuanji", "pangdegong", "shenpei", "hujinding", "zhangyì", "jiakui", "yangbiao", "chendeng", "dongcheng", "yangyi", "dengzhi", "zhengxuan", "sp_sufei", "furong", "dingyuan", "simashi", "yanghuiyu", "hucheer", "gongsunkang", "nanhualaoxian", "zhouqun", "qiaozhou", "fuqian", "simafu", "mayuanyi", "yanpu", "sunhanhua", "sp_maojie", "peixiu", "sp_jianggan", "ruanhui", "xin_mamidi", "sp_caosong", "yangfu", "wangjun", "sp_pengyang", "qianzhao", "shichangshi", "yangfeng"],
mobile_default: ["mb_simafu", "mb_sp_guanqiujian", "mb_caomao", "chengji", "lizhaojiaobo", "xin_huojun", "muludawang", "mb_chengui", "mb_huban", "mb_xianglang", "yanxiang", "xin_wuban", "laimin", "baoxin", "jiangji", "liwei", "xin_guozhao", "miheng", "taoqian", "lingcao", "sunru", "lifeng", "zhuling", "liuye", "zhaotongzhaoguang", "majun", "simazhao", "wangyuanji", "pangdegong", "shenpei", "hujinding", "zhangyì", "jiakui", "yangbiao", "chendeng", "dongcheng", "yangyi", "dengzhi", "zhengxuan", "sp_sufei", "furong", "dingyuan", "simashi", "yanghuiyu", "hucheer", "gongsunkang", "nanhualaoxian", "zhouqun", "qiaozhou", "fuqian", "mayuanyi", "yanpu", "sunhanhua", "sp_maojie", "peixiu", "sp_jianggan", "ruanhui", "xin_mamidi", "sp_caosong", "yangfu", "wangjun", "sp_pengyang", "qianzhao", "shichangshi", "yangfeng"],
mobile_yijiang: ["yj_zhanghe", "yj_zhangliao", "yj_xuhuang", "yj_ganning", "yj_huangzhong", "yj_weiyan", "yj_zhoubuyi"],
mobile_standard: ["xin_xiahoudun", "xin_zhangfei"],
mobile_shenhua_feng: ["re_xiaoqiao", "xin_zhoutai"],

View File

@ -495,12 +495,6 @@ const translates = {
jueyong_info: "锁定技。①当你不因〖绝勇〗成为唯一牌的目标时若此牌不为转化牌且对应的实体牌牌数为1且不为【桃】或【酒】且你的“绝”数小于你的体力值则你将此牌置于你的武将牌上称为“绝”且取消此牌的目标。②结束阶段开始时若你有“绝”则你令所有“绝”的原使用者依次对你使用所有“绝”将无法使用的“绝”置入弃牌堆。",
poxiang: "破降",
poxiang_info: "出牌阶段限一次。你可以将一张牌交给一名其他角色。你摸三张牌不计入本回合的手牌上限移去所有“绝”并失去1点体力。",
simafu: "手杀司马孚",
simafu_prefix: "手杀",
xunde: "勋德",
xunde_info: "一名角色受到伤害后若你至其的距离不大于1则你可判定。若判定结果大于5你令该角色获得判定牌小于7你令伤害来源弃置一张手牌。",
chenjie: "臣节",
chenjie_info: "一名角色的判定牌生效前,你可打出一张花色相同的牌。系统将你打出的牌作为新判定牌,将原判定牌置入弃牌堆。然后你摸两张牌。",
mayuanyi: "马元义",
jibing: "集兵",
jibing_info: "①摸牌阶段开始时,若你的“兵”数小于势力数,则你可以改为将牌堆顶的两张牌置于你的武将牌上,称为“兵”。②你可以将一张“兵”当做【杀】或【闪】使用或打出。",
@ -894,6 +888,12 @@ const translates = {
mbjuejin_info: "限定技。出牌阶段你可以令所有角色依次将体力回复或失去至1并获得X点护甲X为一名角色以此法变化的体力值。然后你增加如下“向死存魏”的全局技能当有牌进入弃牌堆后系统将这些牌中的【闪】、【桃】和【酒】移出游戏。",
mbweitong: "卫统",
mbweitong_info: "主公技。游戏开始时若你有〖潜龙〗你获得20X枚“道心”X为其他魏势力角色数。",
mb_simafu: "手杀司马孚",
mb_simafu_prefix: "手杀",
mbpanxiang: "蹒襄",
mbpanxiang_info: "当一名角色受到伤害时,你可以选择一项(不能与上次你因其发动此技能时选择的选项相同):⒈令此伤害-1伤害来源摸两张牌⒉令此伤害+1其摸三张牌。",
mbchenjie: "臣节",
mbchenjie_info: "锁定技。当一名角色死亡后,若你有〖蹒襄〗且其成为过你〖蹒襄〗的目标,你弃置区域里的所有牌,摸四张牌。",
};
export default translates;

View File

@ -241,11 +241,6 @@ export default {
"#moucuan1": "汉失民心,天赐良机!",
"#moucuan2": "天下正主,正是大贤良师!",
"#mayuanyi:die": "唐周……无耻!",
"#xunde1": "陛下所托,臣必尽心尽力!",
"#xunde2": "纵吾荏弱难持,亦不推诿君命!",
"#chenjie1": "臣心怀二心,不可事君也。",
"#chenjie2": "竭力致身,以尽臣节。",
"#simafu:die": "身辅六公,亦难报此恩……",
"#jueyong1": "敌围何惧,有死而已!",
"#jueyong2": "身陷敌阵,战而弥勇!",
"#poxiang1": "王瓘既然假降,吾等可将计就计。",

View File

@ -290,6 +290,107 @@ const skills = {
result: { player: 1 },
},
},
//司马孚
xunde: {
audio: 2,
trigger: { global: "damageEnd" },
filter(event, player) {
return event.player.isIn() && get.distance(player, event.player) <= 1;
},
logTarget: "player",
check(event, player) {
return get.attitude(player, event.player) > 0 && (!event.source || get.attitude(player, event.source) < 0);
},
content() {
"step 0";
player.judge().set("callback", function () {
if (event.judgeResult.number > 5) {
var player = event.getParent(2)._trigger.player;
if (get.position(card, true) == "o") player.gain(card, "gain2");
}
});
"step 1";
if (result.number < 7) {
var source = trigger.source;
if (source && source.isIn() && source.countCards("h") > 0) {
player.line(source);
source.chooseToDiscard("h", true);
}
}
},
},
chenjie: {
audio: 2,
trigger: { global: "judge" },
filter(event, player) {
var suit = get.suit(event.player.judging[0], event.player);
return (
player.countCards("hes", function (card) {
if (_status.connectMode && get.position(card) != "e") return true;
return get.suit(card) == suit;
}) > 0
);
},
popup: false,
preHidden: true,
async cost(event, trigger, player) {
var suit = get.suit(trigger.player.judging[0], trigger.player);
const {
result: { bool, cards },
} = await player
.chooseCard(get.translation(trigger.player) + "的" + (trigger.judgestr || "") + "判定为" + get.translation(trigger.player.judging[0]) + "" + get.prompt("chenjie"), "hes", function (card) {
if (get.suit(card) != _status.event.suit) return false;
var player = _status.event.player;
var mod2 = game.checkMod(card, player, "unchanged", "cardEnabled2", player);
if (mod2 != "unchanged") return mod2;
var mod = game.checkMod(card, player, "unchanged", "cardRespondable", player);
if (mod != "unchanged") return mod;
return true;
})
.set("ai", function (card) {
var trigger = _status.event.getTrigger();
var player = _status.event.player;
var judging = _status.event.judging;
var result = trigger.judge(card) - trigger.judge(judging);
var attitude = get.attitude(player, trigger.player);
if (attitude == 0 || result == 0) return 0.1;
if (attitude > 0) {
return result + 0.01;
} else {
return 0.01 - result;
}
})
.set("judging", trigger.player.judging[0])
.set("suit", suit)
.setHiddenSkill("chenjie");
if (bool) event.result = { bool, cost_data: { cards } };
},
async content(event, trigger, player) {
const result = event.cost_data;
const card = result.cards[0];
await player.respond(result.cards, "highlight", "chenjie", "noOrdering");
if (trigger.player.judging[0].clone) {
trigger.player.judging[0].clone.classList.remove("thrownhighlight");
game.broadcast(function (card) {
if (card.clone) {
card.clone.classList.remove("thrownhighlight");
}
}, trigger.player.judging[0]);
game.addVideo("deletenode", player, get.cardsInfo([trigger.player.judging[0].clone]));
}
await game.cardsDiscard(trigger.player.judging[0]);
trigger.player.judging[0] = card;
trigger.orderingCards.add(card);
game.log(trigger.player, "的判定牌改为", card);
await player.draw(2);
},
ai: {
rejudge: true,
tag: {
rejudge: 0.1,
},
},
},
//颜良文丑,但是颜良+文丑
twduwang: {
audio: 3,

View File

@ -1,5 +1,5 @@
const characterSort = {
tw_sp: ["tw_zhugejun", "tw_yanliang", "tw_wenchou", "tw_yuantan", "tw_zhangzhao", "tw_zhanghong", "tw_fuwan", "tw_yujin", "tw_zhaoxiang", "tw_hucheer", "tw_hejin", "tw_mayunlu", "tw_re_caohong", "tw_zangba", "tw_liuhong", "tw_tianyu", "jiachong", "duosidawang", "wuban", "yuejiu", "tw_caocao", "tw_zhangmancheng", "tw_caozhao", "tw_wangchang", "tw_puyangxing", "tw_jiangji", "tw_niujin", "tw_xiahouen", "tw_xiahoushang", "tw_zhangji", "tw_zhangnan", "tw_fengxí", "tw_furong", "tw_liwei", "tw_yangyi", "tw_daxiaoqiao", "tw_dengzhi", "tw_baoxin", "tw_bingyuan", "tw_fanchou", "tw_haomeng", "tw_huchuquan", "tw_jianshuo", "tw_jiling", "tw_liufuren", "tw_liuzhang", "tw_mateng", "tw_niufudongxie", "tw_qiaorui", "tw_weixu", "tw_yanxiang", "tw_yufuluo", "tw_zhangning", "tw_dengzhi", "tw_yangyi", "tw_yangang", "tw_gongsunfan"],
tw_sp: ["simafu", "tw_zhugejun", "tw_yanliang", "tw_wenchou", "tw_yuantan", "tw_zhangzhao", "tw_zhanghong", "tw_fuwan", "tw_yujin", "tw_zhaoxiang", "tw_hucheer", "tw_hejin", "tw_mayunlu", "tw_re_caohong", "tw_zangba", "tw_liuhong", "tw_tianyu", "jiachong", "duosidawang", "wuban", "yuejiu", "tw_caocao", "tw_zhangmancheng", "tw_caozhao", "tw_wangchang", "tw_puyangxing", "tw_jiangji", "tw_niujin", "tw_xiahouen", "tw_xiahoushang", "tw_zhangji", "tw_zhangnan", "tw_fengxí", "tw_furong", "tw_liwei", "tw_yangyi", "tw_daxiaoqiao", "tw_dengzhi", "tw_baoxin", "tw_bingyuan", "tw_fanchou", "tw_haomeng", "tw_huchuquan", "tw_jianshuo", "tw_jiling", "tw_liufuren", "tw_liuzhang", "tw_mateng", "tw_niufudongxie", "tw_qiaorui", "tw_weixu", "tw_yanxiang", "tw_yufuluo", "tw_zhangning", "tw_dengzhi", "tw_yangyi", "tw_yangang", "tw_gongsunfan"],
tw_yunchouzhi: ["tw_wangcan", "tw_dongzhao", "tw_bianfuren", "tw_feiyi", "tw_chenzhen", "tw_xunchen"],
tw_yunchouxin: ["tw_wangling", "tw_huojun", "tw_wujing", "tw_zhouchu"],
tw_yunchouren: ["tw_xujing", "tw_qiaogong"],

View File

@ -693,6 +693,12 @@ const translates = {
twdaigui_info: "出牌阶段结束时若你手牌的颜色均相同你可以选择至多Y名角色并亮出牌堆底等量的牌然后这些角色依次选择并获得其中一张Y为你的手牌数。",
twcairu: "才濡",
twcairu_info: "每回合每种牌名限一次。你可以将两张颜色不同的牌当【火攻】、【铁索连环】或【无中生有】使用。",
simafu: "TW司马孚",
simafu_prefix: "TW",
xunde: "勋德",
xunde_info: "一名角色受到伤害后若你至其的距离不大于1则你可判定。若判定结果大于5你令该角色获得判定牌小于7你令伤害来源弃置一张手牌。",
chenjie: "臣节",
chenjie_info: "一名角色的判定牌生效前,你可打出一张花色相同的牌。系统将你打出的牌作为新判定牌,将原判定牌置入弃牌堆。然后你摸两张牌。",
};
export default translates;

View File

@ -1,4 +1,9 @@
export default {
"#xunde1": "陛下所托,臣必尽心尽力!",
"#xunde2": "纵吾荏弱难持,亦不推诿君命!",
"#chenjie1": "臣心怀二心,不可事君也。",
"#chenjie2": "竭力致身,以尽臣节。",
"#simafu:die": "身辅六公,亦难报此恩……",
"#twduwang1": "阿瞒聚众来犯,吾一人可挡万敌!",
"#twduwang2": "勇绝河北,吾足以一柱擎天!",
"#twylyanshi1": "今破曹军,明日当直取许都!",