修复拆顺手牌选择
This commit is contained in:
parent
7ea889384d
commit
9e904a1995
|
@ -1588,7 +1588,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
let pos=get.is.single()?'he':'hej';
|
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:{
|
ai:{
|
||||||
wuxie:function(target,card,player,viewer){
|
wuxie:function(target,card,player,viewer){
|
||||||
|
@ -1863,7 +1863,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
pos='hej';
|
pos='hej';
|
||||||
vis=undefined;
|
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:{
|
ai:{
|
||||||
wuxie:(target,card,player,viewer,status)=>{
|
wuxie:(target,card,player,viewer,status)=>{
|
||||||
|
|
|
@ -5349,8 +5349,12 @@ export const Content = {
|
||||||
if (event.prompt2) {
|
if (event.prompt2) {
|
||||||
event.dialog.addText(event.prompt2);
|
event.dialog.addText(event.prompt2);
|
||||||
}
|
}
|
||||||
var expand_length = 0;
|
let expand_length = 0;
|
||||||
var directh = (!lib.config.unauto_choose && !event.complexSelect);
|
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++) {
|
for (var i = 0; i < event.position.length; i++) {
|
||||||
if (event.position[i] == 'h') {
|
if (event.position[i] == 'h') {
|
||||||
var hs = target.getCards('h');
|
var hs = target.getCards('h');
|
||||||
|
@ -5431,9 +5435,7 @@ export const Content = {
|
||||||
if (event.dialog.buttons.length == 0) {
|
if (event.dialog.buttons.length == 0) {
|
||||||
event.finish();
|
event.finish();
|
||||||
return;
|
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) {
|
if (directFilter && select[0] >= cs.length) {
|
||||||
event.result = {
|
event.result = {
|
||||||
bool: true,
|
bool: true,
|
||||||
|
@ -5441,7 +5443,7 @@ export const Content = {
|
||||||
links: cs
|
links: cs
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else if (directFilter && directh && !event.isOnline() && select[0] == select[1]) {
|
else if (directFilter && directh) {
|
||||||
event.result = {
|
event.result = {
|
||||||
bool: true,
|
bool: true,
|
||||||
buttons: event.dialog.buttons.randomGets(select[0]),
|
buttons: event.dialog.buttons.randomGets(select[0]),
|
||||||
|
@ -5524,8 +5526,12 @@ export const Content = {
|
||||||
if (event.prompt2) {
|
if (event.prompt2) {
|
||||||
event.dialog.addText(event.prompt2);
|
event.dialog.addText(event.prompt2);
|
||||||
}
|
}
|
||||||
var directh = (!lib.config.unauto_choose && !event.complexSelect);
|
let expand_length = 0;
|
||||||
var 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++) {
|
for (var i = 0; i < event.position.length; i++) {
|
||||||
if (event.position[i] == 'h') {
|
if (event.position[i] == 'h') {
|
||||||
var hs = target.getDiscardableCards(player, 'h');
|
var hs = target.getDiscardableCards(player, 'h');
|
||||||
|
@ -5607,9 +5613,6 @@ export const Content = {
|
||||||
event.finish();
|
event.finish();
|
||||||
return;
|
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) {
|
if (directFilter && select[0] >= cs.length) {
|
||||||
event.result = {
|
event.result = {
|
||||||
bool: true,
|
bool: true,
|
||||||
|
@ -5617,7 +5620,7 @@ export const Content = {
|
||||||
links: cs
|
links: cs
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else if (directFilter && directh && !event.isOnline() && select[0] == select[1]) {
|
else if (directFilter && directh) {
|
||||||
event.result = {
|
event.result = {
|
||||||
bool: true,
|
bool: true,
|
||||||
buttons: event.dialog.buttons.randomGets(select[0]),
|
buttons: event.dialog.buttons.randomGets(select[0]),
|
||||||
|
@ -5724,8 +5727,12 @@ export const Content = {
|
||||||
if (event.prompt2) {
|
if (event.prompt2) {
|
||||||
event.dialog.addText(event.prompt2);
|
event.dialog.addText(event.prompt2);
|
||||||
}
|
}
|
||||||
var expand_length = 0;
|
let expand_length = 0;
|
||||||
var directh = (!lib.config.unauto_choose && !event.complexSelect);
|
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++) {
|
for (var i = 0; i < event.position.length; i++) {
|
||||||
if (event.position[i] == 'h') {
|
if (event.position[i] == 'h') {
|
||||||
var hs = target.getGainableCards(player, 'h');
|
var hs = target.getGainableCards(player, 'h');
|
||||||
|
@ -5808,9 +5815,6 @@ export const Content = {
|
||||||
event.finish();
|
event.finish();
|
||||||
return;
|
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) {
|
if (directFilter && select[0] >= cs.length) {
|
||||||
event.result = {
|
event.result = {
|
||||||
bool: true,
|
bool: true,
|
||||||
|
@ -5818,7 +5822,7 @@ export const Content = {
|
||||||
links: cs
|
links: cs
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else if (directFilter && directh && !event.isOnline() && select[0] == select[1]) {
|
else if (directFilter && directh) {
|
||||||
event.result = {
|
event.result = {
|
||||||
bool: true,
|
bool: true,
|
||||||
buttons: event.dialog.buttons.randomGets(select[0]),
|
buttons: event.dialog.buttons.randomGets(select[0]),
|
||||||
|
|
Loading…
Reference in New Issue