This commit is contained in:
parent
fb3efa80dd
commit
86a175d260
|
@ -77,7 +77,6 @@ window.config={
|
||||||
hiddenCardPack:[],
|
hiddenCardPack:[],
|
||||||
hiddenPlayPack:[],
|
hiddenPlayPack:[],
|
||||||
favouriteCharacter:[],
|
favouriteCharacter:[],
|
||||||
recentCharacter:[],
|
|
||||||
recentIP:[],
|
recentIP:[],
|
||||||
alteredSkills:[],
|
alteredSkills:[],
|
||||||
|
|
||||||
|
|
25
game/game.js
25
game/game.js
|
@ -50,7 +50,8 @@
|
||||||
return lib.config.favouriteCharacter.contains(name)?capt:null;
|
return lib.config.favouriteCharacter.contains(name)?capt:null;
|
||||||
},
|
},
|
||||||
'最近':function(name,capt){
|
'最近':function(name,capt){
|
||||||
return lib.config.recentCharacter.contains(name)?capt:null;
|
var list=get.config('recentCharacter')||[];
|
||||||
|
return list.contains(name)?capt:null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onDB:function(func){
|
onDB:function(func){
|
||||||
|
@ -2798,6 +2799,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onlyguozhanexpand:{
|
||||||
|
name:'默认展开自由选将',
|
||||||
|
init:false,
|
||||||
|
restart:true,
|
||||||
|
intro:'开启后自由选将对话框将默认显示全部武将'
|
||||||
|
},
|
||||||
change_identity:{
|
change_identity:{
|
||||||
name:'自由选择座位',
|
name:'自由选择座位',
|
||||||
init:true,
|
init:true,
|
||||||
|
@ -20375,17 +20382,18 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addRecentCharacter:function(){
|
addRecentCharacter:function(){
|
||||||
|
var list=get.config('recentCharacter')||[];
|
||||||
for(var i=0;i<arguments.length;i++){
|
for(var i=0;i<arguments.length;i++){
|
||||||
if(lib.character[arguments[i]]){
|
if(lib.character[arguments[i]]){
|
||||||
lib.config.recentCharacter.remove(arguments[i]);
|
list.remove(arguments[i]);
|
||||||
lib.config.recentCharacter.unshift(arguments[i]);
|
list.unshift(arguments[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var num=parseInt(lib.config.recent_character_number);
|
var num=parseInt(lib.config.recent_character_number);
|
||||||
if(lib.config.recentCharacter.length>num){
|
if(list.length>num){
|
||||||
lib.config.recentCharacter.splice(num);
|
list.splice(num);
|
||||||
}
|
}
|
||||||
game.saveConfig('recentCharacter',lib.config.recentCharacter);
|
game.saveConfig('recentCharacter',list,true);
|
||||||
},
|
},
|
||||||
createCard:function(name,suit,number,nature){
|
createCard:function(name,suit,number,nature){
|
||||||
if(typeof name=='object'){
|
if(typeof name=='object'){
|
||||||
|
@ -30015,7 +30023,7 @@
|
||||||
var translate;
|
var translate;
|
||||||
var pack=null;
|
var pack=null;
|
||||||
if(packname=='最近'){
|
if(packname=='最近'){
|
||||||
pack=lib.config.recentCharacter;
|
pack=get.config('recentCharacter')||[];
|
||||||
}
|
}
|
||||||
else if(packname=='收藏'){
|
else if(packname=='收藏'){
|
||||||
pack=lib.config.favouriteCharacter;
|
pack=lib.config.favouriteCharacter;
|
||||||
|
@ -30027,7 +30035,8 @@
|
||||||
dialog.add([list,'character']);
|
dialog.add([list,'character']);
|
||||||
var bool=true;
|
var bool=true;
|
||||||
var node;
|
var node;
|
||||||
if(lib.config.recentCharacter.length){
|
var recent=get.config('recentCharacter');
|
||||||
|
if(recent&&recent.length){
|
||||||
node=createNode('最近');
|
node=createNode('最近');
|
||||||
if(lib.config.character_dialog_tool=='最近'){
|
if(lib.config.character_dialog_tool=='最近'){
|
||||||
clickCapt.call(node);
|
clickCapt.call(node);
|
||||||
|
|
|
@ -206,7 +206,7 @@ mode.boss={
|
||||||
game.saveConfig('continue_name_boss');
|
game.saveConfig('continue_name_boss');
|
||||||
}
|
}
|
||||||
for(var i=0;i<result.links.length;i++){
|
for(var i=0;i<result.links.length;i++){
|
||||||
var player=ui.create.player(ui.arena);
|
var player=ui.create.player();
|
||||||
player.getId();
|
player.getId();
|
||||||
player.init(result.links[i]).animate('start');
|
player.init(result.links[i]).animate('start');
|
||||||
player.setIdentity('cai');
|
player.setIdentity('cai');
|
||||||
|
@ -219,6 +219,7 @@ mode.boss={
|
||||||
else{
|
else{
|
||||||
player.dataset.position=i+1;
|
player.dataset.position=i+1;
|
||||||
}
|
}
|
||||||
|
ui.arena.appendChild(player);
|
||||||
}
|
}
|
||||||
if(result.boss){
|
if(result.boss){
|
||||||
game.players.unshift(boss);
|
game.players.unshift(boss);
|
||||||
|
|
|
@ -1769,7 +1769,7 @@ mode.guozhan={
|
||||||
event.dialogxx=ui.create.characterDialog(function(i){
|
event.dialogxx=ui.create.characterDialog(function(i){
|
||||||
if(i.indexOf('gz_shibing')==0) return true;
|
if(i.indexOf('gz_shibing')==0) return true;
|
||||||
if(!lib.characterPack.mode_guozhan[i]) return true;
|
if(!lib.characterPack.mode_guozhan[i]) return true;
|
||||||
},'expandall');
|
},get.config('onlyguozhanexpand')?'expandall':undefined);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
event.dialogxx=ui.create.characterDialog();
|
event.dialogxx=ui.create.characterDialog();
|
||||||
|
|
|
@ -1125,6 +1125,7 @@ mode.versus={
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
"step 1"
|
"step 1"
|
||||||
|
game.addRecentCharacter.apply(this,result.friend);
|
||||||
event.friendlist=result.friend;
|
event.friendlist=result.friend;
|
||||||
event.enemylist=result.enemy;
|
event.enemylist=result.enemy;
|
||||||
"step 2"
|
"step 2"
|
||||||
|
|
Loading…
Reference in New Issue