From c1390119e9ed3b49dd8b183702378afcde371c69 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Tue, 31 Oct 2023 19:57:01 +0800 Subject: [PATCH] bugfix --- character/sp.js | 5 ++++- game/game.js | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/character/sp.js b/character/sp.js index 30752369e..26b77f536 100755 --- a/character/sp.js +++ b/character/sp.js @@ -1859,7 +1859,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.target=target; var target2=(player.storage.oldongdao?trigger.player:player); event.target2=target2; - target2.chooseBool(get.prompt('oldongdao'),'令'+get.translation(target)+'进行一个额外回合'); + target2.chooseBool(get.prompt('oldongdao'),'令'+get.translation(target)+'进行一个额外回合').set('ai',()=>{ + var event=_status.event.getParent(); + return get.attitude(event.target2,event.target)>0; + }) 'step 1' if(result.bool){ player.logSkill('oldongdao'); diff --git a/game/game.js b/game/game.js index 5c6b8e228..ca6081748 100644 --- a/game/game.js +++ b/game/game.js @@ -17486,7 +17486,7 @@ event.dialog.addText(event.prompt2); } var expand_length=0; - var directh=!lib.config.unauto_choose; + var directh=(!lib.config.unauto_choose&&!event.complexSelect); for(var i=0;i=cs.length){ + if(directFilter&&select[0]>=cs.length){ event.result={ bool:true, buttons:event.dialog.buttons, links:cs } } - else if(event.forced&&directh&&!event.isOnline()&&select[0]==select[1]){ + else if(directFilter&&directh&&!event.isOnline()&&select[0]==select[1]){ event.result={ bool:true, buttons:event.dialog.buttons.randomGets(select[0]), @@ -17703,16 +17703,17 @@ event.finish(); return; } + var directFilter=(event.forced&&typeof event.filterOk!='function'&&typeof event.selectButton!='function'&&event.filterButton==lib.filter.all); var cs=target.getCards(event.position); var select=get.select(event.selectButton); - if(event.forced&&select[0]>=cs.length){ + if(directFilter&&select[0]>=cs.length){ event.result={ bool:true, buttons:event.dialog.buttons, links:cs } } - else if(event.forced&&directh&&!event.isOnline()&&select[0]==select[1]){ + else if(directFilter&&directh&&!event.isOnline()&&select[0]==select[1]){ event.result={ bool:true, buttons:event.dialog.buttons.randomGets(select[0]), @@ -17885,14 +17886,15 @@ } var cs=target.getCards(event.position); var select=get.select(event.selectButton); - if(event.forced&&select[0]>=cs.length){ + var directFilter=(event.forced&&typeof event.filterOk!='function'&&typeof event.selectButton!='function'&&event.filterButton==lib.filter.all); + if(directFilter&&select[0]>=cs.length){ event.result={ bool:true, buttons:event.dialog.buttons, links:cs } } - else if(event.forced&&directh&&!event.isOnline()&&select[0]==select[1]){ + else if(directFilter&&directh&&!event.isOnline()&&select[0]==select[1]){ event.result={ bool:true, buttons:event.dialog.buttons.randomGets(select[0]),