From 36a2f6fc774aba8cfc2d56545d01d205a278fa42 Mon Sep 17 00:00:00 2001 From: mengxinzxz <139629761+mengxinzxz@users.noreply.github.com> Date: Wed, 23 Aug 2023 14:59:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E6=83=A0=E8=A7=A3=E3=80=90=E6=85=A7?= =?UTF-8?q?=E6=B7=91=E3=80=91=E4=BF=AE=E5=A4=8D=EF=BC=8C=E3=80=90=E6=98=93?= =?UTF-8?q?=E6=95=B0=E3=80=91=E6=93=8D=E4=BD=9C=E5=92=8C=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复全惠解【慧淑】获得锦囊牌效果的content里面存在未定义goon变量的bug 调整全惠解【易数】为同时操作选择增加和减少的数字 --- character/xianding.js | 170 +++++++++++++++++++++++++++++++++--------- 1 file changed, 133 insertions(+), 37 deletions(-) diff --git a/character/xianding.js b/character/xianding.js index 7bad4a349..30913db30 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -5566,7 +5566,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var evt=trigger.getl(player); var num=0; player.getHistory('lose',function(evt){ - if(!goon||evt.type!='discard') return false; + if(evt.type!='discard') return false; num+=evt.cards2.length; }); var cards=[]; @@ -5597,52 +5597,148 @@ game.import('character',function(lib,game,ui,get,ai,_status){ content:function(){ 'step 0' var list=lib.skill.dchuishu.getList(player); - event.initial_list=list.slice(0); - var min=list[0]; + var min=list[0],max=list[0]; for(var i of list){ if(imax) max=i; } var exps=['摸牌数[','弃牌数[','目标牌数[']; - var choices=[]; + var choices_min=[],choices_max=[]; for(var i=0;i'; + td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ + if(_status.dragged) return; + if(_status.justdragged) return; + _status.tempNoButton=true; + setTimeout(function(){ + _status.tempNoButton=false; + },500); + var link=this.link; + var current=this.parentNode.querySelector('.bluebg'); + if(current) current.classList.remove('bluebg'); + this.classList.add('bluebg'); + event._result.min=link; + }); + } + dialog.content.appendChild(table); + dialog.addText('最大值-1'); + var table2=document.createElement('div'); + table2.classList.add('add-setting'); + table2.style.margin='0'; + table2.style.width='100%'; + table2.style.position='relative'; + for(var i=0;i'; + td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){ + if(_status.dragged) return; + if(_status.justdragged) return; + _status.tempNoButton=true; + setTimeout(function(){ + _status.tempNoButton=false; + },500); + var link=this.link; + var current=this.parentNode.querySelector('.bluebg'); + if(current) current.classList.remove('bluebg'); + this.classList.add('bluebg'); + event._result.max=link; + }); + } + dialog.content.appendChild(table2); + dialog.add('  '); + event.dialog.open(); + + event.switchToAuto=function(){ + event._result={ + bool:true, + min:min[0], + max:max[0], + }; + event.dialog.close(); + event.control.close(); + game.resume(); + _status.imchoosing=false; + }; + event.control=ui.create.control('ok',function(link){ + var result=event._result; + if(!result.min||!result.max) return; + result.bool=true; + event.dialog.close(); + event.control.close(); + game.resume(); + _status.imchoosing=false; + }); + for(var i=0;i