fix
This commit is contained in:
parent
2aabbff7b5
commit
53174e7948
|
@ -1031,6 +1031,12 @@ character.refresh={
|
|||
audio:2,
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
filter:function(event,player){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].sex=='male') return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
player.chooseControl(['red','black','basic','trick','equip']).ai=function(){
|
||||
|
|
|
@ -37,6 +37,18 @@ character.yxs={
|
|||
yxs_luzhishen:['male','qun',4,['dili','kuangchan']],
|
||||
},
|
||||
skill:{
|
||||
zhijie:{
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
viewAsFilter:function(player){
|
||||
return player.num('h',{suit:'heart'})>0;
|
||||
},
|
||||
viewAs:{name:'wuzhong'},
|
||||
filterCard:{suit:'heart'},
|
||||
check:function(card){
|
||||
return 8-ai.get.value(card);
|
||||
}
|
||||
},
|
||||
dili:{
|
||||
trigger:{player:'phaseDrawBegin'},
|
||||
forced:true,
|
||||
|
|
77
game/game.js
77
game/game.js
|
@ -1574,22 +1574,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
// swap:{
|
||||
// name:'死亡后显示换人',
|
||||
// init:true,
|
||||
// onclick:function(bool){
|
||||
// game.saveConfig('swap',bool,this._link.config.mode);
|
||||
// if(get.config('swap')){
|
||||
// if(!ui.swap&&game.me.isDead()){
|
||||
// ui.swap=ui.create.control('换人',ui.click.dieswap);
|
||||
// }
|
||||
// }
|
||||
// else if(ui.swap){
|
||||
// ui.swap.close();
|
||||
// delete ui.swap;
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
continue_game:{
|
||||
name:'显示继续游戏',
|
||||
init:false,
|
||||
onclick:function(bool){
|
||||
game.saveConfig('continue_game',bool,this._link.config.mode);
|
||||
if(get.config('continue_game')){
|
||||
if(!ui.continue_game&&_status.over){
|
||||
ui.continue_game=ui.create.control('继续',game.reloadCurrent);
|
||||
}
|
||||
}
|
||||
else if(ui.continue_game){
|
||||
ui.continue_game.close();
|
||||
delete ui.continue_game;
|
||||
}
|
||||
}
|
||||
},
|
||||
revive:{
|
||||
name:'死亡后显示复活',
|
||||
init:false,
|
||||
|
@ -1804,22 +1804,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
// swap:{
|
||||
// name:'死亡后显示换人',
|
||||
// init:true,
|
||||
// onclick:function(bool){
|
||||
// game.saveConfig('swap',bool,this._link.config.mode);
|
||||
// if(get.config('swap')){
|
||||
// if(!ui.swap&&game.me.isDead()){
|
||||
// ui.swap=ui.create.control('换人',ui.click.dieswap);
|
||||
// }
|
||||
// }
|
||||
// else if(ui.swap){
|
||||
// ui.swap.close();
|
||||
// delete ui.swap;
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
continue_game:{
|
||||
name:'显示继续游戏',
|
||||
init:false,
|
||||
onclick:function(bool){
|
||||
game.saveConfig('continue_game',bool,this._link.config.mode);
|
||||
if(get.config('continue_game')){
|
||||
if(!ui.continue_game&&_status.over){
|
||||
ui.continue_game=ui.create.control('继续',game.reloadCurrent);
|
||||
}
|
||||
}
|
||||
else if(ui.continue_game){
|
||||
ui.continue_game.close();
|
||||
delete ui.continue_game;
|
||||
}
|
||||
}
|
||||
},
|
||||
revive:{
|
||||
name:'死亡后显示复活',
|
||||
init:false,
|
||||
|
@ -2628,7 +2628,7 @@
|
|||
}
|
||||
delete lib.help2;
|
||||
|
||||
if(localStorage.getItem(lib.configprefix+'playbackmode')){
|
||||
if(localStorage.getItem(lib.configprefix+'playback')){
|
||||
lib.init.js('mode',lib.config.mode);
|
||||
}
|
||||
else if((localStorage.getItem(lib.configprefix+'directstart')||!lib.config.show_splash)
|
||||
|
@ -10390,6 +10390,11 @@
|
|||
}
|
||||
window.location.reload();
|
||||
},
|
||||
reloadCurrent:function(){
|
||||
game.saveConfig('continue_name',[game.me.name1||game.me.name,game.me.name2]);
|
||||
localStorage.setItem(lib.configprefix+'directstart',true);
|
||||
game.reload();
|
||||
},
|
||||
update:function(func){
|
||||
lib.updates.push(func);
|
||||
if(lib.updates.length===1){
|
||||
|
@ -11164,9 +11169,9 @@
|
|||
if(game.controlOver){
|
||||
game.controlOver();return;
|
||||
}
|
||||
// if(!ui.savevideo&&lib.db&&lib.config.savevideo){
|
||||
// ui.savevideo=ui.create.control('保存录像',game.saveVideo);
|
||||
// }
|
||||
if(get.config('continue_game')){
|
||||
ui.continue_game=ui.create.control('继续',game.reloadCurrent);
|
||||
}
|
||||
if(!ui.restart){
|
||||
ui.restart=ui.create.control('restart',game.reload);
|
||||
}
|
||||
|
|
|
@ -274,9 +274,14 @@ mode.guozhan={
|
|||
event.addSetting=addSetting;
|
||||
event.removeSetting=removeSetting;
|
||||
|
||||
var chosen=lib.config.continue_name||[];
|
||||
game.saveConfig('continue_name');
|
||||
event.chosen=chosen;
|
||||
|
||||
var i;
|
||||
event.list=[];
|
||||
for(i in lib.character){
|
||||
if(chosen.contains(i)) continue;
|
||||
if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) continue;
|
||||
if(lib.config.forbidai.contains(i)) continue;
|
||||
if(lib.config.forbidall.contains(i)) continue;
|
||||
|
@ -291,8 +296,11 @@ mode.guozhan={
|
|||
if(_status.auto){
|
||||
event.ai(game.me,list);
|
||||
}
|
||||
else if(chosen.length){
|
||||
game.me.init(chosen[0],chosen[1],false);
|
||||
}
|
||||
else{
|
||||
var dialog=ui.create.dialog('选择角色',[list,'character']);
|
||||
var dialog=ui.create.dialog('选择角色','hidden',[list,'character']);
|
||||
if(get.config('change_identity')){
|
||||
addSetting(dialog);
|
||||
}
|
||||
|
@ -419,6 +427,11 @@ mode.guozhan={
|
|||
for(var j=0;j<hiddenSkills2.length;j++){
|
||||
game.players[i].hiddenSkills.add(hiddenSkills2[j]);
|
||||
}
|
||||
for(var j=0;j<game.players[i].hiddenSkills.length;j++){
|
||||
if(!lib.skill[game.players[i].hiddenSkills[j]]){
|
||||
game.players[i].hiddenSkills.splice(j--,1);
|
||||
}
|
||||
}
|
||||
game.players[i].group='unknown';
|
||||
game.players[i].sex='unknown';
|
||||
game.players[i].name1=game.players[i].name;
|
||||
|
|
|
@ -418,6 +418,9 @@ mode.identity={
|
|||
var list2=[];
|
||||
var list3=[];
|
||||
var identityList;
|
||||
var chosen=lib.config.continue_name||[];
|
||||
game.saveConfig('continue_name');
|
||||
event.chosen=chosen;
|
||||
if(_status.mode=='zhong'){
|
||||
event.zhongmode=true;
|
||||
identityList=['zhu','zhong','mingzhong','nei','fan','fan','fan','fan'];
|
||||
|
@ -569,6 +572,7 @@ mode.identity={
|
|||
game.zhu.isZhu=(game.zhu.identity=='zhu');
|
||||
game.me.setIdentity();
|
||||
for(i in lib.character){
|
||||
if(chosen.contains(i)) continue;
|
||||
if(lib.character[i][4]&&lib.character[i][4].contains('forbidai')) continue;
|
||||
if(lib.config.forbidai.contains(i)) continue;
|
||||
if(lib.config.forbidall.contains(i)) continue;
|
||||
|
@ -605,13 +609,15 @@ mode.identity={
|
|||
list=list2.concat(list3.slice(0,num));
|
||||
}
|
||||
}
|
||||
var dialog=ui.create.dialog('选择角色',[list,'character']);
|
||||
var dialog=ui.create.dialog('选择角色','hidden',[list,'character']);
|
||||
if(get.config('change_identity')){
|
||||
addSetting(dialog);
|
||||
}
|
||||
game.me.chooseButton(dialog,true).selectButton=function(){
|
||||
return get.config('double_character')?2:1
|
||||
};
|
||||
if(!event.chosen.length){
|
||||
game.me.chooseButton(dialog,true).selectButton=function(){
|
||||
return get.config('double_character')?2:1
|
||||
};
|
||||
}
|
||||
ui.create.cheat=function(){
|
||||
_status.createControl=ui.cheat2;
|
||||
ui.cheat=ui.create.control('更换',function(){
|
||||
|
@ -696,7 +702,10 @@ mode.identity={
|
|||
ui.cheat2x.close();
|
||||
delete ui.cheat2x;
|
||||
}
|
||||
if(result.buttons.length==2){
|
||||
if(event.chosen.length){
|
||||
game.me.init(event.chosen[0],event.chosen[1]);
|
||||
}
|
||||
else if(result.buttons.length==2){
|
||||
game.me.init(result.buttons[0].link,result.buttons[1].link)
|
||||
}
|
||||
else{
|
||||
|
|
Loading…
Reference in New Issue