This commit is contained in:
libccy 2017-02-25 22:30:50 +08:00
parent 264c4e7a7e
commit a043a72c4e
3 changed files with 30 additions and 20 deletions

View File

@ -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<lingjians.length;i++){
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+='<div style="text-align:left;line-height:18px;border-radius:4px;margin-top:7px;margin-bottom:10px;position:relative;width:100%">';
str+='<div class="shadowed" style="position:absolute;left0;top:0;padding:5px;border-radius:4px;background:'+color+'">'+lib.translate[lingjians[i]]+'</div>';
for(var j=0;j<types.length;j++){
str+='<div class="shadowed" style="position:relative;left:85px;width:calc(100% - 95px);height:100%;padding:5px;border-radius: 4px;margin-bottom:10px">'+
(type!='jiqi'?(lib.translate[types[j]]+''):'')+
lib.translate[lingjians[i]+'_'+types[j]+'_info']+'</div>';
if(type=='jiqi') break;
}
str+='</div>';
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+='<div style="text-align:left;line-height:18px;border-radius:4px;margin-top:7px;margin-bottom:10px;position:relative;width:100%">';
str+='<div class="shadowed" style="position:absolute;left0;top:0;padding:5px;border-radius:4px;background:'+color+'">'+lib.translate[lingjians[i]]+'</div>';
for(var j=0;j<types.length;j++){
str+='<div class="shadowed" style="position:relative;left:85px;width:calc(100% - 95px);height:100%;padding:5px;border-radius: 4px;margin-bottom:10px">'+
(type!='jiqi'?(lib.translate[types[j]]+''):'')+
lib.translate[lingjians[i]+'_'+types[j]+'_info']+'</div>';
if(type=='jiqi') break;
}
str+='</div>';
}
return str;
},

View File

@ -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<event.choiceList.length;i++){
event.dialog.add('<div class="popup text" style="width:calc(100% - 10px);display:inline-block">选项'+
get.cnNumber(i+1,true)+''+event.choiceList[i]+'</div>');
@ -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,'<div><div style="width:100%;text-align:center">'+str2+'</div></div>');
if(info.longprompt){
event.skillDialog.forcebutton=true;
ui.update();
}
}
else if(info.promptfunc){
event.skillDialog=ui.create.dialog(str,'<div><div style="width:100%">'+info.promptfunc(event,event.player)+'</div></div>');
@ -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){

View File

@ -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([