v1.9.96.2
This commit is contained in:
parent
87526aacba
commit
c6e5d4b386
|
@ -619,23 +619,23 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
player.init(lib.config.test_game);
|
||||
}
|
||||
if(get.config('choose_group')&&player.group=='shen'){
|
||||
var list=lib.group.slice(0);
|
||||
list.remove('shen');
|
||||
if(list.length) player.group=function(){
|
||||
if(_status.mode!='zhong'&&game.zhu&&game.zhu.group){
|
||||
if(['re_zhangjiao','liubei','re_liubei','caocao','re_caocao','sunquan','re_sunquan','zhangjiao','sp_zhangjiao','caopi','re_caopi','liuchen','caorui','sunliang','sunxiu'].contains(game.zhu.name)) return game.zhu.group;
|
||||
if(game.zhu.name=='sunhao'&&player.identity=='zhong') return 'wu';
|
||||
if(game.zhu.name=='yl_yuanshu'){
|
||||
if(player.identity=='zhong') list.remove('qun');
|
||||
else return 'qun';
|
||||
}
|
||||
if(['sunhao','xin_yuanshao','re_yuanshao'].contains(game.zhu.name)){
|
||||
if(player.identity!='zhong') list.remove(game.zhu.group);
|
||||
else return game.zhu.group;
|
||||
}
|
||||
}
|
||||
return list.randomGet();
|
||||
}();
|
||||
var list=lib.group.slice(0);
|
||||
list.remove('shen');
|
||||
if(list.length) player.group=function(){
|
||||
if(_status.mode!='zhong'&&game.zhu&&game.zhu.group){
|
||||
if(['re_zhangjiao','liubei','re_liubei','caocao','re_caocao','sunquan','re_sunquan','zhangjiao','sp_zhangjiao','caopi','re_caopi','liuchen','caorui','sunliang','sunxiu'].contains(game.zhu.name)) return game.zhu.group;
|
||||
if(game.zhu.name=='sunhao'&&player.identity=='zhong') return 'wu';
|
||||
if(game.zhu.name=='yl_yuanshu'){
|
||||
if(player.identity=='zhong') list.remove('qun');
|
||||
else return 'qun';
|
||||
}
|
||||
if(['sunhao','xin_yuanshao','re_yuanshao'].contains(game.zhu.name)){
|
||||
if(player.identity!='zhong') list.remove(game.zhu.group);
|
||||
else return game.zhu.group;
|
||||
}
|
||||
}
|
||||
return list.randomGet();
|
||||
}();
|
||||
}
|
||||
player.node.name.dataset.nature=get.groupnature(player.group);
|
||||
}
|
||||
|
@ -956,6 +956,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
event.list.randomSort();
|
||||
_status.characterlist=event.list.slice(0);
|
||||
list3.randomSort();
|
||||
if(_status.brawl&&_status.brawl.chooseCharacterFilter){
|
||||
_status.brawl.chooseCharacterFilter(event.list,list2,list3);
|
||||
|
@ -1167,7 +1168,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var chooseGroup=false;
|
||||
if(event.chosen.length){
|
||||
if(lib.character[event.chosen[0]][1]=='shen'){
|
||||
chooseGroup=true;
|
||||
chooseGroup=true;
|
||||
}
|
||||
}
|
||||
else if(event.modchosen){
|
||||
|
@ -1178,20 +1179,20 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
event.choosed=[result.buttons[0].link,result.buttons[1].link];
|
||||
game.addRecentCharacter(result.buttons[0].link,result.buttons[1].link);
|
||||
if(lib.character[event.choosed[0]][1]=='shen'){
|
||||
chooseGroup=true;
|
||||
chooseGroup=true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
event.choosed=[result.buttons[0].link];
|
||||
if(lib.character[event.choosed[0]][1]=='shen'){
|
||||
chooseGroup=true;
|
||||
chooseGroup=true;
|
||||
}
|
||||
game.addRecentCharacter(result.buttons[0].link);
|
||||
}
|
||||
if(get.config('choose_group')&&chooseGroup){
|
||||
var list=lib.group.slice(0);
|
||||
list.remove('shen');
|
||||
game.me.chooseControl(list).prompt='请选择神武将的势力';
|
||||
var list=lib.group.slice(0);
|
||||
list.remove('shen');
|
||||
game.me.chooseControl(list).prompt='请选择神武将的势力';
|
||||
}
|
||||
"step 2"
|
||||
event.group=result.control||false;
|
||||
|
@ -1222,9 +1223,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
"step 3"
|
||||
if(event.group){
|
||||
game.me.group=event.group;
|
||||
game.me.node.name.dataset.nature=get.groupnature(game.me.group);
|
||||
game.me.update();
|
||||
game.me.group=event.group;
|
||||
game.me.node.name.dataset.nature=get.groupnature(game.me.group);
|
||||
game.me.update();
|
||||
}
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
_status.characterlist.remove(game.players[i].name);
|
||||
_status.characterlist.remove(game.players[i].name2);
|
||||
}
|
||||
"step 4"
|
||||
setTimeout(function(){
|
||||
|
@ -1385,6 +1390,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
list3.push(i);
|
||||
}
|
||||
}
|
||||
_status.characterlist=event.list.slice(0);
|
||||
if(event.zhongmode){
|
||||
list=event.list.randomGets(8);
|
||||
}
|
||||
|
@ -1502,6 +1508,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
ui.arena.classList.remove('choose-character');
|
||||
},500);
|
||||
},result);
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
_status.characterlist.remove(game.players[i].name);
|
||||
_status.characterlist.remove(game.players[i].name2);
|
||||
}
|
||||
setTimeout(function(){
|
||||
ui.arena.classList.remove('choose-character');
|
||||
},500);
|
||||
|
|
|
@ -178,21 +178,21 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
game.broadcastAll(function(singleTranslate,characterSingle){
|
||||
_status.mode='normal';
|
||||
for(var j in singleTranslate) lib.translate[j]=singleTranslate[j];
|
||||
_status.characterList=[];
|
||||
_status.characterlist=[];
|
||||
for(var i in characterSingle){
|
||||
lib.character[i]=characterSingle[i];
|
||||
if(!lib.character[i][4]){
|
||||
lib.character[i][4]=[];
|
||||
}
|
||||
_status.characterList.push(i);
|
||||
_status.characterlist.push(i);
|
||||
}
|
||||
},lib.singleTranslate,lib.characterSingle);
|
||||
}
|
||||
else if(_status.mode=='changban'){
|
||||
_status.characterList=[];
|
||||
_status.characterlist=[];
|
||||
for(var i=0;i<lib.changbanCharacter.length;i++){
|
||||
var name=lib.changbanCharacter[i];
|
||||
if(lib.character[name]&&!lib.filter.characterDisabled(name)) _status.characterList.push(name);
|
||||
if(lib.character[name]&&!lib.filter.characterDisabled(name)) _status.characterlist.push(name);
|
||||
}
|
||||
game.broadcastAll(function(){
|
||||
_status.mode='changban';
|
||||
|
@ -340,9 +340,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
if(lib.filter.characterDisabled(i)) continue;
|
||||
list.push(i);
|
||||
}
|
||||
_status.characterList=list;
|
||||
_status.characterlist=list;
|
||||
var filter=function(name){
|
||||
return !_status.characterList.contains(name);
|
||||
return !_status.characterlist.contains(name);
|
||||
};
|
||||
var dialog=ui.create.characterDialog('heightset',filter,'expandall').open();
|
||||
dialog.videoId=event.videoId;
|
||||
|
@ -383,9 +383,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
"step 1"
|
||||
_status.characterChoice={
|
||||
zhu:_status.characterList.randomRemove(3),
|
||||
fan:_status.characterList.randomRemove(3),
|
||||
all:_status.characterList.randomRemove(6),
|
||||
zhu:_status.characterlist.randomRemove(3),
|
||||
fan:_status.characterlist.randomRemove(3),
|
||||
all:_status.characterlist.randomRemove(6),
|
||||
};
|
||||
event.videoIdx=lib.status.videoId++;
|
||||
game.broadcastAll(function(id,list){
|
||||
|
@ -564,9 +564,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
list.push(i);
|
||||
}
|
||||
game.broadcastAll(function(list,id){
|
||||
_status.characterList=list;
|
||||
_status.characterlist=list;
|
||||
var filter=function(name){
|
||||
return !_status.characterList.contains(name);
|
||||
return !_status.characterlist.contains(name);
|
||||
};
|
||||
var dialog=ui.create.characterDialog('heightset',filter,'expandall').open();
|
||||
dialog.videoId=id;
|
||||
|
@ -616,9 +616,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
"step 1"
|
||||
_status.characterChoice={
|
||||
zhu:_status.characterList.randomRemove(3),
|
||||
fan:_status.characterList.randomRemove(3),
|
||||
all:_status.characterList.randomRemove(6),
|
||||
zhu:_status.characterlist.randomRemove(3),
|
||||
fan:_status.characterlist.randomRemove(3),
|
||||
all:_status.characterlist.randomRemove(6),
|
||||
};
|
||||
event.videoIdx=lib.status.videoId++;
|
||||
game.broadcastAll(function(id,list){
|
||||
|
|
Loading…
Reference in New Issue