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