国战模式添加lib.yingbian_guozhan,用以给应变模式单独添加/覆盖武将

This commit is contained in:
mengxinzxz 2024-04-05 00:11:52 +08:00
parent 6089e922aa
commit b66a32b915
1 changed files with 16 additions and 1 deletions

View File

@ -88,6 +88,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
case 'yingbian':
lib.card.list=lib.guozhanPile_yingbian.slice(0);
delete lib.translate.shuiyanqijunx_info_guozhan;
const pack=lib.yingbian_guozhan;
for(const i in pack){
if(!pack[i][4]) pack[i][4]=[];
lib.character[i]=pack[i];
lib.characterPack.mode_guozhan[i]=pack[i];
if(!lib.translate[i]) lib.translate[i]=lib.translate[i.slice(3)];
}
break;
case 'normal':lib.card.list=lib.guozhanPile.slice(0);break;
}
@ -124,14 +131,19 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.broadcastAll((mode,separatism)=>{
_status.mode=mode;
if(separatism) _status.separatism=true;
var pack=lib.characterPack.mode_guozhan;
if(mode=='yingbian'){
delete lib.translate.shuiyanqijunx_info_guozhan;
const pack2=lib.yingbian_guozhan;
for(const i in pack2){
if(!pack2[i][4]) pack2[i][4]=[];
pack[i]=pack2[i];
}
}
for(var i=0;i<game.players.length;i++){
game.players[i].node.name.hide();
game.players[i].node.name2.hide();
}
var pack=lib.characterPack.mode_guozhan;
for(var i in pack){
lib.character[i]=pack[i];
if(!lib.character[i][4]){
@ -371,6 +383,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
'gz_sufei','gz_yanyan',
],
},
yingbian_guozhan:{
gz_sp_duyu:['male','qun',4,['fakezhufu']],
},
characterSort:{
mode_guozhan:{
guozhan_default:["gz_caocao","gz_simayi","gz_xiahoudun","gz_zhangliao","gz_xuzhu","gz_guojia","gz_zhenji","gz_xiahouyuan","gz_zhanghe","gz_xuhuang","gz_caoren","gz_dianwei","gz_xunyu","gz_caopi","gz_yuejin","gz_liubei","gz_guanyu","gz_zhangfei","gz_zhugeliang","gz_zhaoyun","gz_machao","gz_huangyueying","gz_huangzhong","gz_weiyan","gz_pangtong","gz_sp_zhugeliang","gz_liushan","gz_menghuo","gz_zhurong","gz_ganfuren","gz_sunquan","gz_ganning","gz_lvmeng","gz_huanggai","gz_zhouyu","gz_daqiao","gz_luxun","gz_sunshangxiang","gz_sunjian","gz_xiaoqiao","gz_re_taishici","gz_zhoutai","gz_re_lusu","gz_zhangzhang","gz_dingfeng","gz_huatuo","gz_lvbu","gz_diaochan","gz_re_yuanshao","gz_yanwen","gz_jiaxu","gz_pangde","gz_zhangjiao","gz_caiwenji","gz_mateng","gz_kongrong","gz_jiling","gz_tianfeng","gz_panfeng","gz_zoushi",],