commit
7ab3d9bf77
|
@ -466,8 +466,8 @@ const translates = {
|
|||
dc_lingcao_prefix: "新杀",
|
||||
dcdufeng: "独锋",
|
||||
dcdufeng_info: "锁定技。出牌阶段开始时,你失去1点体力或废除一个装备栏,摸X张牌,然后你的攻击范围与使用【杀】的次数上限均为X直到回合结束(X为你已废除的装备栏数与损失的体力值之和,至多为你的体力上限)。",
|
||||
dc_sp_menghuo: "群孟获",
|
||||
dc_sp_menghuo_prefix: "群",
|
||||
dc_sp_menghuo: "新杀SP孟获",
|
||||
dc_sp_menghuo_prefix: "新杀SP",
|
||||
dcmanwang: "蛮王",
|
||||
dcmanwang_info: "出牌阶段,你可以弃置任意张牌。然后你依次执行以下选项中的前X项:⒈获得〖叛侵〗。⒉摸一张牌。⒊回复1点体力。⒋摸两张牌并失去〖叛侵〗。",
|
||||
dcpanqin: "叛侵",
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
const characterSort = {
|
||||
sp_tianji: ["sunhao", "liuxie", "caoang", "hetaihou", "sunluyu", "ol_wangrong", "zuofen", "ol_bianfuren", "qinghegongzhu", "tengfanglan", "ruiji", "caoxiancaohua", "caoyu"],
|
||||
sp_sibi: ["ol_lukai", "yangxiu", "guotu", "chenlin", "chengyu", "shixie", "fuwan", "wangyun", "zhugejin", "simalang", "maliang", "buzhi", "dongyun", "kanze", "sunqian", "xizhicai", "sunshao", "duxi", "jianggan", "ol_dengzhi", "ol_yangyi", "ol_dongzhao", "ol_chendeng", "jin_yanghu", "wangyan", "xiahouxuan", "quhuang", "zhanghua", "wangguan", "sunhong", "caoxi", "tianchou"],
|
||||
sp_tianzhu: ["yadan", "liyi", "zhangyan", "niujin", "hejin", "hansui", "wutugu", "yanbaihu", "shamoke", "zhugedan", "huangzu", "gaogan", "tadun", "fanjiangzhangda", "ahuinan", "dongtuna", "ol_wenqin"],
|
||||
sp_tianzhu: ["ol_liupi", "yadan", "liyi", "zhangyan", "niujin", "hejin", "hansui", "wutugu", "yanbaihu", "shamoke", "zhugedan", "huangzu", "gaogan", "tadun", "fanjiangzhangda", "ahuinan", "dongtuna", "ol_wenqin"],
|
||||
sp_nvshi: ["ol_dingshangwan", "lingju", "guanyinping", "zhangxingcai", "mayunlu", "dongbai", "zhaoxiang", "ol_zhangchangpu", "daxiaoqiao", "jin_guohuai", "ol_hujinding"],
|
||||
sp_shaowei: ["simahui", "zhangbao", "zhanglu", "zhugeguo", "xujing", "zhangling", "huangchengyan", "zhangzhi", "lushi"],
|
||||
sp_huben: ["duanjiong", "ol_mengda", "caohong", "xiahouba", "zhugeke", "zumao", "wenpin", "litong", "mazhong", "heqi", "quyi", "luzhi", "yuejin", "dingfeng", "wuyan", "ol_zhuling", "tianyu", "huojun", "zhaoyǎn", "dengzhong", "ol_furong", "macheng", "ol_zhangyì", "ol_zhujun", "maxiumatie", "luoxian", "ol_huban", "haopu", "ol_qianzhao"],
|
||||
sp_shaowei: ["ol_pengyang", "simahui", "zhangbao", "zhanglu", "zhugeguo", "xujing", "zhangling", "huangchengyan", "zhangzhi", "lushi"],
|
||||
sp_huben: ["duanjiong", "liupan", "ol_mengda", "caohong", "xiahouba", "zhugeke", "zumao", "wenpin", "litong", "mazhong", "heqi", "quyi", "luzhi", "yuejin", "dingfeng", "wuyan", "ol_zhuling", "tianyu", "huojun", "zhaoyǎn", "dengzhong", "ol_furong", "macheng", "ol_zhangyì", "ol_zhujun", "maxiumatie", "luoxian", "ol_huban", "haopu", "ol_qianzhao"],
|
||||
sp_liesi: ["lvboshe", "mizhu", "weizi", "ol_liuba", "zhangshiping"],
|
||||
sp_default: ["sp_diaochan", "sp_zhaoyun", "sp_sunshangxiang", "sp_caoren", "sp_jiangwei", "sp_machao", "sp_caiwenji", "jsp_guanyu", "jsp_huangyueying", "sp_pangde", "sp_jiaxu", "yuanshu", "sp_zhangliao", "sp_ol_zhanghe", "sp_menghuo", "sp_sunce"],
|
||||
sp_qifu: ["ol_feiyi", "caoying", "panshu", "caochun", "yuantanyuanshang", "caoshuang", "wolongfengchu", "guansuo", "baosanniang", "fengfangnv", "jin_zhouchu"],
|
||||
|
@ -12,7 +12,7 @@ const characterSort = {
|
|||
sp_zhongdan: ["cuiyan", "huangfusong"],
|
||||
sp_guozhan2: ["sp_dongzhuo", "liqueguosi", "zhangren"],
|
||||
sp_others: ["hanba", "caiyang"],
|
||||
sp_waitforsort: ["ol_luyusheng", "ol_pengyang", "ol_tw_zhangji", "ol_liwan", "ol_liuyan", "liupan", "ol_liupi"],
|
||||
sp_waitforsort: ["ol_luyusheng", "ol_tw_zhangji", "ol_liwan", "ol_liuyan"],
|
||||
};
|
||||
|
||||
const characterSortTranslate = {
|
||||
|
|
|
@ -914,10 +914,15 @@ const skills = {
|
|||
multitarget: true,
|
||||
multiline: true,
|
||||
async content(event, trigger, player) {
|
||||
const targets = event.targets.slice();
|
||||
if (targets.length == 1) {
|
||||
await player.discardPlayerCard("e", targets[0], true);
|
||||
return;
|
||||
}
|
||||
let discardedType = [];
|
||||
for (let i = 0; i < 2; i++) {
|
||||
const target = event.targets[i],
|
||||
other = event.targets[1 - i];
|
||||
const target = targets[i],
|
||||
other = targets[1 - i];
|
||||
let cards = target
|
||||
.getDiscardableCards(player, "e")
|
||||
.filter(card => parseInt(get.subtype(card).slice("equip".length)) <= 2)
|
||||
|
|
|
@ -14521,7 +14521,7 @@ const skills = {
|
|||
break;
|
||||
default:
|
||||
player.logSkill("twlingfa");
|
||||
player.addSkills(["twzhian"], ["twlingfa"]);
|
||||
player.changeSkills(["twzhian"], ["twlingfa"]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2788,10 +2788,14 @@ export class Game {
|
|||
},
|
||||
addSubPlayer: function (player, content) {
|
||||
if (player && content && content[0] && content[1] && content[2] && content[3] && content[4]) {
|
||||
var skill = content[0];
|
||||
var skill = content[0],
|
||||
list = content[3];
|
||||
lib.skill[skill] = content[1];
|
||||
lib.character[skill] = content[2];
|
||||
lib.translate[skill] = content[3];
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (!list[i]) continue;
|
||||
lib.translate[skill + ["", "_prefix", "_ab"][i]] = list[i];
|
||||
}
|
||||
player.storage[skill] = content[4];
|
||||
}
|
||||
},
|
||||
|
|
|
@ -2088,13 +2088,19 @@ export const Content = {
|
|||
}
|
||||
player.storage[current].hp = player.hp;
|
||||
player.storage[current].maxHp = player.maxHp;
|
||||
player.storage[current].hujia = player.hujia;
|
||||
player.storage[current].hs = player.getCards("h");
|
||||
player.storage[current].es = player.getCards("e");
|
||||
player.lose(player.getCards("he"), ui.special)._triggered = null;
|
||||
|
||||
var cfg = player.storage[event.directresult];
|
||||
player.storage.subplayer.name2 = event.directresult;
|
||||
player.reinit(current, event.directresult, [cfg.hp, cfg.maxHp]);
|
||||
player.reinit(current, event.directresult, [cfg.hp, cfg.maxHp, cfg.hujia]);
|
||||
if (player.name == event.directresult || player.name1 == event.directresult) {
|
||||
const groupx = cfg.group || "qun";
|
||||
player.group = groupx;
|
||||
player.node.name.dataset.nature = get.groupnature(groupx);
|
||||
}
|
||||
if (cfg.hs.length) player.directgain(cfg.hs);
|
||||
if (cfg.es.length) player.directequip(cfg.es);
|
||||
}
|
||||
|
@ -2103,11 +2109,13 @@ export const Content = {
|
|||
"step 0";
|
||||
if (player.storage.subplayer) {
|
||||
var current = player.storage.subplayer.name2;
|
||||
const goon = player.name == current || player.name1 == current;
|
||||
if (event.remove) {
|
||||
player.lose(player.getCards("he"), ui.discardPile)._triggered = null;
|
||||
} else {
|
||||
player.storage[current].hp = player.hp;
|
||||
player.storage[current].maxHp = player.maxHp;
|
||||
player.storage[current].hujia = player.hujia;
|
||||
player.storage[current].hs = player.getCards("h");
|
||||
player.storage[current].es = player.getCards("e");
|
||||
player.lose(player.getCards("he"), ui.special)._triggered = null;
|
||||
|
@ -2115,11 +2123,17 @@ export const Content = {
|
|||
player.reinit(current, player.storage.subplayer.name, [
|
||||
player.storage.subplayer.hp,
|
||||
player.storage.subplayer.maxHp,
|
||||
player.storage.subplayer.hujia,
|
||||
]);
|
||||
if (goon) {
|
||||
const groupx = player.storage.subplayer.group || "qun";
|
||||
player.group = groupx;
|
||||
player.node.name.dataset.nature = get.groupnature(groupx);
|
||||
}
|
||||
player.update();
|
||||
if (event.remove) {
|
||||
if (player.storage[current].onremove) {
|
||||
player.storage[current].onremove(player);
|
||||
player.storage[current].onremove(player, current);
|
||||
}
|
||||
delete player.storage[current];
|
||||
player.storage.subplayer.skills.remove(current);
|
||||
|
@ -2178,13 +2192,20 @@ export const Content = {
|
|||
name2: event.directresult,
|
||||
hp: player.hp,
|
||||
maxHp: player.maxHp,
|
||||
hujia: player.hujia,
|
||||
skills: event.list.slice(0),
|
||||
hs: player.getCards("h"),
|
||||
es: player.getCards("e"),
|
||||
intro2: cfg.intro2,
|
||||
group: player.group,
|
||||
};
|
||||
player.removeSkill(event.list);
|
||||
player.reinit(source, name, [cfg.hp, cfg.maxHp]);
|
||||
player.reinit(source, name, [cfg.hp, cfg.maxHp, cfg.hujia]);
|
||||
if (player.name == name || player.name1 == name) {
|
||||
const groupx = cfg.group || "qun";
|
||||
player.group = groupx;
|
||||
player.node.name.dataset.nature = get.groupnature(groupx);
|
||||
}
|
||||
player.addSkill("subplayer");
|
||||
player.lose(player.getCards("he"), ui.special)._triggered = null;
|
||||
if (cfg.hs.length) player.directgain(cfg.hs);
|
||||
|
|
|
@ -2716,6 +2716,9 @@ export class Player extends HTMLDivElement {
|
|||
if (Array.isArray(maxHp)) {
|
||||
this.maxHp = maxHp[1];
|
||||
this.hp = maxHp[0];
|
||||
if (typeof maxHp[2] == "number") {
|
||||
this.hujia = maxHp[2];
|
||||
}
|
||||
} else {
|
||||
var num;
|
||||
if (maxHp === false) {
|
||||
|
@ -7301,6 +7304,7 @@ export class Player extends HTMLDivElement {
|
|||
cfg.skills = cfg.skills || [];
|
||||
cfg.hp = cfg.hp || 1;
|
||||
cfg.maxHp = cfg.maxHp || 1;
|
||||
cfg.hujia = cfg.hujia || 0;
|
||||
cfg.sex = cfg.sex || "male";
|
||||
cfg.group = cfg.group || "qun";
|
||||
cfg.skill = cfg.skill || _status.event.name;
|
||||
|
@ -7311,9 +7315,10 @@ export class Player extends HTMLDivElement {
|
|||
cfg.source = this.name;
|
||||
}
|
||||
}
|
||||
const list = cfg.caption ? [cfg.caption] : ["", "_prefix", "_ab"].map(str => lib.translate[cfg.name + str]);
|
||||
game.broadcastAll(
|
||||
//TODO: 这里直接修改trashBin部分,后续需要修改为新写法
|
||||
function (player, skill, cfg) {
|
||||
function (player, skill, list, cfg) {
|
||||
lib.skill[skill] = {
|
||||
intro: {
|
||||
content: cfg.intro || "",
|
||||
|
@ -7324,7 +7329,7 @@ export class Player extends HTMLDivElement {
|
|||
subplayer: true,
|
||||
},
|
||||
};
|
||||
lib.character[skill] = [cfg.sex, cfg.group, cfg.maxHp, cfg.skills, []];
|
||||
lib.character[skill] = [cfg.sex, cfg.group, parseFloat(cfg.hp) + "/" + parseFloat(cfg.maxHp) + "/" + parseFloat(cfg.hujia), cfg.skills, lib.character[cfg.name].trashBin || []];
|
||||
if (Array.isArray(cfg.image)) {
|
||||
cfg.image.forEach(image => lib.character[skill][4].push(image));
|
||||
} else if (typeof cfg.image == "string") {
|
||||
|
@ -7332,14 +7337,18 @@ export class Player extends HTMLDivElement {
|
|||
} else {
|
||||
lib.character[skill].trashBin.push("character:" + cfg.name);
|
||||
}
|
||||
lib.translate[skill] = cfg.caption || get.rawName(cfg.name);
|
||||
for (let i = 0; i < list.length; i++) {
|
||||
if (!list[i]) continue;
|
||||
lib.translate[skill + ["", "_prefix", "_ab"][i]] = list[i];
|
||||
}
|
||||
player.storage[skill] = cfg;
|
||||
},
|
||||
this,
|
||||
skill,
|
||||
list,
|
||||
cfg
|
||||
);
|
||||
game.addVideo("addSubPlayer", this, [skill, lib.skill[skill], lib.character[skill], lib.translate[skill], { name: cfg.name }]);
|
||||
game.addVideo("addSubPlayer", this, [skill, lib.skill[skill], lib.character[skill], list, { name: cfg.name }]);
|
||||
this.addSkill(skill);
|
||||
return skill;
|
||||
}
|
||||
|
@ -7348,7 +7357,7 @@ export class Player extends HTMLDivElement {
|
|||
this.exitSubPlayer(true);
|
||||
} else {
|
||||
if (player.storage[name].onremove) {
|
||||
player.storage[name].onremove(player);
|
||||
player.storage[name].onremove(player, name);
|
||||
}
|
||||
this.removeSkill(name);
|
||||
delete this.storage[name];
|
||||
|
|
Loading…
Reference in New Issue