From a043a72c4e04439ad2ad1cfaa8ba5f78fcc0b925 Mon Sep 17 00:00:00 2001 From: libccy Date: Sat, 25 Feb 2017 22:30:50 +0800 Subject: [PATCH] 2 --- card/swd.js | 35 ++++++++++++++++++----------------- game/game.js | 14 +++++++++++--- mode/guozhan.js | 1 + 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/card/swd.js b/card/swd.js index beaea0726..a70ff579a 100644 --- a/card/swd.js +++ b/card/swd.js @@ -3875,6 +3875,7 @@ card.swd={ position:'he', discard:false, losetrigger:false, + longprompt:true, prompt:function(event){ var lingjians=[],types=[]; var hs=event.player.get('he'); @@ -3887,23 +3888,23 @@ card.swd={ } var str=''; for(var i=0;i'+lib.translate[lingjians[i]]+''; - for(var j=0;j'; - if(type=='jiqi') break; - } - str+=''; + var color; + var type=get.type(lingjians[i]); + if(type=='jiqi'){ + color='rgba(233, 131, 255,0.2);'; + } + else{ + color='rgba(117,186,255,0.2);'; + } + str+='
'; + str+='
'+lib.translate[lingjians[i]]+'
'; + for(var j=0;j'; + if(type=='jiqi') break; + } + str+='
'; } return str; }, diff --git a/game/game.js b/game/game.js index a7c860696..ded0b6975 100644 --- a/game/game.js +++ b/game/game.js @@ -8090,6 +8090,7 @@ item.firstChild.listen(ui.click.dialogcontrol); item.firstChild.link=event.controls[i]; } + event.dialog.forcebutton=true; event.dialog.open(); } else{ @@ -8109,7 +8110,9 @@ event.dialog.open(); } else if(event.choiceList){ - event.dialog=ui.create.dialog(event.prompt||'选择一项'); + event.dialog=ui.create.dialog(event.prompt||'选择一项','hidden'); + event.dialog.forcebutton=true; + event.dialog.open(); for(var i=0;i选项'+ get.cnNumber(i+1,true)+':'+event.choiceList[i]+''); @@ -20450,7 +20453,7 @@ if(game.online){ var dialog=ui.create.dialog(); dialog.content.innerHTML=result; - dialog.buttons=Array.from(dialog.querySelectorAll('.button')); + dialog.forcebutton=true; var result2=arguments[1]; if(result2==true){ dialog.content.firstChild.innerHTML='战斗胜利'; @@ -20514,6 +20517,7 @@ if(result===false) result='战斗失败'; if(result==undefined) result='战斗结束'; dialog=ui.create.dialog(result); + dialog.forcebutton=true; if(game.addOverDialog){ game.addOverDialog(dialog,result); } @@ -33926,6 +33930,10 @@ str2=info.prompt; } event.skillDialog=ui.create.dialog(str,'
'+str2+'
'); + if(info.longprompt){ + event.skillDialog.forcebutton=true; + ui.update(); + } } else if(info.promptfunc){ event.skillDialog=ui.create.dialog(str,'
'+info.promptfunc(event,event.player)+'
'); @@ -34947,7 +34955,7 @@ } } else{ - if((!ui.dialog.buttons||!ui.dialog.buttons.length)&&ui.dialog.classList.contains('fullheight')==false){ + if((!ui.dialog.buttons||!ui.dialog.buttons.length)&&!ui.dialog.forcebutton&&ui.dialog.classList.contains('fullheight')==false){ ui.dialog.classList.add('nobutton'); if(ui.dialog.content.offsetHeight<240){ if(!ui.dialog._heightset){ diff --git a/mode/guozhan.js b/mode/guozhan.js index e1f44ede4..89c32d5c1 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -319,6 +319,7 @@ mode.guozhan={ event.askPlayer=function(){ event.directfalse=false; if(event.current&&event.current.isUnseen()&&!event.asked.contains(event.current)){ + player.line(event.current,'green'); event.asked.push(event.current); if(lib.character[event.current.name1][1]==player.identity){ event.current.chooseControl([