v1.9.97.2.1

This commit is contained in:
Spmario233 2020-01-18 13:35:52 +08:00 committed by GitHub
parent 63dcdd2c7d
commit 26194a298a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 22 deletions

View File

@ -441,6 +441,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
'xianfu','fenyong','xuehen','yingbin','midao','yishe','yinbing','juedi', 'xianfu','fenyong','xuehen','yingbin','midao','yishe','yinbing','juedi',
'bushi','xinfu_dianhua','xinfu_falu','xinfu_zhenyi','lskuizhu','pingjian','xjshijian','fentian','zhiri','xindan', 'bushi','xinfu_dianhua','xinfu_falu','xinfu_zhenyi','lskuizhu','pingjian','xjshijian','fentian','zhiri','xindan',
'xinzhengnan','xinfu_xiaode', 'xinzhengnan','xinfu_xiaode',
'komari_xueshang',
]; ];
var characters=[]; var characters=[];
for(var name in lib.character){ for(var name in lib.character){

View File

@ -456,7 +456,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var list=[ var list=[
'sha','tao','jiu', 'sha','tao','jiu',
'taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman', 'taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman',
'xietianzi','shuiyanqijunx','lulitongxin','lianjunshengyan','chiling','diaohulishan','yuanjiao','huoshaolianying' 'xietianzi','shuiyanqijunx','lulitongxin','lianjunshengyan','chiling','diaohulishan','yuanjiao','huoshaolianying','zhibi'
]; ];
var list2=[]; var list2=[];
for(var i=0;i<list.length;i++){ for(var i=0;i<list.length;i++){
@ -4103,7 +4103,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
dialog:function(){ dialog:function(){
var list=[ var list=[
'taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman', 'taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman',
'xietianzi','shuiyanqijunx','lulitongxin','lianjunshengyan','chiling','diaohulishan','yuanjiao','huoshaolianying' 'xietianzi','shuiyanqijunx','lulitongxin','lianjunshengyan','chiling','diaohulishan','yuanjiao','huoshaolianying','zhibi',
]; ];
for(var i=0;i<list.length;i++){ for(var i=0;i<list.length;i++){
list[i]=['锦囊','',list[i]]; list[i]=['锦囊','',list[i]];
@ -5429,7 +5429,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
audio:'guixiu', audio:'guixiu',
trigger:{player:['showCharacterAfter','removeCharacterBefore']}, trigger:{player:['showCharacterAfter','removeCharacterBefore']},
filter:function(event,player){ filter:function(event,player){
if(event.name=='removeCharacter') return event.toRemove=='gz_mifuren'&&player.isDamaged(); if(event.name=='removeCharacter'||event.name=='changeVice') return event.toRemove=='gz_mifuren'&&player.isDamaged();
return event.toShow.contains('gz_mifuren'); return event.toShow.contains('gz_mifuren');
}, },
content:function(){ content:function(){
@ -7591,28 +7591,59 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.log(player,'获得了','#g【阴阳鱼】','标记'); game.log(player,'获得了','#g【阴阳鱼】','标记');
player.addSkill('yinyang_skill'); player.addSkill('yinyang_skill');
}, },
changeViceOnline:function(){
'step 0'
var group=lib.character[player.name1][1];
_status.characterlist.randomSort();
var name=false;
for(var i=0;i<_status.characterlist.length;i++){
if(lib.character[_status.characterlist[i]][1]==group){name=_status.characterlist[i];break;}
}
if(!name){event.finish();return;}
_status.characterlist.remove(name);
if(player.hasViceCharacter()){
event.change=true;
_status.characterlist.add(player.name2);
}
event.toRemove=player.name2;
event.toChange=name;
if(event.change) event.trigger('removeCharacterBefore');
'step 1'
var name=event.toChange;
game.log(player,'将副将变更为','#g'+get.translation(name));
player.viceChanged=true;
if(player.isUnseen(1)){
player.showCharacter(1,false);
}
player.reinit(player.name2,name,false);
},
changeVice:function(){ changeVice:function(){
'step 0' 'step 0'
//if(!player.hasViceCharacter()) event.finish(); var group=lib.character[player.name1][1];
//else{ _status.characterlist.randomSort();
var group=lib.character[player.name1][1]; event.tochange=[]
_status.characterlist.randomSort(); for(var i=0;i<_status.characterlist.length;i++){
event.tochange=[] if(lib.character[_status.characterlist[i]][1]==group) event.tochange.push(_status.characterlist[i]);
for(var i=0;i<_status.characterlist.length;i++){ if(event.tochange.length==3) break;
if(lib.character[_status.characterlist[i]][1]==group) event.tochange.push(_status.characterlist[i]); }
if(event.tochange.length==3) break; if(!event.tochange.length) event.finish();
} else{
if(!event.tochange.length) event.finish(); player.chooseButton(true,['选择要变更的武将牌',[event.tochange,'character']]).ai=function(button){
else{ return get.guozhanRank(button.link);
player.chooseButton(true,['选择要变更的武将牌',[event.tochange,'character']]).ai=function(button){ };
return get.guozhanRank(button.link); }
};
}
//}
'step 1' 'step 1'
var name=result.links[0]; var name=result.links[0];
_status.characterlist.remove(name); _status.characterlist.remove(name);
if(player.hasViceCharacter()) _status.characterlist.add(player.name2); if(player.hasViceCharacter()){
event.change=true;
_status.characterlist.add(player.name2);
}
event.toRemove=player.name2;
event.toChange=name;
if(event.change) event.trigger('removeCharacterBefore');
'step 2'
var name=event.toChange;
game.log(player,'将副将变更为','#g'+get.translation(name)); game.log(player,'将副将变更为','#g'+get.translation(name));
player.viceChanged=true; player.viceChanged=true;
if(player.isUnseen(1)){ if(player.isUnseen(1)){
@ -7678,7 +7709,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
next.setContent('mayChangeVice'); next.setContent('mayChangeVice');
next.player=this; next.player=this;
next.skill=skill; next.skill=skill;
if(repeat) next.repeat=true; if(repeat||(!_status.connectMode&&get.config('changeViceType')=='online')) next.repeat=true;
return next; return next;
} }
}, },
@ -7907,7 +7938,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
changeVice:function(){ changeVice:function(){
var next=game.createEvent('changeVice'); var next=game.createEvent('changeVice');
next.player=this; next.player=this;
next.setContent('changeVice'); next.setContent((!_status.connectMode&&get.config('changeViceType')=='online')?'changeViceOnline':'changeVice');
return next; return next;
}, },
hasMainCharacter:function(){ hasMainCharacter:function(){