This commit is contained in:
parent
264c4e7a7e
commit
a043a72c4e
35
card/swd.js
35
card/swd.js
|
@ -3875,6 +3875,7 @@ card.swd={
|
||||||
position:'he',
|
position:'he',
|
||||||
discard:false,
|
discard:false,
|
||||||
losetrigger:false,
|
losetrigger:false,
|
||||||
|
longprompt:true,
|
||||||
prompt:function(event){
|
prompt:function(event){
|
||||||
var lingjians=[],types=[];
|
var lingjians=[],types=[];
|
||||||
var hs=event.player.get('he');
|
var hs=event.player.get('he');
|
||||||
|
@ -3887,23 +3888,23 @@ card.swd={
|
||||||
}
|
}
|
||||||
var str='';
|
var str='';
|
||||||
for(var i=0;i<lingjians.length;i++){
|
for(var i=0;i<lingjians.length;i++){
|
||||||
var color;
|
var color;
|
||||||
var type=get.type(lingjians[i]);
|
var type=get.type(lingjians[i]);
|
||||||
if(type=='jiqi'){
|
if(type=='jiqi'){
|
||||||
color='rgba(233, 131, 255,0.2);';
|
color='rgba(233, 131, 255,0.2);';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
color='rgba(117,186,255,0.2);';
|
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 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>';
|
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++){
|
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">'+
|
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]]+':'):'')+
|
(type!='jiqi'?(lib.translate[types[j]]+':'):'')+
|
||||||
lib.translate[lingjians[i]+'_'+types[j]+'_info']+'</div>';
|
lib.translate[lingjians[i]+'_'+types[j]+'_info']+'</div>';
|
||||||
if(type=='jiqi') break;
|
if(type=='jiqi') break;
|
||||||
}
|
}
|
||||||
str+='</div>';
|
str+='</div>';
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
},
|
},
|
||||||
|
|
14
game/game.js
14
game/game.js
|
@ -8090,6 +8090,7 @@
|
||||||
item.firstChild.listen(ui.click.dialogcontrol);
|
item.firstChild.listen(ui.click.dialogcontrol);
|
||||||
item.firstChild.link=event.controls[i];
|
item.firstChild.link=event.controls[i];
|
||||||
}
|
}
|
||||||
|
event.dialog.forcebutton=true;
|
||||||
event.dialog.open();
|
event.dialog.open();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -8109,7 +8110,9 @@
|
||||||
event.dialog.open();
|
event.dialog.open();
|
||||||
}
|
}
|
||||||
else if(event.choiceList){
|
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++){
|
for(var i=0;i<event.choiceList.length;i++){
|
||||||
event.dialog.add('<div class="popup text" style="width:calc(100% - 10px);display:inline-block">选项'+
|
event.dialog.add('<div class="popup text" style="width:calc(100% - 10px);display:inline-block">选项'+
|
||||||
get.cnNumber(i+1,true)+':'+event.choiceList[i]+'</div>');
|
get.cnNumber(i+1,true)+':'+event.choiceList[i]+'</div>');
|
||||||
|
@ -20450,7 +20453,7 @@
|
||||||
if(game.online){
|
if(game.online){
|
||||||
var dialog=ui.create.dialog();
|
var dialog=ui.create.dialog();
|
||||||
dialog.content.innerHTML=result;
|
dialog.content.innerHTML=result;
|
||||||
dialog.buttons=Array.from(dialog.querySelectorAll('.button'));
|
dialog.forcebutton=true;
|
||||||
var result2=arguments[1];
|
var result2=arguments[1];
|
||||||
if(result2==true){
|
if(result2==true){
|
||||||
dialog.content.firstChild.innerHTML='战斗胜利';
|
dialog.content.firstChild.innerHTML='战斗胜利';
|
||||||
|
@ -20514,6 +20517,7 @@
|
||||||
if(result===false) result='战斗失败';
|
if(result===false) result='战斗失败';
|
||||||
if(result==undefined) result='战斗结束';
|
if(result==undefined) result='战斗结束';
|
||||||
dialog=ui.create.dialog(result);
|
dialog=ui.create.dialog(result);
|
||||||
|
dialog.forcebutton=true;
|
||||||
if(game.addOverDialog){
|
if(game.addOverDialog){
|
||||||
game.addOverDialog(dialog,result);
|
game.addOverDialog(dialog,result);
|
||||||
}
|
}
|
||||||
|
@ -33926,6 +33930,10 @@
|
||||||
str2=info.prompt;
|
str2=info.prompt;
|
||||||
}
|
}
|
||||||
event.skillDialog=ui.create.dialog(str,'<div><div style="width:100%;text-align:center">'+str2+'</div></div>');
|
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){
|
else if(info.promptfunc){
|
||||||
event.skillDialog=ui.create.dialog(str,'<div><div style="width:100%">'+info.promptfunc(event,event.player)+'</div></div>');
|
event.skillDialog=ui.create.dialog(str,'<div><div style="width:100%">'+info.promptfunc(event,event.player)+'</div></div>');
|
||||||
|
@ -34947,7 +34955,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
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');
|
ui.dialog.classList.add('nobutton');
|
||||||
if(ui.dialog.content.offsetHeight<240){
|
if(ui.dialog.content.offsetHeight<240){
|
||||||
if(!ui.dialog._heightset){
|
if(!ui.dialog._heightset){
|
||||||
|
|
|
@ -319,6 +319,7 @@ mode.guozhan={
|
||||||
event.askPlayer=function(){
|
event.askPlayer=function(){
|
||||||
event.directfalse=false;
|
event.directfalse=false;
|
||||||
if(event.current&&event.current.isUnseen()&&!event.asked.contains(event.current)){
|
if(event.current&&event.current.isUnseen()&&!event.asked.contains(event.current)){
|
||||||
|
player.line(event.current,'green');
|
||||||
event.asked.push(event.current);
|
event.asked.push(event.current);
|
||||||
if(lib.character[event.current.name1][1]==player.identity){
|
if(lib.character[event.current.name1][1]==player.identity){
|
||||||
event.current.chooseControl([
|
event.current.chooseControl([
|
||||||
|
|
Loading…
Reference in New Issue