From bb674ff0feb0ceb70dc9565d56a96d9eac643d8d Mon Sep 17 00:00:00 2001 From: mengxinzxz <139629761+mengxinzxz@users.noreply.github.com> Date: Mon, 4 Sep 2023 13:48:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E6=88=98=E5=BB=BA=E5=9B=BD=E6=9C=BA?= =?UTF-8?q?=E5=88=B6=E5=86=99=E6=B3=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将国战建国改为真正的修改身份和势力,取消单向换皮+友方存储操作 --- mode/guozhan.js | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/mode/guozhan.js b/mode/guozhan.js index 7a32be242..4d6c69afc 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -13303,20 +13303,24 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ var source=event.targets2.shift(); event.source=source; event.targets3=[]; - event.targets4=[source]; + //event.targets4=[source]; if(!_status.yexinjia_list) _status.yexinjia_list=['夏','商','周','秦','汉','隋','唐','宋','辽','金','元','明']; source.chooseControl(_status.yexinjia_list).set('prompt','请选择自己所属的野心家势力的标识').set('ai',()=>(_status.yexinjia_list?_status.yexinjia_list.randomGet():0)); 'step 4' - var text,source=event.source;; + var text,source=event.source; if(result.control){ text=result.control; _status.yexinjia_list.remove(result.control); } else text=_status.yexinjia_list.randomRemove(); + lib.group.push(text); + lib.translate[text+'2']=text; event.text=text; game.broadcastAll(function(player,text){ - player.setIdentity(text,'ye'); + player.identity=text; + player.setIdentity(text,text); },source,text); + source.changeGroup(text); source.removeMark('yexinjia_mark',1); var targets=game.filterPlayer(function(current){ return current.identity!='ye'&¤t!=source&&!get.is.jun(current)&&!event.targets2.contains(current)&&!current.getStorage('yexinjia_friend').length; @@ -13328,15 +13332,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ var target=targets.shift(); event.target=target; source.line(target,'green'); - target.chooseBool('是否响应'+get.translation(source)+'发起的【拉拢人心】?','将势力改为'+event.text+(['辽','金'].contains(event.text)?'':'朝')).set('choice',Math.random()<=0.98);//反骨[doge] + target.chooseBool('是否响应'+get.translation(source)+'发起的【拉拢人心】?','将势力改为'+event.text).set('choice',Math.random()<=0.98);//反骨[doge] 'step 6' if(result.bool){ target.chat('加入'); - event.targets4.push(target); - game.broadcastAll(function(player,target,text){ - player.identity='ye'; - player.setIdentity(text,'ye'); - },target,event.source,event.text); + //event.targets4.push(target); + game.broadcastAll(function(player,text){ + player.identity=text; + player.setIdentity(text,text); + },target,event.text); + target.changeGroup(event.text); } else{ target.chat('拒绝'); @@ -13344,11 +13349,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ } game.delay(1.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' if(event.targets3.length){ for(var i of event.targets3){ @@ -13364,7 +13371,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ return game.hasPlayer(target=>{ return !target.isFriendOf(current); }); - })) game.checkResult(); + })){ + game.broadcastAll(function(id){ + game.winner_id=id; + },event.source.playerid); + game.checkResult(); + } } }); },