国战模式bug修复
将建国结盟的ai拒绝加入概率调整为0.02 修复建国完成后不满足胜利条件时游戏仍然终止的bug
This commit is contained in:
parent
0911c94b76
commit
debe69eb82
|
@ -13299,6 +13299,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
var source=event.targets2.shift();
|
var source=event.targets2.shift();
|
||||||
event.source=source;
|
event.source=source;
|
||||||
event.targets3=[];
|
event.targets3=[];
|
||||||
|
event.targets4=[source];
|
||||||
if(!_status.yexinjia_list) _status.yexinjia_list=['夏','商','周','秦','汉','隋','唐','宋','辽','金','元','明'];
|
if(!_status.yexinjia_list) _status.yexinjia_list=['夏','商','周','秦','汉','隋','唐','宋','辽','金','元','明'];
|
||||||
source.chooseControl(_status.yexinjia_list).set('prompt','请选择自己所属的野心家势力的标识').set('ai',()=>(_status.yexinjia_list?_status.yexinjia_list.randomGet():0));
|
source.chooseControl(_status.yexinjia_list).set('prompt','请选择自己所属的野心家势力的标识').set('ai',()=>(_status.yexinjia_list?_status.yexinjia_list.randomGet():0));
|
||||||
'step 4'
|
'step 4'
|
||||||
|
@ -13323,14 +13324,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
var target=targets.shift();
|
var target=targets.shift();
|
||||||
event.target=target;
|
event.target=target;
|
||||||
source.line(target,'green');
|
source.line(target,'green');
|
||||||
target.chooseBool('是否响应'+get.translation(source)+'发起的【拉拢人心】?','将势力改为'+event.text+(['辽','金'].contains(event.text)?'':'朝')).set('choice',Math.random()<=0.95);//偶尔反骨[doge]
|
target.chooseBool('是否响应'+get.translation(source)+'发起的【拉拢人心】?','将势力改为'+event.text+(['辽','金'].contains(event.text)?'':'朝')).set('choice',Math.random()<=0.98);//反骨[doge]
|
||||||
'step 6'
|
'step 6'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
target.chat('加入');
|
target.chat('加入');
|
||||||
|
event.targets4.push(target);
|
||||||
game.broadcastAll(function(player,target,text){
|
game.broadcastAll(function(player,target,text){
|
||||||
player.identity='ye';
|
player.identity='ye';
|
||||||
player.setIdentity(text,'ye');
|
player.setIdentity(text,'ye');
|
||||||
player.markAuto('yexinjia_friend',[target]);
|
|
||||||
},target,event.source,event.text);
|
},target,event.source,event.text);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -13339,6 +13340,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
event.targets3.push(target);
|
event.targets3.push(target);
|
||||||
}
|
}
|
||||||
if(targets.length) event.goto(5);
|
if(targets.length) event.goto(5);
|
||||||
|
else if(event.targets4.length){
|
||||||
|
for(var i of event.targets4){
|
||||||
|
i.markAuto('yexinjia_friend',event.targets4.filter(j=>j!=i));
|
||||||
|
}
|
||||||
|
}
|
||||||
'step 7'
|
'step 7'
|
||||||
if(event.targets3.length){
|
if(event.targets3.length){
|
||||||
for(var i of event.targets3){
|
for(var i of event.targets3){
|
||||||
|
@ -13346,10 +13352,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
||||||
i.recover();
|
i.recover();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
game.checkResult();
|
|
||||||
'step 8'
|
'step 8'
|
||||||
if(event.targets2.length) event.goto(3);
|
if(event.targets2.length) event.goto(3);
|
||||||
else delete _status.showYexings;
|
else{
|
||||||
|
delete _status.showYexings;
|
||||||
|
if(!game.hasPlayer(current=>{
|
||||||
|
return game.hasPlayer(target=>{
|
||||||
|
return !target.isFriendOf(current);
|
||||||
|
});
|
||||||
|
})) game.checkResult();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getCharacterChoice:function(list,num){
|
getCharacterChoice:function(list,num){
|
||||||
|
|
Loading…
Reference in New Issue