OL淳于琼【宿守】、十周年淳于琼【粮营】添加_status.noclearcountdown

This commit is contained in:
mengxinzxz 2024-04-14 00:39:59 +08:00
parent 5937711f00
commit 084f520766
2 changed files with 14 additions and 0 deletions

View File

@ -12029,6 +12029,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
const num=draws.indexOf(control)+1,max=Math.min(num,player.countCards('he'),game.countPlayer(target=>target!=player)); const num=draws.indexOf(control)+1,max=Math.min(num,player.countCards('he'),game.countPlayer(target=>target!=player));
await player.draw(num); await player.draw(num);
let list=[]; let list=[];
if(_status.connectMode) game.broadcastAll(()=>_status.noclearcountdown=true);
while(max-list.length>0){ while(max-list.length>0){
const {result:{bool,cards,targets}}=await player.chooseCardTarget({ const {result:{bool,cards,targets}}=await player.chooseCardTarget({
prompt:'粮营:将'+get.cnNumber(max-1)+'至'+get.cnNumber(max)+'张牌交给其他角色', prompt:'粮营:将'+get.cnNumber(max-1)+'至'+get.cnNumber(max)+'张牌交给其他角色',
@ -12054,6 +12055,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
else break; else break;
} }
if(_status.connectMode){
game.broadcastAll(()=>{
delete _status.noclearcountdown;
game.stopCountChoose();
});
}
if(list.length){ if(list.length){
await game.loseAsync({ await game.loseAsync({
gain_list:list, gain_list:list,

View File

@ -8319,6 +8319,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
const num=Math.min(player.countCards('h'),player.countCards('he'),game.countPlayer(target=>target!=player&&target.isFriendOf(player))); const num=Math.min(player.countCards('h'),player.countCards('he'),game.countPlayer(target=>target!=player&&target.isFriendOf(player)));
if(num){ if(num){
let list=[]; let list=[];
if(_status.connectMode) game.broadcastAll(()=>_status.noclearcountdown=true);
while(num-list.length>0){ while(num-list.length>0){
const {result:{bool,targets,cards}}=await player.chooseCardTarget({ const {result:{bool,targets,cards}}=await player.chooseCardTarget({
prompt:'宿守:你可以交给友方角色各一张牌', prompt:'宿守:你可以交给友方角色各一张牌',
@ -8344,6 +8345,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
else break; else break;
} }
if(_status.connectMode){
game.broadcastAll(()=>{
delete _status.noclearcountdown;
game.stopCountChoose();
});
}
if(list.length){ if(list.length){
await game.loseAsync({ await game.loseAsync({
gain_list:list, gain_list:list,