diff --git a/card/standard.js b/card/standard.js index 1aea5bef8..cfd269871 100644 --- a/card/standard.js +++ b/card/standard.js @@ -1588,7 +1588,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, content:function(){ let pos=get.is.single()?'he':'hej'; - if(target.countGainableCards(player,pos)) player.gainPlayerCard(pos, target, true).set('target',target).set('ai',lib.card.shunshou.ai.button); + if(target.countGainableCards(player,pos)) player.gainPlayerCard(pos, target, true).set('target',target).set("complexSelect",false).set('ai',lib.card.shunshou.ai.button); }, ai:{ wuxie:function(target,card,player,viewer){ @@ -1863,7 +1863,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ pos='hej'; vis=undefined; } - if(target.countDiscardableCards(player,pos)) player.discardPlayerCard(pos, target, true, vis).set('target',target).set('ai',lib.card.guohe.ai.button); + if(target.countDiscardableCards(player,pos)) player.discardPlayerCard(pos, target, true, vis).set('target',target).set("complexSelect",false).set('ai',lib.card.guohe.ai.button); }, ai:{ wuxie:(target,card,player,viewer,status)=>{ diff --git a/noname/library/element/content.js b/noname/library/element/content.js index f02c00d27..1e2297cb1 100644 --- a/noname/library/element/content.js +++ b/noname/library/element/content.js @@ -5349,8 +5349,12 @@ export const Content = { if (event.prompt2) { event.dialog.addText(event.prompt2); } - var expand_length = 0; - var directh = (!lib.config.unauto_choose && !event.complexSelect); + let expand_length = 0; + const cs = target.getCards(event.position); + const select = get.select(event.selectButton); + const directFilter = (event.forced && typeof event.filterOk != 'function' && typeof event.selectButton != 'function' && event.filterButton == lib.filter.all); + let directh = (!lib.config.unauto_choose && !event.isOnline() && select[0] == select[1] && (!event.complexSelect || select[1] === 1)); + for (var i = 0; i < event.position.length; i++) { if (event.position[i] == 'h') { var hs = target.getCards('h'); @@ -5431,9 +5435,7 @@ export const Content = { if (event.dialog.buttons.length == 0) { 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 (directFilter && select[0] >= cs.length) { event.result = { bool: true, @@ -5441,7 +5443,7 @@ export const Content = { links: cs }; } - else if (directFilter && directh && !event.isOnline() && select[0] == select[1]) { + else if (directFilter && directh) { event.result = { bool: true, buttons: event.dialog.buttons.randomGets(select[0]), @@ -5524,8 +5526,12 @@ export const Content = { if (event.prompt2) { event.dialog.addText(event.prompt2); } - var directh = (!lib.config.unauto_choose && !event.complexSelect); - var expand_length = 0; + let expand_length = 0; + const cs = target.getCards(event.position); + const select = get.select(event.selectButton); + const directFilter = (event.forced && typeof event.filterOk != 'function' && typeof event.selectButton != 'function' && event.filterButton == lib.filter.all); + let directh = (!lib.config.unauto_choose && !event.isOnline() && select[0] == select[1] && (!event.complexSelect || select[1] === 1)); + for (var i = 0; i < event.position.length; i++) { if (event.position[i] == 'h') { var hs = target.getDiscardableCards(player, 'h'); @@ -5607,9 +5613,6 @@ export const Content = { 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 (directFilter && select[0] >= cs.length) { event.result = { bool: true, @@ -5617,7 +5620,7 @@ export const Content = { links: cs }; } - else if (directFilter && directh && !event.isOnline() && select[0] == select[1]) { + else if (directFilter && directh) { event.result = { bool: true, buttons: event.dialog.buttons.randomGets(select[0]), @@ -5724,8 +5727,12 @@ export const Content = { if (event.prompt2) { event.dialog.addText(event.prompt2); } - var expand_length = 0; - var directh = (!lib.config.unauto_choose && !event.complexSelect); + let expand_length = 0; + const cs = target.getCards(event.position); + const select = get.select(event.selectButton); + const directFilter = (event.forced && typeof event.filterOk != 'function' && typeof event.selectButton != 'function' && event.filterButton == lib.filter.all); + let directh = (!lib.config.unauto_choose && !event.isOnline() && select[0] == select[1] && (!event.complexSelect || select[1] === 1)); + for (var i = 0; i < event.position.length; i++) { if (event.position[i] == 'h') { var hs = target.getGainableCards(player, 'h'); @@ -5808,9 +5815,6 @@ export const Content = { event.finish(); return; } - var cs = target.getCards(event.position); - var select = get.select(event.selectButton); - 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, @@ -5818,7 +5822,7 @@ export const Content = { links: cs }; } - else if (directFilter && directh && !event.isOnline() && select[0] == select[1]) { + else if (directFilter && directh) { event.result = { bool: true, buttons: event.dialog.buttons.randomGets(select[0]),