From a923fe2026f0d54f2aee0e649e848332d597baf5 Mon Sep 17 00:00:00 2001 From: libccy Date: Thu, 5 Nov 2015 10:34:35 +0800 Subject: [PATCH] bug --- audio/skill/{luoyi11.mp3 => luoyi1.mp3} | Bin audio/skill/{luoyi12.mp3 => luoyi2.mp3} | Bin card/yibao.js | 2 +- character/gujian.js | 7 +- character/mountain.js | 4 +- character/refresh.js | 4 +- character/swd.js | 9 +- game/background.js | 44 +- game/config.js | 8 +- game/game.js | 915 +++++++++++++++++------- index.html | 1 + layout/default/blur.css | 1 + layout/default/fold2.css | 10 +- layout/default/layout.css | 262 +++++-- layout/default/menu.css | 12 +- layout/default/scrollbar.css | 2 +- layout/mobile/equip.css | 16 +- layout/mobile/layout.css | 3 +- layout/mode/boss.css | 3 +- layout/mode/chess.css | 3 + layout/newlayout/equip.css | 16 +- layout/newlayout/global.css | 24 +- layout/phone/layout.css | 2 +- main.js | 2 +- mode/chess.js | 115 +-- mode/guozhan.js | 1 + mode/identity.js | 3 +- theme/woodden/style.css | 3 +- 28 files changed, 1035 insertions(+), 437 deletions(-) rename audio/skill/{luoyi11.mp3 => luoyi1.mp3} (100%) rename audio/skill/{luoyi12.mp3 => luoyi2.mp3} (100%) diff --git a/audio/skill/luoyi11.mp3 b/audio/skill/luoyi1.mp3 similarity index 100% rename from audio/skill/luoyi11.mp3 rename to audio/skill/luoyi1.mp3 diff --git a/audio/skill/luoyi12.mp3 b/audio/skill/luoyi2.mp3 similarity index 100% rename from audio/skill/luoyi12.mp3 rename to audio/skill/luoyi2.mp3 diff --git a/card/yibao.js b/card/yibao.js index ddf5682b2..25e0fccd6 100755 --- a/card/yibao.js +++ b/card/yibao.js @@ -322,7 +322,7 @@ card.yibao={ var clone=event.card1.clone; if(clone){ clone.style.transition='all 0.5s'; - clone.style.webkitTransform='scale(1.2)'; + clone.style.transform='scale(1.2)'; clone.delete(); game.addVideo('deletenode',player,get.cardsInfo([clone])); } diff --git a/character/gujian.js b/character/gujian.js index 7ccd4d830..8c9a21c15 100755 --- a/character/gujian.js +++ b/character/gujian.js @@ -792,7 +792,12 @@ character.gujian={ }, ai:{ result:{ - player:1 + player:function(player){ + if(player.num('h')<=player.hp&&player.hp==player.maxHp){ + return 0; + } + return 1; + } }, order:6 } diff --git a/character/mountain.js b/character/mountain.js index f13579c34..494d6a389 100755 --- a/character/mountain.js +++ b/character/mountain.js @@ -967,7 +967,7 @@ character.mountain={ var mark=player.marks.huashen; if(trigger.name=='game'){ mark.hide(); - mark.style.webkitTransform='scale(0.8)'; + mark.style.transform='scale(0.8)'; mark.style.transition='all 0.3s'; setTimeout(function(){ mark.style.transition='all 0s'; @@ -979,7 +979,7 @@ character.mountain={ setTimeout(function(){ mark.style.transition=''; mark.show(); - mark.style.webkitTransform=''; + mark.style.transform=''; },50); },500); } diff --git a/character/refresh.js b/character/refresh.js index 3291cf922..9c698fe68 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -184,10 +184,8 @@ character.refresh={ trigger.finish(); "step 1" event.cards=get.cards(3); - event.dialog=ui.create.dialog('裸衣',event.cards); - game.delay(2); + player.showCards(event.cards,'裸衣'); "step 2" - event.dialog.close(); for(var i=0;i3||(att>1&&nh>2)){ + return ai.get.unuseful2(card); + } + return 0; + }; "step 1" if(result.bool){ // player.chooseToDiscard('h',true); diff --git a/game/background.js b/game/background.js index ae1150266..cd5bfaa88 100755 --- a/game/background.js +++ b/game/background.js @@ -16,15 +16,41 @@ bg.style.backgroundSize="cover"; switch (temp.image_background_filter){ - case 'blur':bg.style.webkitFilter='blur(8px)';bg.style.webkitTransform='scale(1.05)';break; - case 'gray':bg.style.webkitFilter='grayscale(1)';break; - case 'sepia':bg.style.webkitFilter='sepia(0.5)';break; - case 'invert':bg.style.webkitFilter='invert(1)';break; - case 'saturate':bg.style.webkitFilter='saturate(5)';break; - case 'contrast':bg.style.webkitFilter='contrast(1.4)';break; - case 'hue':bg.style.webkitFilter='hue-rotate(180deg)';break; - case 'brightness':bg.style.webkitFilter='brightness(5)';break; - default:bg.style.webkitFilter=''; + case 'blur': + bg.style.filter='blur(8px)'; + bg.style.webkitFilter='blur(8px)'; + bg.style.transform='scale(1.05)'; + break; + case 'gray': + bg.style.filter='grayscale(1)'; + bg.style.webkitFilter='grayscale(1)'; + break; + case 'sepia': + bg.style.filter='sepia(0.5)'; + bg.style.webkitFilter='sepia(0.5)'; + break; + case 'invert': + bg.style.filter='invert(1)'; + bg.style.webkitFilter='invert(1)'; + break; + case 'saturate': + bg.style.filter='saturate(5)'; + bg.style.webkitFilter='saturate(5)'; + break; + case 'contrast': + bg.style.filter='contrast(1.4)'; + bg.style.webkitFilter='contrast(1.4)'; + break; + case 'hue': + bg.style.filter='hue-rotate(180deg)'; + bg.style.webkitFilter='hue-rotate(180deg)'; + break; + case 'brightness': + bg.style.filter='brightness(5)'; + bg.style.webkitFilter='brightness(5)'; + break; + default: + bg.style.webkitFilter=''; } } window.resetGameTimeout=setTimeout(function(){ diff --git a/game/config.js b/game/config.js index c022233dd..e8d25aba8 100755 --- a/game/config.js +++ b/game/config.js @@ -3,7 +3,7 @@ window.config={ forbidsingle:['menghuo','huanggai','caoren','machao','pangde','yanwen','xiahoudun','xuzhu','luxun', 'xuhuang','yujin','xiaoqiao','daqiao','zhangjiao','zhangbao'], forbidall:['caocao','simayi','guanyu','zhangfei','zhaoyun','ganning','lvmeng','lvbu', - 'xiahouyuan','huangzhong','weiyan','dianwei','gongsunzan'], + 'xiahouyuan','huangzhong','weiyan','dianwei','gongsunzan','zhangjiao'], forbidversus:['swd_kangnalishi'], forbidstone:['zhugedan','pal_xuanxiao'], forbidchess:['hetaihou','swd_kangnalishi'], @@ -157,7 +157,6 @@ window.config={ show_auto_config:'显示托管按钮', show_volumn_config:'显示音量按钮', show_name_config:'显示角色名称', - auto_popped_config:'自动弹出菜单', ui_zoom_config:'界面缩放', no_ios_zoom_config:'禁止触屏缩放', show_stat_config:'显示战斗统计', @@ -196,7 +195,8 @@ window.config={ volumn_audio:8, config_menu:true, - auto_popped:true, + auto_popped_config:true, + auto_popped_history:false, auto_skill:true, auto_confirm:true, enable_drag:true, @@ -210,7 +210,7 @@ window.config={ theme:'woodden', - layout:'newlayout', + layout:'mobile', image_character:'default', image_background:'default', diff --git a/game/game.js b/game/game.js index a6e3351b9..a70123466 100755 --- a/game/game.js +++ b/game/game.js @@ -66,6 +66,11 @@ name:'不无懈自己', init:true, }, + touchscreen:{ + name:'触屏模式', + init:false, + restart:true + }, game_speed:{ name:'游戏速度', init:'mid', @@ -116,11 +121,6 @@ '2500':'2.5秒', } }, - touchscreen:{ - name:'触屏模式', - init:false, - restart:true - }, mousewheel:{ name:'滚轮控制手牌', init:true, @@ -193,11 +193,11 @@ }, layout:{ name:'布局', - init:'newlayout', + init:'mobile', item:{ default:'旧版', - newlayout:'默认', - mobile:'紧凑', + newlayout:'对称', + mobile:'默认', phone:'移动' }, onclick:function(layout){ @@ -234,12 +234,13 @@ unfrequent:true, init:'normal', item:{ - esmall:'极小', - vsmall:'很小', - small:'较小', - normal:'原始', - big:'较大', - vbig:'很大', + esmall:'80%', + vsmall:'90%', + small:'95%', + normal:'100%', + big:'105%', + vbig:'110%', + ebig:'120%', }, onclick:function(zoom){ game.saveConfig('ui_zoom',zoom); @@ -249,6 +250,7 @@ case 'small':ui.window.style.zoom=0.95;break; case 'big':ui.window.style.zoom=1.05;break; case 'vbig':ui.window.style.zoom=1.1;break; + case 'ebig':ui.window.style.zoom=1.2;break; default:ui.window.style.zoom=1; } } @@ -274,17 +276,43 @@ ui.background=ui.create.div('.background'); switch (lib.config.image_background_filter){ - case 'blur':ui.background.style.webkitFilter='blur(8px)'; - ui.background.style.webkitTransform='scale(1.05)';break; - case 'gray':ui.background.style.webkitFilter='grayscale(1)';break; - case 'sepia':ui.background.style.webkitFilter='sepia(0.5)';break; - case 'invert':ui.background.style.webkitFilter='invert(1)';break; - case 'saturate':ui.background.style.webkitFilter='saturate(5)';break; - case 'contrast':ui.background.style.webkitFilter='contrast(1.4)';break; - case 'hue':ui.background.style.webkitFilter='hue-rotate(180deg)';break; - case 'brightness':ui.background.style.webkitFilter='brightness(5)';break; - default:ui.background.style.webkitFilter=''; - ui.background.style.webkitTransform=''; + case 'blur': + ui.background.style.filter='blur(8px)'; + ui.background.style.webkitFilter='blur(8px)'; + ui.background.style.transform='scale(1.05)'; + break; + case 'gray': + ui.background.style.filter='grayscale(1)'; + ui.background.style.webkitFilter='grayscale(1)'; + break; + case 'sepia': + ui.background.style.filter='sepia(0.5)'; + ui.background.style.webkitFilter='sepia(0.5)'; + break; + case 'invert': + ui.background.style.filter='invert(1)'; + ui.background.style.webkitFilter='invert(1)'; + break; + case 'saturate': + ui.background.style.filter='saturate(5)'; + ui.background.style.webkitFilter='saturate(5)'; + break; + case 'contrast': + ui.background.style.filter='contrast(1.4)'; + ui.background.style.webkitFilter='contrast(1.4)'; + break; + case 'hue': + ui.background.style.filter='hue-rotate(180deg)'; + ui.background.style.webkitFilter='hue-rotate(180deg)'; + break; + case 'brightness': + ui.background.style.filter='brightness(5)'; + ui.background.style.webkitFilter='brightness(5)'; + break; + default: + ui.background.style.filter=''; + ui.background.style.webkitFilter=''; + ui.background.style.transform=''; } document.body.insertBefore(ui.background,document.body.firstChild); @@ -318,11 +346,16 @@ ui.click.sidebar.image_background(lib.config.image_background); }, }, - auto_popped:{ - name:'自动弹出菜单', + auto_popped_config:{ + name:'自动弹出选项', init:true, unfrequent:true, }, + auto_popped_history:{ + name:'自动弹出历史', + init:false, + unfrequent:true, + }, only_fullskin:{ name:'隐藏无全身皮肤武将', init:true, @@ -675,7 +708,8 @@ for(var i in localStorage){ data[i]=localStorage[i]; } - game.export(lib.init.encode(JSON.stringify(data)),'noname-data'); + game.export(lib.init.encode(JSON.stringify(data)), + '无名杀 - 数据 - '+(new Date()).toLocaleString()); }, clear:true } @@ -1731,7 +1765,7 @@ player.phaseUse(); "step 3" player.phaseDiscard() - game.delay(); + game.delayx(); }, phaseJudge:function(){ "step 0" @@ -2458,7 +2492,7 @@ game.delay(2); } else{ - game.delay(); + game.delayx(); } player.gain(event.cards); }, @@ -2473,7 +2507,7 @@ event.dialog=ui.create.dialog(str,cards); game.log(get.translation(player)+'展示了'+get.translation(cards)); game.addVideo('showCards',player,[str,get.cardsInfo(cards)]); - game.delay(2); + game.delayx(2); "step 1" event.dialog.close(); }, @@ -2492,7 +2526,7 @@ str+='、'+get.translation(cards[i]); } game.log(str); - game.delay(2); + game.delayx(2); game.addVideo('showCards',player,[event.str,get.cardsInfo(cards)]); "step 1" event.dialog.close(); @@ -2511,7 +2545,7 @@ setTimeout(function(){ event.dialog.close(); },2*lib.config.duration); - game.delay(2); + game.delayx(2); } } else{ @@ -2677,7 +2711,7 @@ } "step 5" if(document.getElementsByClassName('thrown').length){ - game.delay(); + game.delayx(); } else{ event.finish(); @@ -2816,7 +2850,7 @@ } "step 2" if(document.getElementsByClassName('thrown').length){ - if(event.skill&&get.info(event.skill).delay!==0) game.delay(); + if(event.skill&&get.info(event.skill).delay!==0) game.delayx(); } else{ event.finish(); @@ -2855,7 +2889,7 @@ if(event.animate!=false) player.$throw(cards,1000); event.trigger('discard'); "step 1" - if(event.delay!=false) game.delay(); + if(event.delay!=false) game.delayx(); }, respond:function(){ var cardaudio=true; @@ -2907,7 +2941,7 @@ event.finish(); } "step 1" - if(event.source) game.delay(); + if(event.source) game.delayx(); "step 2" if(player.getStat().gain==undefined){ player.getStat().gain=cards.length; @@ -2941,7 +2975,7 @@ }; if(event.animate=='draw'){ player.$draw(cards.length); - game.delay(1,500); + game.delayx(1,500); setTimeout(function(){ addv(); player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild); @@ -2951,7 +2985,7 @@ } else if(event.animate=='gain'){ player.$gain(cards); - game.delay(1,700); + game.delayx(1,700); setTimeout(function(){ addv(); player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild); @@ -2961,7 +2995,7 @@ } else if(event.animate=='gain2'||event.animate=='draw2'){ player.$gain2(cards); - game.delay(1,500); + game.delayx(1,500); setTimeout(function(){ addv(); player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild); @@ -3042,7 +3076,7 @@ next.content=info.onLose; next.player=player; next.card=cards[num]; - game.delay(); + game.delayx(); event.num++; event.goto(1); }, @@ -3130,7 +3164,7 @@ event.trigger('damage'); "step 1" if(player.hp<=0&&player.isAlive()){ - game.delay(); + game.delayx(); player.dying(event); } }, @@ -3160,7 +3194,7 @@ player.changeHp(-num); "step 1" if(player.hp<=0){ - game.delay(); + game.delayx(); player.dying(event); } }, @@ -3281,12 +3315,14 @@ player.classList.add('dead'); player.classList.remove('turnedover'); player.classList.remove('out'); - player.node.count.innerHTML=''; + player.node.count.innerHTML='0'; + player.node.hp.hide(); + player.node.equips.hide(); + player.node.count.hide(); player.previous.next=player.next; player.next.previous=player.previous; game.players.remove(player); game.dead.push(player); - if(player.dieAfter) player.dieAfter(source); if(lib.config.background_speak){ if(lib.character[player.name]&& lib.character[player.name][4].contains('die_audio')){ @@ -3312,11 +3348,16 @@ } } if(player==game.me&&!game.modeSwapPlayer){ - if(ui.auto) ui.auto.hide(); + _status.auto=false; + if(ui.auto){ + ui.auto.classList.remove('glow'); + ui.auto.hide(); + } if(ui.wuxie) ui.wuxie.hide(); } game.addVideo('diex',player); player.$die(source); + if(player.dieAfter) player.dieAfter(source); }, equip:function(){ "step 0" @@ -3350,7 +3391,7 @@ next.content=info.onEquip; next.player=player; next.card=card; - game.delay(); + game.delayx(); } delete player.equiping; }, @@ -3479,6 +3520,7 @@ this.node.avatar.show(); this.node.count.show(); + this.node.equips.show(); this.name=character; this.sex=info[0]; this.group=info[1]; @@ -3578,7 +3620,7 @@ this.node.intro.innerHTML=''; this.node.name.innerHTML=''; this.node.hp.innerHTML=''; - this.node.count.innerHTML=''; + this.node.count.innerHTML='0'; if(this.name2){ this.node.avatar2.hide(); delete this.name2; @@ -4663,7 +4705,7 @@ } next.content=lib.element.playerproto.respond; }, - directgain:function(cards){ + directgain:function(cards,animate){ var hs=this.get('h'); for(var i=0;i0){ - this.node.handcards1.appendChild(cards[i].animate('start')); + this.node.handcards1.appendChild(cards[i]); } else{ - this.node.handcards2.appendChild(cards[i].animate('start')); + this.node.handcards2.appendChild(cards[i]); } } if(!_status.video){ @@ -4868,6 +4913,11 @@ game.addVideo('revive',this); this.classList.remove('dead'); this.removeAttribute('style'); + this.node.avatar.style.transform=''; + this.node.avatar2.style.transform=''; + this.node.hp.show(); + this.node.equips.show(); + this.node.count.show(); this.update(); var player; player=this.previousSeat; @@ -5502,17 +5552,19 @@ 'calc(50% - 114px)','calc(50% - 52px)' ); node1.classList.add('infohidden'); - node1.style.webkitTransform='perspective(600px) rotateY(180deg) translateX(0)'; + node1.style.transform='perspective(600px) rotateY(180deg) translateX(0)'; setTimeout(function(){ setTimeout(function(){ node1.style.transition='all ease-in 0.3s'; - node1.style.webkitTransform='perspective(600px) rotateY(270deg) translateX(52px)'; - node1.addEventListener('webkitTransitionEnd',function(){ + node1.style.transform='perspective(600px) rotateY(270deg) translateX(52px)'; + var onEnd=function(){ node1.classList.remove('infohidden'); node1.classList.add('cardflip'); - node1.style.webkitTransform='none'; + node1.style.transform='none'; node1.style.transition=''; - }); + } + // node1.addEventListener('transitionEnd',onEnd); + node1.addEventListener('webkitTransitionEnd',onEnd); },600); @@ -5520,16 +5572,18 @@ 'calc(50% + 10px)','calc(50% - 52px)' ); node2.classList.add('infohidden'); - node2.style.webkitTransform='perspective(600px) rotateY(180deg) translateX(0)'; + node2.style.transform='perspective(600px) rotateY(180deg) translateX(0)'; setTimeout(function(){ node2.style.transition='all ease-in 0.3s'; - node2.style.webkitTransform='perspective(600px) rotateY(270deg) translateX(52px)'; - node2.addEventListener('webkitTransitionEnd',function(){ + node2.style.transform='perspective(600px) rotateY(270deg) translateX(52px)'; + var onEnd=function(){ node2.classList.remove('infohidden'); node2.classList.add('cardflip'); - node2.style.webkitTransform='none'; + node2.style.transform='none'; node2.style.transition=''; - }); + } + // node2.addEventListener('transitionEnd',onEnd); + node2.addEventListener('webkitTransitionEnd',onEnd); },700); },200); @@ -5569,7 +5623,7 @@ node.hide(); node.style.transitionProperty='left,top,opacity'; if(transform){ - node.style.webkitTransform='rotate('+(Math.random()*16-8)+'deg)'; + node.style.transform='rotate('+(Math.random()*16-8)+'deg)'; } ui.arena.appendChild(node); ui.refresh(node); @@ -5645,7 +5699,7 @@ node.hide(); node.style.transitionProperty='left,top,opacity'; - node.style.webkitTransform='rotate('+(Math.random()*16-8)+'deg)'; + node.style.transform='rotate('+(Math.random()*16-8)+'deg)'; ui.arena.appendChild(node); ui.refresh(node); @@ -5744,13 +5798,13 @@ node.fixed=true; node.style.left='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*100+'px)'; node.style.top='calc(50% - 52px '+((Math.random()-0.5<0)?'+':'-')+' '+Math.random()*100+'px)'; - node.style.webkitTransform='scale(0)'; + node.style.transform='scale(0)'; var player=this; node.hide(); ui.arena.appendChild(node); ui.refresh(node); node.show(); - node.style.webkitTransform=''; + node.style.transform=''; setTimeout(function(){ node.moveTo(player).delete(); },700); @@ -5763,7 +5817,7 @@ var list=[],list2=[]; for(var i=0;i0.3){ cards[i].clone.moveTo(this).delete(); list2.push(cards[i].clone); } @@ -5924,43 +5978,42 @@ if(source.offsetTop-this.offsetTop>0) top=-top; if(lib.isMobileMe(this)){ if(this.isLinked()){ - this.node.avatar.style.webkitTransform='translate('+left+'px,'+top+'px) rotate(-90deg)'; - this.node.avatar2.style.webkitTransform='translate('+left+'px,'+top+'px) rotate(-90deg)'; + this.node.avatar.style.transform='translate('+left+'px,'+top+'px) rotate(-90deg)'; + this.node.avatar2.style.transform='translate('+left+'px,'+top+'px) rotate(-90deg)'; } else{ - this.node.avatar.style.webkitTransform='translate('+left+'px,'+top+'px)'; - this.node.avatar2.style.webkitTransform='translate('+left+'px,'+top+'px)'; + this.node.avatar.style.transform='translate('+left+'px,'+top+'px)'; + this.node.avatar2.style.transform='translate('+left+'px,'+top+'px)'; } } else if(this.isLinked()&&lib.isNewLayout()){ - this.style.webkitTransform='translate('+left+'px,'+top+'px) rotate(-90deg)'; + this.style.transform='translate('+left+'px,'+top+'px) rotate(-90deg)'; } else{ - this.style.webkitTransform='translate('+left+'px,'+top+'px)'; + this.style.transform='translate('+left+'px,'+top+'px)'; } } else{ if(lib.isMobileMe(this)){ if(this.isLinked()){ - this.node.avatar.style.webkitTransform='scale(0.9) rotate(-90deg)'; - this.node.avatar2.style.webkitTransform='scale(0.9) rotate(-90deg)'; + this.node.avatar.style.transform='scale(0.9) rotate(-90deg)'; + this.node.avatar2.style.transform='scale(0.9) rotate(-90deg)'; } else{ - this.node.avatar.style.webkitTransform='scale(0.9)'; - this.node.avatar2.style.webkitTransform='scale(0.9)'; + this.node.avatar.style.transform='scale(0.9)'; + this.node.avatar2.style.transform='scale(0.9)'; } } else if(this.isLinked()&&lib.isNewLayout()){ - this.style.webkitTransform='scale(0.95) rotate(-90deg)'; + this.style.transform='scale(0.95) rotate(-90deg)'; } else{ - this.style.webkitTransform='scale(0.95)'; + this.style.transform='scale(0.95)'; } } this.queue(); }, $die:function(){ - if(lib.isMobileMe(this)) return; game.addVideo('die',this); var top0=ui.window.offsetHeight/2; var left0=ui.window.offsetWidth/2; @@ -5969,9 +6022,20 @@ var top=Math.abs(50/Math.sqrt(1+ratio*ratio)); if(left0-this.offsetLeft>0) left=-left; if(top0-this.offsetTop>0) top=-top; - this.style.webkitTransform='translate('+left+'px,'+top+'px) '+ + if(lib.isMobileMe(this)){ + left=-Math.random()*5-10; + top=Math.random()*5+10; + } + var transform='translate('+left+'px,'+top+'px) '+ 'rotate('+(Math.random()*20-10)+'deg) '+ ((Math.random()-0.5<0)?'rotateX(180deg)':'rotateY(180deg)'); + if(lib.isMobileMe(this)){ + this.node.avatar.style.transform=transform; + this.node.avatar2.style.transform=transform; + } + else{ + this.style.transform=transform; + } this.queue(false); }, $phaseJudge:function(card){ @@ -6089,11 +6153,11 @@ this.dataset.position=player.dataset.position; if(method=='flip'){ this.style.transition='all 0.5s'; - this.style.webkitTransform='rotate'+(Math.random()<0.5?'X':'Y')+'(180deg) perspective(1000px)'; + this.style.transform='rotate'+(Math.random()<0.5?'X':'Y')+'(180deg) perspective(1000px)'; } else if(method=='rotate'){ this.style.transition='all 0.5s'; - this.style.webkitTransform='rotate(180deg)'; + this.style.transform='rotate(180deg)'; } return this; }, @@ -6993,6 +7057,9 @@ downloadLink.click(); }, playVideo:function(time,mode){ + if(!_status.replayvideo){ + localStorage.setItem(lib.configprefix+'playbackmode',lib.config.mode); + } game.saveConfig('mode',mode); localStorage.setItem(lib.configprefix+'playback',time); game.reload(); @@ -7041,9 +7108,20 @@ } ui.system.firstChild.innerHTML=''; ui.system.lastChild.innerHTML=''; + ui.system.firstChild.appendChild(ui.config2); + if(ui.updateVideoMenu){ + ui.updateVideoMenu(); + } _status.videoDuration=1; - ui.create.system('返回',game.reload); + ui.create.system('返回',function(){ + var mode=localStorage.getItem(lib.configprefix+'playbackmode'); + if(mode){ + game.saveConfig('mode',mode); + } + game.reload(); + }); ui.create.system('重播',function(){ + _status.replayvideo=true; game.playVideo(_status.playback,lib.config.mode); }); ui.create.system('暂停',ui.click.pause,true); @@ -7229,19 +7307,39 @@ if(Array.isArray(num)){ num=get.infoCards(num); } - player.$gainmod(num); + if(player&&player.$gainmod){ + player.$gainmod(num); + } + else{ + console.log(player); + } }, moveTo:function(player,pos){ - player.moveTo(pos[0],pos[1]); + if(player&&player.moveTo&&pos){ + player.moveTo(pos[0],pos[1]); + } + else{ + console.log(player) + } }, moveTox:function(player,pos){ - delete lib.posmap[player.dataset.position]; - player.dataset.position=pos; - lib.posmap[pos]=player; - game.delay(); + if(player&&player.dataset){ + delete lib.posmap[player.dataset.position]; + player.dataset.position=pos; + lib.posmap[pos]=player; + game.delay(); + } + else{ + console.log(player); + } }, chessFocus:function(player){ - player.chessFocus(); + if(player){ + player.chessFocus(); + } + else{ + console.log('chessFocus'); + } }, stonePosition:function(content){ var player=game.playerMap[content[0]]; @@ -7250,6 +7348,9 @@ player.dataset.position=content[1]; game.playerMap[content[1]]=player; } + else{ + console.log(content); + } }, stoneSwap:function(info){ var player=ui.create.player(); @@ -7264,10 +7365,35 @@ game.playerMap[player.dataset.position]=player; game.arrangePlayers(); }, + chess_tongshuai:function(player,content){ + if(player&&player.storage){ + player.storage.tongshuai.owned=content; + } + else{ + console.log(player); + } + }, + chess_tongshuai_skill:function(player,content){ + if(player&&content){ + if(player.marks.tongshuai.firstChild){ + player.marks.tongshuai.firstChild.remove(); + } + player.marks.tongshuai.setBackground(content[0],'character'); + player.additionalSkills.tongshuai=content[1]; + } + else{ + console.log(player); + } + }, reinit:function(source,content){ - source.uninit(); - source.init(content[0]); - source.node.identity.dataset.color=content[1]; + if(source&&content){ + source.uninit(); + source.init(content[0]); + source.node.identity.dataset.color=content[1]; + } + else{ + console.log(source); + } }, skill:function(player,content){ if(typeof content=='string'){ @@ -7276,102 +7402,175 @@ else if(Array.isArray(content)){ lib.skill[content[0]].video(player,content[1]); } + else{ + console.log(player,content) + } }, addFellow:function(content){ var player=game.addFellow(content[0],content[1]); game.playerMap[player.dataset.position]=player; }, updateActCount:function(player,content){ - player.updateActCount(content[0],content[1],content[2]); + if(player&&content){ + player.updateActCount(content[0],content[1],content[2]); + } + else{ + console.log(player); + } }, showCharacter:function(player,num){ - switch(num){ - case 0: - player.classList.remove('unseen'); - break; - case 1: - player.classList.remove('unseen2'); - break; - case 2: - player.classList.remove('unseen'); - player.classList.remove('unseen2'); - break; + if(player&&player.classList){ + switch(num){ + case 0: + player.classList.remove('unseen'); + break; + case 1: + player.classList.remove('unseen2'); + break; + case 2: + player.classList.remove('unseen'); + player.classList.remove('unseen2'); + break; + } + } + else{ + console.log(num); } }, popup:function(player,info){ - player.popup(info[0],info[1]); + if(player&&info){ + player.popup(info[0],info[1]); + } + else{ + console.log(player); + } }, log:function(str){ game.log(str); }, draw:function(player,info){ - player.$draw(info); + if(player&&player.$draw){ + player.$draw(info); + } + else{ + console.log(player); + } }, drawCard:function(player,info){ - player.$draw(get.infoCards(info)); + if(player&&info){ + player.$draw(get.infoCards(info)); + } + else{ + console.log(player); + } }, throw:function(player,info){ - player.$throw(get.infoCards(info[0]),info[1]); + if(player&&info){ + player.$throw(get.infoCards(info[0]),info[1]); + } + else{ + console.log(player); + } }, compare:function(player,info){ - player.$compare(get.infoCard(info[0]),game.playerMap[info[1]],get.infoCard(info[2])); + if(player&&info){ + player.$compare(get.infoCard(info[0]),game.playerMap[info[1]],get.infoCard(info[2])); + } + else{ + console.log(player); + } }, give:function(player,info){ - player.$give(info[0],game.playerMap[info[1]]); + if(player&&info){ + player.$give(info[0],game.playerMap[info[1]]); + } + else{ + console.log(player); + } }, giveCard:function(player,info){ - player.$give(get.infoCards(info[0]),game.playerMap[info[1]]); + if(player&&info){ + player.$give(get.infoCards(info[0]),game.playerMap[info[1]]); + } + else{ + console.log(player); + } }, gain:function(player,info){ - player.$gain(info); + if(player&&player.$gain){ + player.$gain(info); + } + else{ + console.log(player); + } }, gainCard:function(player,info){ - player.$gain(get.infoCards(info)); + if(player&&info){ + player.$gain(get.infoCards(info)); + } + else{ + console.log(player); + } }, gain2:function(player,cards){ - var nodeList=document.querySelectorAll('#arena>.card,#chess>.card'); - var nodes=[]; - for(var i=0;i.card,#chess>.card'); + var nodes=[]; + for(var i=0;i.card,#chess>.card'); - var nodes=[]; - for(var i=0;i.card,#chess>.card'); + var nodes=[]; + for(var i=0;i0;i--){ if(player.node.handcards1.childNodes[i].classList.contains('removing')==false){ player.node.handcards1.childNodes[i].animate('last'); @@ -7561,26 +7869,41 @@ } }, link:function(player,bool){ - if(bool){ - player.classList.add('linked'); + if(player&&player.classList){ + if(bool){ + player.classList.add('linked'); + } + else{ + player.classList.remove('linked'); + } } else{ - player.classList.remove('linked'); + console.log(player); } }, turnOver:function(player,bool){ - if(bool){ - player.classList.add('turnedover'); + if(player&&player.classList){ + if(bool){ + player.classList.add('turnedover'); + } + else{ + player.classList.remove('turnedover'); + } } else{ - player.classList.remove('turnedover'); + console.log(player); } }, showCards:function(player,info){ - var dialog=ui.create.dialog(info[0],get.infoCards(info[1])); - setTimeout(function(){ - dialog.close(); - },1000); + if(info){ + var dialog=ui.create.dialog(info[0],get.infoCards(info[1])); + setTimeout(function(){ + dialog.close(); + },1000); + } + else{ + console.log(player); + } }, cardDialog:function(content){ if(Array.isArray(content)){ @@ -7606,6 +7929,10 @@ swapSeat:function(content){ var player1=game.playerMap[content[0]]; var player2=game.playerMap[content[1]]; + if(!player1||!player2){ + console.log(content); + return; + } var temp1,pos,i,num; temp1=player1.dataset.position; player1.dataset.position=player2.dataset.position; @@ -7633,56 +7960,66 @@ } }, swapControl:function(player,hs){ - var cards=get.infoCards(hs); - player.node.handcards1.innerHTML=''; - player.node.handcards2.innerHTML=''; - player.directgain(cards); + if(player&&player.node){ + var cards=get.infoCards(hs); + player.node.handcards1.innerHTML=''; + player.node.handcards2.innerHTML=''; + player.directgain(cards,false); - game.me.node.handcards1.delete(); - game.me.node.handcards2.delete(); - game.me=player; - ui.handcards1=player.node.handcards1.animate('start').fix(); - ui.handcards2=player.node.handcards2.animate('start').fix(); - ui.me.appendChild(ui.handcards1); - ui.me.appendChild(ui.handcards2); + game.me.node.handcards1.delete(); + game.me.node.handcards2.delete(); + game.me=player; + ui.handcards1=player.node.handcards1.animate('start').fix(); + ui.handcards2=player.node.handcards2.animate('start').fix(); + ui.me.appendChild(ui.handcards1); + ui.me.appendChild(ui.handcards2); - ui.updateh(true); - if(lib.config.mode=='chess'){ - ui.create.fakeme(); + ui.updateh(true); + if(lib.config.mode=='chess'){ + ui.create.fakeme(); + } + } + else{ + console.log(player); } }, onSwapControl:function(){ game.onSwapControl(); }, swapPlayer:function(player,hs){ - var cards=get.infoCards(hs); - player.node.handcards1.innerHTML=''; - player.node.handcards2.innerHTML=''; - player.directgain(cards); + if(player&&player.node){ + var cards=get.infoCards(hs); + player.node.handcards1.innerHTML=''; + player.node.handcards2.innerHTML=''; + player.directgain(cards,false); - var pos=parseInt(player.dataset.position); - var num=game.players.length+game.dead.length; - var players=game.players.concat(game.dead); - var temp; - for(var i=0;i + diff --git a/layout/default/blur.css b/layout/default/blur.css index 3ff6c297f..a5af81129 100755 --- a/layout/default/blur.css +++ b/layout/default/blur.css @@ -1,3 +1,4 @@ #arena.paused,#arena.right{ + filter:blur(3px); -webkit-filter:blur(3px); } diff --git a/layout/default/fold2.css b/layout/default/fold2.css index 09ebd0a9e..41b826f0d 100755 --- a/layout/default/fold2.css +++ b/layout/default/fold2.css @@ -1,14 +1,14 @@ -#me>[data-fold='1']>.card:not(.selected){margin-right: -30px;-webkit-transform:perspective(1000px) rotateY(30deg);} -#me>[data-fold='2']>.card:not(.selected){margin-right: -38px;-webkit-transform:perspective(1000px) rotateY(38deg);} -#me>[data-fold='3']>.card:not(.selected){margin-right: -45px;-webkit-transform:perspective(1000px) rotateY(45deg);} +#me>[data-fold='1']>.card:not(.selected){margin-right: -30px;transform:perspective(1000px) rotateY(30deg);} +#me>[data-fold='2']>.card:not(.selected){margin-right: -38px;transform:perspective(1000px) rotateY(38deg);} +#me>[data-fold='3']>.card:not(.selected){margin-right: -45px;transform:perspective(1000px) rotateY(45deg);} #me>[data-fold='1']>.card:not(.selected):hover, #me>[data-fold='2']>.card:not(.selected):hover, -#me>[data-fold='3']>.card:not(.selected):hover{margin-right: -8px;-webkit-transform:perspective(1000px) rotateY(0);} +#me>[data-fold='3']>.card:not(.selected):hover{margin-right: -8px;transform:perspective(1000px) rotateY(0);} #me>[data-fold='1']>.card.start, #me>[data-fold='2']>.card.start, -#me>[data-fold='3']>.card.start{-webkit-transform:none;} +#me>[data-fold='3']>.card.start{transform:none;} #me>div>.card:last-child{margin-right: -8px;} #me>div>.card.last{margin-right: -8px;} diff --git a/layout/default/layout.css b/layout/default/layout.css index 372ecace1..07abf9f91 100755 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -1,5 +1,9 @@ /*--------标签--------*/ -html{width: 100%;height: 100%;font-size: 16px;cursor: default;overflow: hidden;-webkit-user-select:none;-webkit-font-smoothing: subpixel-antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);} +html{width: 100%;height: 100%;font-size: 16px;cursor: default;overflow: hidden; + -ms-user-select:none; + -moz-user-select:none; + -webkit-user-select:none; + -webkit-font-smoothing: subpixel-antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0);} body{width: 100%;height: 100%;padding: 0; margin: 0;text-rendering:optimizeLegibility;font-family:'STHeiti','SimHei','Microsoft JhengHei','Microsoft YaHei','WenQuanYi Micro Hei',Helvetica,Arial,sans-serif} div{display: inline-block;position: absolute;transition: all 0.5s;} table{table-layout: fixed;} @@ -52,28 +56,43 @@ table{table-layout: fixed;} #scrollzone3{right: calc(50% - 140px);} #scrollzone4{right: 0;} .scrollzone{width: 20px;height: 140px;} -body>.background.paused{-webkit-filter:blur(3px);} +body>.background.paused{ + filter:blur(3px); + -webkit-filter:blur(3px); +} body>.background{z-index:-2} .popup{padding: 5px;} .removing,.hidden{opacity: 0 !important;} #system>div>div.hidden{opacity:0.5 !important;} .transparent{opacity: 0.3 !important;} -.out{opacity: 0.3 !important;-webkit-filter:blur(3px)} -.blur{-webkit-filter:blur(3px) !important;} -.blur2{-webkit-filter:blur(6px) !important;} -.zoomin{-webkit-transform: scale(1.05) !important;} -.zoomout{-webkit-transform: scale(0.95) !important;} -.zoomin2{-webkit-transform: scale(2) !important;} -.zoomin3{-webkit-transform: scale(3) !important;} -.zoomout2{-webkit-transform: scale(0.5) !important;} -.zoomout3{-webkit-transform: scale(0.3) !important;} -.rotateleft{-webkit-transform: rotate(-3deg) !important;} -.rotateright{-webkit-transform: rotate(3deg) !important;} +.out{opacity: 0.3 !important; + filter:blur(3px); + -webkit-filter:blur(3px) +} +.blur{ + filter:blur(3px) !important; + -webkit-filter:blur(3px) !important; +} +.blur2{ + filter:blur(6px) !important; + -webkit-filter:blur(6px) !important; +} +.zoomin{transform: scale(1.05) !important;} +.zoomout{transform: scale(0.95) !important;} +.zoomin2{transform: scale(2) !important;} +.zoomin3{transform: scale(3) !important;} +.zoomout2{transform: scale(0.5) !important;} +.zoomout3{transform: scale(0.3) !important;} +.rotateleft{transform: rotate(-3deg) !important;} +.rotateright{transform: rotate(3deg) !important;} .exclude{opacity: 0.6 !important;} -.button.buttonclick{-webkit-animation:buttonclick 0.8s} +.button.buttonclick{ + animation:buttonclick 0.8s; + -webkit-animation:buttonclick 0.8s +} .background{width: 100%;height: 100%;left:0;top: 0;margin: 0;padding:0;display: inline-block !important;} .background2{width: 90%;height: 90%;left:5%;top: 5%;margin: 0;padding:0;display: inline-block !important;} -.background,.button,.avatar,.avatar2{transition-property: top,box-shadow,opacity,-webkit-transform;transition-duration:0.5s;} +.background,.button,.avatar,.avatar2{transition-property: top,box-shadow,opacity,transform;transition-duration:0.5s;} .intro{width: 20px;height: 20px;} #systembutton{ @@ -103,9 +122,11 @@ body>.background{z-index:-2} display:none !important; } .card.cardflip{ + animation:cardflip 0.3s ease-out; -webkit-animation:cardflip 0.3s ease-out; } .player.playerflip{ + animation:playerflip 0.3s ease-out; -webkit-animation:playerflip 0.3s ease-out; } .button.card.button>.intro{top:69px;} @@ -113,16 +134,16 @@ body>.background{z-index:-2} zoom:0.65 } .buttons .card.button>.name{ - -webkit-transform:scale(0.8); - -webkit-transform-origin:top left; + transform:scale(0.8); + transform-origin:top left; } .buttons .card.button>.info{ - -webkit-transform:scale(0.8); - -webkit-transform-origin:top right; + transform:scale(0.8); + transform-origin:top right; } .buttons .card.button>.addinfo{ - -webkit-transform:scale(0.8); - -webkit-transform-origin:bottom left; + transform:scale(0.8); + transform-origin:bottom left; } .card.center{top:calc(50% - 52px);left:calc(50% - 52px);} .card>.background{font-size: 80px;height: 80px;padding-top: 14px;text-align: center;} @@ -149,7 +170,7 @@ body>.background{z-index:-2} box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px; border-radius:6px; transition: all 0.3s; - -webkit-animation:none; + animation:dialog_start2 0.2s; -webkit-animation:dialog_start2 0.2s; transition-property:opacity; } @@ -238,10 +259,19 @@ margin-bottom: 5px; .player.controlfakeme>.avatar{width: 100%;height: 100%;box-shadow: none;left: 0;top: 0} .player{z-index: 4;width: 240px;height: 120px;} .player.minskin{width:120px;} -.player.replaceme{-webkit-animation:replaceme 0.5s} -.player.replaceenemy{-webkit-animation:replaceenemy 0.5s} +.player.replaceme{ + animation:replaceme 0.5s; + -webkit-animation:replaceme 0.5s +} +.player.replaceenemy{ + animation:replaceenemy 0.5s; + -webkit-animation:replaceenemy 0.5s +} .player>div{z-index: 2;} -.player.dead,.player.likedead{z-index: 1;-webkit-filter:grayscale(1);} +.player.dead,.player.likedead{z-index: 1; + filter:grayscale(1); + -webkit-filter:grayscale(1); +} .player>.name{left: 18px;top:36px;font-family: 'huangcao';font-size:20px} .player>.intro{top:87px;left: 18px;} .player>.damage{ @@ -252,17 +282,17 @@ margin-bottom: 5px; top:calc(50% - 36px); left:0; opacity: 0; - -webkit-transform:scale(0.7); + transform:scale(0.7); } .player>.damage.damageadded{ opacity: 1; - -webkit-transform:scale(1); + transform:scale(1); } .player.linked>.damage{ - -webkit-transform:scale(0.7) rotate(90deg); + transform:scale(0.7) rotate(90deg); } .player.linked>.damage.damageadded{ - -webkit-transform:scale(1) rotate(90deg); + transform:scale(1) rotate(90deg); } .avatar{width: 96px;height: 96px;left: 12px;top: 12px;overflow: hidden;} .avatar2{width: 42px;height: 42px;top: 70px;left: 70px;overflow: hidden;} @@ -275,8 +305,16 @@ margin-bottom: 5px; .equips>.equip5{top: calc(50% - 21px);left:calc(50% - 21px);border-radius: 21px;z-index: 1} .equips>div>div:not(.image),.judges>div>div:not(.image),.marks>div>div:not(.image){display: none;} .equips>div>.image,.judges>div>.image,.marks>div>.image{width:120%;height:120%;left:-20%;top:-20%;} -.equips>div:hover>.info{display: inline-block;-webkit-animation:equip_hover 1s;left: 0;right: auto;width: 42px;text-align: center;} -.equips>div:hover>.background {-webkit-animation:equip_hover2 1s;-webkit-animation-fill-mode: forwards;} +.equips>div:hover>.info{display: inline-block; + animation:equip_hover 1s; + -webkit-animation:equip_hover 1s; + left: 0;right: auto;width: 42px;text-align: center;} +.equips>div:hover>.background { + animation:equip_hover2 1s; + animation-fill-mode: forwards; + -webkit-animation:equip_hover2 1s; + -webkit-animation-fill-mode: forwards; +} .judges{height: 24px;left: 14px;top: -18px;} .marks{height: 24px;left: 14px;top: 112px;} .judges>div,.marks>div{width: 24px;height: 24px;margin-left: 0;margin-top: 0;margin-right: 4px;opacity: 1;} @@ -288,6 +326,7 @@ margin-bottom: 5px; border-radius: 100%; box-shadow: rgba(0,0,0,0.2) 1px -1px 2px inset,rgba(255,255,255,0.15) -1px 1px 5px inset; position: relative; + filter: brightness(1.5); -webkit-filter: brightness(1.5); transition: all 0.5s; } @@ -317,11 +356,13 @@ margin-bottom: 5px; .hp.actcount>.lost{ background: rgba(63, 119, 173,1); border: 1px solid rgba(31, 82, 131, 1); + filter: grayscale(1); -webkit-filter: grayscale(1); } .hp>.lost{ background: rgba(57, 123, 4,1); border: 1px solid rgba(39, 79, 7, 1); + filter: grayscale(1); -webkit-filter: grayscale(1); } .hp.text[data-condition="low"]{ @@ -345,11 +386,11 @@ margin-bottom: 5px; .identity{text-align: center;width: 22px;height: 22px;} .identity>div{position: relative;top: 2px;} .unseen>.avatar,.unseen>.name,.unseen2>.avatar2{opacity: 0 !important;} -.linked>.avatar,.linked>.avatar2{-webkit-transform:rotate(-90deg);} +.linked>.avatar,.linked>.avatar2{transform:rotate(-90deg);} .linked>.avatar2{top: 5px;} .linked>.identity{top: 88px;} .linked>.count{right: 154px;} -.acted>.identity{-webkit-transform:rotate(180deg);} +.acted>.identity{transform:rotate(180deg);} /*--------位置(8人)------*/ [data-number='8']>.player[data-position='1']{top:calc(200% / 3 - 90px);left:calc(100% - 240px);} @@ -447,23 +488,62 @@ margin-bottom: 5px; .card[data-position='0']{top:calc(100% - 130px);left:calc(50% - 52px);} .popup[data-position='0']{top:calc(100% - 176px);left:calc(50% - 106px);} /*--------动画--------*/ -.start,.equips>.card,.judges>.card,.marks>.card,.popup{-webkit-animation: game_start 0.5s;} -.dialog{-webkit-animation: dialog_start 0.5s;} -.dialog.noslide{-webkit-animation: dialog_start2 0.5s;transition-property:opacity,background,box-shadow} +.start,.equips>.card,.judges>.card,.marks>.card,.popup{ + animation: game_start 0.5s; + -webkit-animation: game_start 0.5s; +} +.dialog{ + animation: dialog_start 0.5s; + -webkit-animation: dialog_start 0.5s; +} +.dialog.noslide{ + animation: dialog_start2 0.5s; + -webkit-animation: dialog_start2 0.5s; + transition-property:opacity,background,box-shadow +} .dialog.removing{top: 100px} -.card.drawing{-webkit-animation: drawing 1s; -webkit-animation-fill-mode: forwards;} +.card.drawing{ + animation: drawing 1s; + animation-fill-mode: forwards; + -webkit-animation: drawing 1s; + -webkit-animation-fill-mode: forwards; +} .card.thrown{position: absolute;opacity: 1;margin:0} -.card.start{-webkit-animation: card_start 0.5s;} -.card.judgestart{-webkit-animation: card_judgestart 1s;} -#me>div>.card.start{-webkit-animation: card_start2 0.5s;} -.card.removing{-webkit-transform:scale(0);} +.card.start{ + animation: card_start 0.5s; + -webkit-animation: card_start 0.5s; +} +.card.judgestart{ + animation: card_judgestart 1s; + -webkit-animation: card_judgestart 1s; +} +#me>div>.card.start{ + animation: card_start2 0.5s; + -webkit-animation: card_start2 0.5s; +} +.card.removing{transform:scale(0);} #me>div>.card.removing{margin-left: -52px;margin-right: -52px;} -.card.thrown.removing{width: 104px;height: 104px;-webkit-transform:none} -#sidebar.sidebar{-webkit-animation:sidebar 0.5s} -.button.zoom{-webkit-animation:zoom_button 0.5s} -.content>.config.start{-webkit-animation:config 0.5s;} -.flash{-webkit-animation:flash 1s;} -.flip{-webkit-animation:flip 1s;} +.card.thrown.removing{width: 104px;height: 104px;transform:none} +#sidebar.sidebar{ + animation:sidebar 0.5s; + -webkit-animation:sidebar 0.5s +} +.button.zoom{ + animation:zoom_button 0.5s; + -webkit-animation:zoom_button 0.5s +} +.content>.config.start{ + animation:config 0.5s; + -webkit-animation:config 0.5s; +} +.flash{ + animation:flash 1s; + -webkit-animation:flash 1s; +} +.flip{ + animation:flip 1s; + -webkit-animation:flip 1s; +} /*--------样式--------*/ #arena.selecting:not(.video) .player[data-position='0'] .card:not(.selectable)>.background, #arena.selecting:not(.video) .player[data-position='0'] .card:not(.selectable)>.image, @@ -530,14 +610,14 @@ div:hover>.intro{opacity: 1;} .dialog.scroll2{box-shadow:0 10px 10px -9px rgba(0,0,0,0.1),0 10px 0 -9px rgba(0,0,0,0.05)} .dialog.scroll1.scroll2{box-shadow:0 -10px 10px -9px rgba(0,0,0,0.1),0 -10px 0 -9px rgba(0,0,0,0.05), 0 10px 10px -9px rgba(0,0,0,0.1),0 10px 0 -9px rgba(0,0,0,0.05);}*/ -.selected,.target{/*-webkit-transform: scale(1.05);*/} -.target{-webkit-transform: rotate(-3deg);} -.target2{-webkit-transform: rotate(3deg);} +.selected,.target{/*transform: scale(1.05);*/} +.target{transform: rotate(-3deg);} +.target2{transform: rotate(3deg);} .content>.config.line2{ - -webkit-transform:translateX(-5px); + transform:translateX(-5px); } #sidebar2>.config:not(.line2){ - -webkit-transform:translateX(5px); + transform:translateX(5px); } .popup{ background: rgba(0,0,0,0.2); @@ -599,6 +679,7 @@ div:hover>.intro{opacity: 1;} top:0; } .player .identity.animate{ + animation:identity 0.8s; -webkit-animation:identity 0.8s; } .player .identity[data-color="zhu"], @@ -763,6 +844,7 @@ div[data-color="unknownm"]{ height:12px; margin-left:4px; margin-bottom: 3px; + animation:game_start 0.5s; -webkit-animation:game_start 0.5s; } .player .wunature{ @@ -820,6 +902,14 @@ div[data-color="unknownm"]{ } /*--------动画--------*/ +@keyframes control_glow{ + 0%{box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px} + 30%{box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px} + 70%{box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px} + 100%{box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px} + /*from{box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px !important;} + to{box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px !important}*/ +} @-webkit-keyframes control_glow{ 0%{box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px} 30%{box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px} @@ -828,36 +918,70 @@ div[data-color="unknownm"]{ /*from{box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(10, 155, 67, 1) 0 0 15px, rgba(10, 155, 67, 1) 0 0 15px !important;} to{box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(0, 0, 0, 0.45) 0 3px 10px !important}*/ } +@keyframes cardflip{ + from {transform:perspective(600px) rotateY(-90deg) translateX(52px)} + to{transform:perspective(600px) rotateY(0deg) translateX(0)} +} @-webkit-keyframes cardflip{ - from {-webkit-transform:perspective(600px) rotateY(-90deg) translateX(52px)} - to{-webkit-transform:perspective(600px) rotateY(0deg) translateX(0)} + from {transform:perspective(600px) rotateY(-90deg) translateX(52px)} + to{transform:perspective(600px) rotateY(0deg) translateX(0)} +} +@keyframes playerflip{ + from {transform:perspective(1200px) rotateY(-90deg) translateX(150px)} + to{transform:perspective(1200px) rotateY(0deg) translateX(0)} +} +@keyframes playerflip{ + from {transform:perspective(1200px) rotateY(-90deg) translateX(150px)} + to{transform:perspective(1200px) rotateY(0deg) translateX(0)} } @-webkit-keyframes playerflip{ - from {-webkit-transform:perspective(1200px) rotateY(-90deg) translateX(150px)} - to{-webkit-transform:perspective(1200px) rotateY(0deg) translateX(0)} + from {transform:perspective(1200px) rotateY(-90deg) translateX(150px)} + to{transform:perspective(1200px) rotateY(0deg) translateX(0)} } +@keyframes game_start{from {opacity: 0;}} @-webkit-keyframes game_start{from {opacity: 0;}} +@keyframes equip_hover{0% {opacity: 0;}50% {opacity: 0;}} @-webkit-keyframes equip_hover{0% {opacity: 0;}50% {opacity: 0;}} -@-webkit-keyframes buttonclick{0% {-webkit-transform: scale(1);}50% {-webkit-transform: scale(0.9);}} +@keyframes buttonclick{0% {transform: scale(1);}50% {transform: scale(0.9);}} +@-webkit-keyframes buttonclick{0% {transform: scale(1);}50% {transform: scale(0.9);}} +@keyframes equip_hover2{0% {}50% {opacity: 0.6}100%{opacity: 0.3}} @-webkit-keyframes equip_hover2{0% {}50% {opacity: 0.6}100%{opacity: 0.3}} +@keyframes dialog_start{from {opacity: 0;top:100px;}} @-webkit-keyframes dialog_start{from {opacity: 0;top:100px;}} -@-webkit-keyframes dialog_start2{from {opacity: 0;-webkit-transform:scale(0.8);}} -@-webkit-keyframes replaceme{from {opacity: 0;-webkit-transform:translateY(120px)}} -@-webkit-keyframes replaceenemy{from {opacity: 0;-webkit-transform:translateY(-120px)}} +@keyframes dialog_start2{from {opacity: 0;transform:scale(0.8);}} +@-webkit-keyframes dialog_start2{from {opacity: 0;transform:scale(0.8);}} +@keyframes replaceme{from {opacity: 0;transform:translateY(120px)}} +@-webkit-keyframes replaceme{from {opacity: 0;transform:translateY(120px)}} +@keyframes replaceenemy{from {opacity: 0;transform:translateY(-120px)}} +@-webkit-keyframes replaceenemy{from {opacity: 0;transform:translateY(-120px)}} +@keyframes drawing{0% {opacity: 0;left:calc(50% - 52px);top:calc(50% - 52px);}50%{opacity: 1}100%{opacity: 0}} @-webkit-keyframes drawing{0% {opacity: 0;left:calc(50% - 52px);top:calc(50% - 52px);}50%{opacity: 1}100%{opacity: 0}} +@keyframes drawing2{0% {opacity: 0}50%{opacity: 1}100%{opacity: 0}} @-webkit-keyframes drawing2{0% {opacity: 0}50%{opacity: 1}100%{opacity: 0}} -@-webkit-keyframes card_start{from {opacity: 0;-webkit-transform:scale(0);}} -@-webkit-keyframes card_start2{from {opacity: 0;-webkit-transform:scale(0);margin-left: -52px;margin-right: -52px;}} -@-webkit-keyframes card_judgestart{from {opacity: 0;-webkit-transform:scale(0) rotateY(-180deg) perspective(600px);}} +@keyframes card_start{from {opacity: 0;transform:scale(0);}} +@-webkit-keyframes card_start{from {opacity: 0;transform:scale(0);}} +@keyframes card_start2{from {opacity: 0;transform:scale(0);margin-left: -52px;margin-right: -52px;}} +@-webkit-keyframes card_start2{from {opacity: 0;transform:scale(0);margin-left: -52px;margin-right: -52px;}} +@keyframes card_judgestart{from {opacity: 0;transform:scale(0) rotateY(-180deg) perspective(600px);}} +@-webkit-keyframes card_judgestart{from {opacity: 0;transform:scale(0) rotateY(-180deg) perspective(600px);}} +@keyframes sidebar{from {left: -120px;opacity: 0}} @-webkit-keyframes sidebar{from {left: -120px;opacity: 0}} -@-webkit-keyframes zoom_button{from {margin-top: -48px;margin-bottom: -48px;-webkit-transform:scale(0);opacity: 0}} +@keyframes zoom_button{from {margin-top: -48px;margin-bottom: -48px;transform:scale(0);opacity: 0}} +@-webkit-keyframes zoom_button{from {margin-top: -48px;margin-bottom: -48px;transform:scale(0);opacity: 0}} +@keyframes config{from {margin-top:-28px;opacity: 0}} @-webkit-keyframes config{from {margin-top:-28px;opacity: 0}} -@-webkit-keyframes zoomin{from {opacity: 0;-webkit-transform:scale(0.5);}} -@-webkit-keyframes zoomout{from {opacity: 0;-webkit-transform:scale(2);}} -@-webkit-keyframes zoomout3{from {opacity: 0;-webkit-transform:scale(3);}} -@-webkit-keyframes zoomout4{from {opacity: 0;-webkit-transform:scale(4);}} +@keyframes zoomin{from {opacity: 0;transform:scale(0.5);}} +@-webkit-keyframes zoomin{from {opacity: 0;transform:scale(0.5);}} +@keyframes zoomout{from {opacity: 0;transform:scale(2);}} +@-webkit-keyframes zoomout{from {opacity: 0;transform:scale(2);}} +@keyframes zoomout3{from {opacity: 0;transform:scale(3);}} +@-webkit-keyframes zoomout3{from {opacity: 0;transform:scale(3);}} +@keyframes zoomout4{from {opacity: 0;transform:scale(4);}} +@-webkit-keyframes zoomout4{from {opacity: 0;transform:scale(4);}} +@keyframes flash{0%{opacity: 1;}50%{opacity: 0;}100%{opacity: 1;}} @-webkit-keyframes flash{0%{opacity: 1;}50%{opacity: 0;}100%{opacity: 1;}} -@-webkit-keyframes flip{from{-webkit-transform:perspective(1000px) rotateY(0);}to{-webkit-transform:perspective(1000px) rotateY(360deg);}} +@keyframes flip{from{transform:perspective(1000px) rotateY(0);}to{transform:perspective(1000px) rotateY(360deg);}} +@-webkit-keyframes flip{from{transform:perspective(1000px) rotateY(0);}to{transform:perspective(1000px) rotateY(360deg);}} /*--------其它--------*/ @font-face {font-family: 'xiaozhuan';src: url('../../font/xiaozhuan.ttf');} @font-face {font-family: 'huangcao';src: url('../../font/huangcao.ttf');} diff --git a/layout/default/menu.css b/layout/default/menu.css index e201c4824..4e384a787 100644 --- a/layout/default/menu.css +++ b/layout/default/menu.css @@ -73,15 +73,19 @@ top:calc(50% - 150px); } .menu.main.slideup{ + animation:menuslideup 0.5s forwards; -webkit-animation:menuslideup 0.5s forwards; } .menu.main.slidedown{ + animation:menuslidedown 0.5s forwards; -webkit-animation:menuslidedown 0.5s forwards; } .menu.main.zoomin{ + animation:menuzoomin 0.3s forwards; -webkit-animation:menuzoomin 0.3s forwards; } .menu.main.zoomout{ + animation:menuzoomout 0.3s forwards; -webkit-animation:menuzoomout 0.3s forwards; } .menu.main{ @@ -122,7 +126,8 @@ margin-right:5px; transition:color 0.5s; } -.menu.main>.menu-tab>div:not(.active):not(*:hover){ +.menu.main>.menu-tab>div:not(.active):not(*:hover), +.menu.main>.menu-tab>.disabled{ color:rgba(255,255,255,0.6); } .menu.main>.menu-content{ @@ -328,10 +333,15 @@ color:rgba(255,255,255,0.5); } +@keyframes fadein{from{opacity:0}} @-webkit-keyframes fadein{from{opacity:0}} +@keyframes menuslideup{from{top:100%}} @-webkit-keyframes menuslideup{from{top:100%}} +@keyframes menuslidedown{to{top:100%}} @-webkit-keyframes menuslidedown{to{top:100%}} +@keyframes menuzoomin{from{transform:scale(0.5);opacity:0;transform-origin:2px -35px}to{transform-origin:2px -35px}} @-webkit-keyframes menuzoomin{from{transform:scale(0.5);opacity:0;transform-origin:2px -35px}to{transform-origin:2px -35px}} +@keyframes menuzoomout{from{transform-origin:2px -35px}to{transform:scale(0.5);opacity:0;transform-origin:2px -35px}} @-webkit-keyframes menuzoomout{from{transform-origin:2px -35px}to{transform:scale(0.5);opacity:0;transform-origin:2px -35px}} diff --git a/layout/default/scrollbar.css b/layout/default/scrollbar.css index c7c024243..6784c50ad 100755 --- a/layout/default/scrollbar.css +++ b/layout/default/scrollbar.css @@ -47,4 +47,4 @@ } ::-webkit-scrollbar-track:active { background-color:rgba(0,0,0,0) -} \ No newline at end of file +} diff --git a/layout/mobile/equip.css b/layout/mobile/equip.css index a509d51e6..beeca2d31 100644 --- a/layout/mobile/equip.css +++ b/layout/mobile/equip.css @@ -10,8 +10,8 @@ } .player:not([data-position='0']).minskin .equips, #arena.chess .player.minskin .equips{ - -webkit-transform:scale(0.73); - -webkit-transform-origin:bottom left; + transform:scale(0.73); + transform-origin:bottom left; } .player:not([data-position='0']) .equips>.card, #arena.chess .player .equips>.card{ @@ -26,6 +26,7 @@ box-shadow:none; color:white; text-shadow:black 0 0 2px; + animation: card_start2x 0.5s; -webkit-animation: card_start2x 0.5s; display:block; left:0; @@ -94,6 +95,7 @@ } .player:not([data-position='0']) .equips>.card>div, #arena.chess .player .equips>.card>div{ + animation:none !important; -webkit-animation:none !important; } .player:not([data-position='0']) .equips>.card>.name, @@ -108,7 +110,7 @@ #arena.chess .player .equips>.removing{ margin-top:-12px !important; margin-bottom:-11px !important; - -webkit-transform:scale(1); + transform:scale(1); } .player:not([data-position='0']) .equips>.removing+.removing, #arena.chess .player .equips>.removing+.removing{ @@ -118,16 +120,16 @@ .player:not([data-position='0']).linked .equips, #arena.chess .player.linked .equips{ - -webkit-transform:rotate(90deg) translate(-150px,-6px); - -webkit-transform-origin:bottom left; + transform:rotate(90deg) translate(-150px,-6px); + transform-origin:bottom left; } .player:not([data-position='0']).minskin.linked .equips, #arena.chess .player.minskin.linked .equips{ - -webkit-transform:rotate(90deg) translate(-90px,-6px) scale(0.73); + transform:rotate(90deg) translate(-90px,-6px) scale(0.73); } .player:not([data-position='0']).linked div:not(.equips) .card, .player:not([data-position='0']).linked .identity, #arena.chess .player.linked div:not(.equips) .card, #arena.chess .player.linked .identity{ - -webkit-transform:rotate(90deg); + transform:rotate(90deg); } diff --git a/layout/mobile/layout.css b/layout/mobile/layout.css index 1e45171ff..4f5ee5cd1 100644 --- a/layout/mobile/layout.css +++ b/layout/mobile/layout.css @@ -70,7 +70,8 @@ border-radius:0px !important; top:0; left:0; - transition: transform 0.5s; + transition-property: opacity,transform; + transition-duration: 0.5s; pointer-events: auto; } #arena:not(.chess) .player[data-position='0']:not(.minskin)>.judges, diff --git a/layout/mode/boss.css b/layout/mode/boss.css index 81d2e3636..374e6f8fa 100755 --- a/layout/mode/boss.css +++ b/layout/mode/boss.css @@ -29,7 +29,7 @@ transition:all 0.5s; } .player.bossplayer.highlight{ - -webkit-transform:scale(1.1); + transform:scale(1.1); opacity:1; } #bosslist.removing>.player.bossplayer.highlight{ @@ -45,6 +45,7 @@ height:216px; transition: all 0.3s; opacity:0.6; + animation:game_start 0.5s; -webkit-animation:game_start 0.5s; } .player.bossplayer>div:not(.hp):not(.identity):not(.avatar){ diff --git a/layout/mode/chess.css b/layout/mode/chess.css index 37479dfba..215b1c4ce 100755 --- a/layout/mode/chess.css +++ b/layout/mode/chess.css @@ -105,10 +105,13 @@ box-shadow: rgba(0, 0, 0, 0.3) 0 0 0 1px, rgba(255, 0, 0, 1) 0 0 5px, rgba(255, 0, 0, 1) 0 0 10px !important; } .fakeme.player>.dead{ + filter:grayscale(1); -webkit-filter:grayscale(1); opacity:0.5; } .card.drawing{ + animation: drawing2 1s; + animation-fill-mode: forwards; -webkit-animation: drawing2 1s; -webkit-animation-fill-mode: forwards; } diff --git a/layout/newlayout/equip.css b/layout/newlayout/equip.css index 004bb7a9e..1f324f68f 100644 --- a/layout/newlayout/equip.css +++ b/layout/newlayout/equip.css @@ -8,8 +8,8 @@ text-align:left; } .player.minskin .equips{ - -webkit-transform:scale(0.73); - -webkit-transform-origin:bottom left; + transform:scale(0.73); + transform-origin:bottom left; } .player .equips>.card{ position:relative; @@ -23,6 +23,7 @@ box-shadow:none; color:white; text-shadow:black 0 0 2px; + animation: card_start2x 0.5s; -webkit-animation: card_start2x 0.5s; display:block; left:0; @@ -79,6 +80,7 @@ margin-left:5px; } .equips>.card>div{ + animation:none !important; -webkit-animation:none !important; } .equips>.card>.name, @@ -90,7 +92,7 @@ .equips>.removing{ margin-top:-12px !important; margin-bottom:-11px !important; - -webkit-transform:scale(1); + transform:scale(1); } .equips>.removing+.removing{ margin-top:-23px !important; @@ -98,13 +100,13 @@ .player.linked .equips{ - -webkit-transform:rotate(90deg) translate(-150px,-6px); - -webkit-transform-origin:bottom left; + transform:rotate(90deg) translate(-150px,-6px); + transform-origin:bottom left; } .player.minskin.linked .equips{ - -webkit-transform:rotate(90deg) translate(-90px,-6px) scale(0.73); + transform:rotate(90deg) translate(-90px,-6px) scale(0.73); } .player.linked div:not(.equips) .card, .player.linked .identity{ - -webkit-transform:rotate(90deg); + transform:rotate(90deg); } diff --git a/layout/newlayout/global.css b/layout/newlayout/global.css index c3f810714..c633efbba 100644 --- a/layout/newlayout/global.css +++ b/layout/newlayout/global.css @@ -44,7 +44,7 @@ bottom: auto; right: auto; text-align: left; - -webkit-transform: none; + transform: none; } .player.fullskin2 .avatar, .player.fullskin2 .avatar2{ @@ -92,6 +92,7 @@ line-height:20px; position:relative; display:block; + animation:card_start2xx 0.5s; -webkit-animation:card_start2xx 0.5s; } .player .marks>.removing, @@ -120,12 +121,12 @@ top: auto; left: 116px; z-index:3; - -webkit-transform:rotate(180deg); + transform:rotate(180deg); } .player .hp.text{ font-family:'huangcao'; font-size:22px; - -webkit-transform:none; + transform:none; transition:all 0s; left:114px; } @@ -168,6 +169,7 @@ .player .count[data-condition="none"]{ background: rgba(57, 123, 4,1); border: 1px solid rgba(39, 79, 7, 1); + filter: grayscale(1); -webkit-filter: grayscale(1); } .player .count[data-condition="high"]{ @@ -195,12 +197,12 @@ left:102px; } .player.linked{ - -webkit-transform:rotate(-90deg); + transform:rotate(-90deg); } .player.acted.linked .identity{ - -webkit-transform:rotate(270deg); + transform:rotate(270deg); } -.linked>.avatar,.linked>.avatar2{-webkit-transform:rotate(0deg);} +.linked>.avatar,.linked>.avatar2{transform:rotate(0deg);} .linked>.avatar2{top:73px;} .linked>.identity{top: -5px;} .linked>.count{right: auto;} @@ -312,6 +314,7 @@ height:calc(100% - 385px); z-index:4; transition-property:opacity,background,box-shadow; + animation: dialog_start2 0.5s; -webkit-animation: dialog_start2 0.5s; } #arena.stone .dialog{ @@ -364,6 +367,11 @@ left: calc(5% + 220px); } } + +@keyframes card_start2x{from {opacity: 0;margin-top: -13px;margin-bottom:-11px}} +@keyframes card_start2xx{from {opacity: 0;margin-top: -12px;margin-bottom:-12px;transform:scale(0)}} +@keyframes card_start2xxx{from {opacity: 0;margin-top: -12px;margin-bottom:-12px;transform:scale(0) rotate(90deg)}} + @-webkit-keyframes card_start2x{from {opacity: 0;margin-top: -13px;margin-bottom:-11px}} -@-webkit-keyframes card_start2xx{from {opacity: 0;margin-top: -12px;margin-bottom:-12px;-webkit-transform:scale(0)}} -@-webkit-keyframes card_start2xxx{from {opacity: 0;margin-top: -12px;margin-bottom:-12px;-webkit-transform:scale(0) rotate(90deg)}} +@-webkit-keyframes card_start2xx{from {opacity: 0;margin-top: -12px;margin-bottom:-12px;transform:scale(0)}} +@-webkit-keyframes card_start2xxx{from {opacity: 0;margin-top: -12px;margin-bottom:-12px;transform:scale(0) rotate(90deg)}} diff --git a/layout/phone/layout.css b/layout/phone/layout.css index 075d7e075..095139807 100644 --- a/layout/phone/layout.css +++ b/layout/phone/layout.css @@ -41,5 +41,5 @@ @media screen and (orientation:portrait) { - + } diff --git a/main.js b/main.js index bdc5c5889..eb0bf48ee 100755 --- a/main.js +++ b/main.js @@ -6,7 +6,7 @@ app.on('window-all-closed', function() { app.quit(); }); app.on('ready', function() { - mainWindow = new BrowserWindow({width: 1190, height: 780}); + mainWindow = new BrowserWindow({width: 960, height: 660}); mainWindow.loadUrl('file://' + __dirname + '/index.html'); mainWindow.on('closed', function() { diff --git a/mode/chess.js b/mode/chess.js index 6be03088d..7c1574816 100755 --- a/mode/chess.js +++ b/mode/chess.js @@ -18,15 +18,15 @@ mode.chess={ } if(method=='flip'){ this.style.transition='all 0.5s'; - this.style.webkitTransform='rotate'+(Math.random()<0.5?'X':'Y')+'(180deg) perspective(1000px)'; + this.style.transform='rotate'+(Math.random()<0.5?'X':'Y')+'(180deg) perspective(1000px)'; } else if(method=='rotate'){ this.style.transition='all 0.5s'; - this.style.webkitTransform='rotate(180deg)'; + this.style.transform='rotate(180deg)'; } else{ this.style.transition='all 0.5s'; - this.style.webkitTransform=''; + this.style.transform=''; } return this; }, @@ -238,7 +238,7 @@ mode.chess={ node.dataset.position=this.dataset.position; this.parentNode.appendChild(node); ui.refresh(node); - node.style.webkitTransform=''; + node.style.transform=''; setTimeout(function(){ node.remove(); },1000); @@ -271,15 +271,15 @@ mode.chess={ } node.fixed=true; game.$randomMove(this,node,100,30); - var ot=node.style.webkitTransform; - node.style.webkitTransform+='scale(0.6)'; + var ot=node.style.transform; + node.style.transform+='scale(0.6)'; node.dataset.position=this.dataset.position; this.parentNode.appendChild(node); ui.refresh(node); node.show(); - node.style.webkitTransform=ot; + node.style.transform=ot; setTimeout(function(){ - node.style.webkitTransform=''; + node.style.transform=''; node.delete(); },500); var that=this; @@ -371,7 +371,7 @@ mode.chess={ node.hide(); node.style.transitionProperty='left,top,opacity'; if(transform){ - node.style.webkitTransform='rotate('+(Math.random()*16-8)+'deg)'; + node.style.transform='rotate('+(Math.random()*16-8)+'deg)'; } ui.arena.appendChild(node); ui.refresh(node); @@ -816,7 +816,7 @@ mode.chess={ else if(rect.top+rect.height+80>=ui.chessContainer.offsetHeight){ ty=-Math.abs(ty); } - node.style.webkitTransform='translate('+tx+'px,'+ty+'px)'; + node.style.transform='translate('+tx+'px,'+ty+'px)'; }, draw2:function(func){ lib.canvasUpdates2.push(func); @@ -871,9 +871,10 @@ mode.chess={ ui.create.arena(); ui.create.cards(); game.finishCards(); - if(get.config('chess_character')){ + var playback=localStorage.getItem(lib.configprefix+'playback'); + if(get.config('chess_character')||playback){ for(var i in lib.chess_character){ - if(i.indexOf('leader_')==0) continue; + if(!playback&&i.indexOf('leader_')==0&&get.config('chess_mode')!='leader') continue; lib.character[i]=lib.chess_character[i]; if(!lib.character[i][4]){ lib.character[i][4]=[]; @@ -889,8 +890,12 @@ mode.chess={ ui.chess.appendChild(ui.canvas2); ui.ctx2=ui.canvas2.getContext('2d'); game.me=ui.create.player(); - var playback=localStorage.getItem(lib.configprefix+'playback'); if(playback){ + for(var i in lib.characterPack){ + for(var j in lib.characterPack[i]){ + lib.character[j]=lib.character[j]||lib.characterPack[i][j]; + } + } game.pause(); ui.system.style.display='none'; _status.playback=playback; @@ -915,6 +920,7 @@ mode.chess={ } case 'combat':{ if(lib.storage.test){ + lib.config.game_speed='vfast'; _status.auto=true; setTimeout(function(){ console.log(get.translation(game.players)); @@ -940,6 +946,9 @@ mode.chess={ mylistmap=[]; enemylistmap=[]; for(var i=0;i.menu-tab>div:not(.active):not(*:hover){ +.menu.main>.menu-tab>div:not(.active):not(*:hover), +.menu.main>.menu-tab>.disabled{ color: rgba(77, 60, 51,0.5); } #window>.dialog.popped,.menu{