This commit is contained in:
parent
64188b52ad
commit
3960e270a1
26
game/game.js
26
game/game.js
|
@ -2792,7 +2792,6 @@
|
|||
map.enable_all.show();
|
||||
map.four_assign.show();
|
||||
map.expand_dialog.show();
|
||||
// map.four_cross.show();
|
||||
}
|
||||
else{
|
||||
map.change_choice.show();
|
||||
|
@ -2801,8 +2800,7 @@
|
|||
map.ladder_reset.hide();
|
||||
map.enable_all.hide();
|
||||
map.four_assign.hide();
|
||||
map.expand_dialog.show();
|
||||
// map.four_cross.hide();
|
||||
map.expand_dialog.hide();
|
||||
}
|
||||
if(config.versus_mode=='jiange'||config.versus_mode=='two'){
|
||||
map.free_choose.show();
|
||||
|
@ -2831,7 +2829,8 @@
|
|||
name:'游戏模式',
|
||||
init:'standard',
|
||||
item:{
|
||||
standard:'标准',
|
||||
standard:'自由',
|
||||
three:'统率',
|
||||
jiange:'剑阁',
|
||||
two:'<span style="display:inline-block;width:100%;text-align:center">2v2</span>',
|
||||
four:'<span style="display:inline-block;width:100%;text-align:center">4v4</span>'
|
||||
|
@ -2862,12 +2861,6 @@
|
|||
frequent:true,
|
||||
restart:true,
|
||||
},
|
||||
// four_cross:{
|
||||
// name:'交叉座位',
|
||||
// init:false,
|
||||
// frequent:true,
|
||||
// restart:true,
|
||||
// },
|
||||
free_choose:{
|
||||
name:'自由选将',
|
||||
init:true,
|
||||
|
@ -27944,7 +27937,8 @@
|
|||
var clickCaptNode=function(e){
|
||||
delete _status.filterCharacter;
|
||||
ui.window.classList.remove('shortcutpaused');
|
||||
filternode.remove();
|
||||
filternode.delete();
|
||||
filternode.classList.remove('shown');
|
||||
clickCapt.call(this.link,e);
|
||||
};
|
||||
if(get.is.phoneLayout()){
|
||||
|
@ -27953,9 +27947,11 @@
|
|||
filternode=ui.create.div('.popup-container.filter-character');
|
||||
ui.create.div(filternode);
|
||||
filternode.listen(function(e){
|
||||
if(this.classList.contains('removing')) return;
|
||||
delete _status.filterCharacter;
|
||||
ui.window.classList.remove('shortcutpaused');
|
||||
this.remove();
|
||||
this.delete();
|
||||
this.classList.remove('shown');
|
||||
e.stopPropagation();
|
||||
});
|
||||
for(var i=0;i<node.childElementCount;i++){
|
||||
|
@ -27986,15 +27982,19 @@
|
|||
|
||||
packsource.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
|
||||
if(_status.dragged) return;
|
||||
if(get.is.phoneLayout()){
|
||||
if(get.is.phoneLayout()&&filternode){
|
||||
_status.filterCharacter=true;
|
||||
ui.window.classList.add('shortcutpaused');
|
||||
ui.window.appendChild(filternode);
|
||||
ui.refresh(filternode);
|
||||
filternode.classList.add('shown');
|
||||
var dh=filternode.offsetHeight-filternode.firstChild.offsetHeight;
|
||||
if(dh>0){
|
||||
filternode.firstChild.style.top=(dh/2)+'px';
|
||||
}
|
||||
else{
|
||||
filternode.firstChild.style.top='';
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(newlined2.style.display=='none'){
|
||||
|
|
|
@ -16,6 +16,14 @@
|
|||
.popup-container.filter-character{
|
||||
text-align: center;
|
||||
overflow: scroll;
|
||||
opacity: 0;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.popup-container.filter-character.shown{
|
||||
opacity: 1;
|
||||
}
|
||||
.popup-container.filter-character.removing>div{
|
||||
pointer-events: none;
|
||||
}
|
||||
.popup-container.filter-character>div{
|
||||
left: 0;
|
||||
|
|
|
@ -314,16 +314,7 @@ mode.versus={
|
|||
_status.round=0;
|
||||
if(lib.storage.single_control){
|
||||
game.addGlobalSkill('versus_swap');
|
||||
ui.autoreplace=ui.create.div('.caption.normal');
|
||||
ui.autoreplace.innerHTML='<div class="underline">自动换人</div>';
|
||||
ui.autoreplace.style.textAlign='center';
|
||||
if(lib.storage.autoreplaceinnerhtml){
|
||||
ui.autoreplace.classList.add('on')
|
||||
}
|
||||
ui.autoreplace.listen(game.switchAutoreplace);
|
||||
|
||||
// ui.versusreplace=ui.create.system('换人',null,true);
|
||||
// lib.setPopped(ui.versusreplace,game.versusHoverReplace);
|
||||
if(game.players.length>2&&lib.config.show_handcardbutton){
|
||||
ui.versushs=ui.create.system('手牌',null,true);
|
||||
lib.setPopped(ui.versushs,game.versusHoverHandcards,220);
|
||||
|
@ -2216,48 +2207,6 @@ mode.versus={
|
|||
game.modeSwapPlayer(this.link);
|
||||
}
|
||||
},
|
||||
versusCheckHandcards:function(){
|
||||
_status.clicked=true;
|
||||
if(ui.intro){
|
||||
ui.intro.close();
|
||||
if(ui.intro.source=='versusCheckHandcards'){
|
||||
delete ui.intro;
|
||||
ui.control.show();
|
||||
game.resume2();
|
||||
return;
|
||||
}
|
||||
}
|
||||
game.pause2();
|
||||
ui.control.hide();
|
||||
ui.intro=ui.create.dialog();
|
||||
ui.intro.source='versusCheckHandcards';
|
||||
|
||||
ui.intro.add(ui.autoreplace);
|
||||
var players=[];
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].side==game.me.side){
|
||||
players.push(game.players[i]);
|
||||
}
|
||||
}
|
||||
ui.intro.add(players,true);
|
||||
var buttons=ui.intro.querySelectorAll('.button');
|
||||
for(var i=0;i<buttons.length;i++){
|
||||
buttons[i].addEventListener(lib.config.touchscreen?'touchend':'click',game.versusClickToSwap);
|
||||
}
|
||||
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].side==game.me.side&&game.players[i]!=game.me){
|
||||
ui.intro.add(get.translation(game.players[i]));
|
||||
var cards=game.players[i].get('h');
|
||||
if(cards.length){
|
||||
ui.intro.add(cards,true);
|
||||
}
|
||||
else{
|
||||
ui.intro.add('(无)');
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
versusHoverEnemy:function(){
|
||||
var uiintro=ui.create.dialog('hidden');
|
||||
|
||||
|
@ -2294,24 +2243,6 @@ mode.versus={
|
|||
|
||||
return uiintro;
|
||||
},
|
||||
versusHoverReplace:function(){
|
||||
var uiintro=ui.create.dialog('hidden');
|
||||
|
||||
uiintro.add(ui.autoreplace);
|
||||
var players=[];
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].side==game.me.side){
|
||||
players.push(game.players[i]);
|
||||
}
|
||||
}
|
||||
uiintro.add(players,true);
|
||||
var buttons=uiintro.querySelectorAll('.button');
|
||||
for(var i=0;i<buttons.length;i++){
|
||||
buttons[i].addEventListener(lib.config.touchscreen?'touchend':'click',game.versusClickToSwap);
|
||||
}
|
||||
|
||||
return uiintro;
|
||||
},
|
||||
versusHoverHandcards:function(){
|
||||
var uiintro=ui.create.dialog('hidden');
|
||||
|
||||
|
@ -3591,31 +3522,7 @@ mode.versus={
|
|||
return !_status.auto&&player!=game.me&&player.side==game.me.side;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
if(ui.autoreplace.innerHTML=='询问切换'){
|
||||
game.me.chooseBool('是否切换到'+get.translation(player)+'?')
|
||||
}
|
||||
else{
|
||||
if(ui.autoreplace.classList.contains('on')){
|
||||
if(trigger.name!='phase'){
|
||||
game.modeSwapPlayer(player);
|
||||
if(ui.dialog){
|
||||
ui.dialog.style.display='';
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(trigger.name=='phase'){
|
||||
game.modeSwapPlayer(player);
|
||||
}
|
||||
event.finish();
|
||||
}
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
game.modeSwapPlayer(player);
|
||||
if(ui.dialog){
|
||||
ui.dialog.style.display='';
|
||||
}
|
||||
}
|
||||
game.modeSwapPlayer(player);
|
||||
},
|
||||
},
|
||||
versus_ladder:{
|
||||
|
|
Loading…
Reference in New Issue