From 88a8da8d029a8a3d2aebe21624d0c43c18779730 Mon Sep 17 00:00:00 2001 From: libccy Date: Fri, 1 Jul 2016 11:09:23 +0800 Subject: [PATCH] f2 --- card/refresh.js | 18 ++++ card/standard.js | 8 ++ character/shenhua.js | 6 +- character/swd.js | 5 +- game/game.js | 187 ++++++++++++++++++++++++++---------- game/update.js | 4 + layout/default/layout.css | 5 + layout/mobile/layout.css | 3 +- layout/mode/chess.css | 14 ++- layout/newlayout/global.css | 2 +- mode/stone.js | 6 +- 11 files changed, 199 insertions(+), 59 deletions(-) diff --git a/card/refresh.js b/card/refresh.js index 58f745bf7..72c4c6fc6 100755 --- a/card/refresh.js +++ b/card/refresh.js @@ -104,6 +104,24 @@ card.refresh={ save:true, respondSha:true, respondShan:true, + skillTagFilter:function(player,tag){ + var muniu=player.get('e','5'); + if(!muniu||!muniu.cards) return false; + for(var i=0;i=2; + }, audio:true, prompt:'将两张手牌当杀使用或打出', check:function(card){ @@ -1287,6 +1292,9 @@ card.standard={ }, ai:{ respondSha:true, + skillTagFilter:function(event,player){ + return player.num('h')>=2; + }, } }, guanshi_skill:{ diff --git a/character/shenhua.js b/character/shenhua.js index 7f19e1c12..384ae3919 100644 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -1462,10 +1462,12 @@ character.shenhua={ audio:2, enable:'chooseToUse', filterCard:function(card){ - if(get.type(card)=='trick') return false; - if(get.type(card)=='delay') return false; + if(get.type(card)!='basic'&&get.type(card)!='equip') return false; return get.color(card)=='black'; }, + filter:function(event,player){ + return player.num('he',{type:['basic','equip'],color:'black'}) + }, position:'he', viewAs:{name:'bingliang'}, prompt:'将一黑色的基本牌或装备牌当兵粮寸断使用', diff --git a/character/swd.js b/character/swd.js index 38d77ad27..b40eea1ba 100755 --- a/character/swd.js +++ b/character/swd.js @@ -7,7 +7,7 @@ character.swd={ swd_septem:['male','qun',4,['jiying','liaoyuan','yishan']], swd_kama:['female','qun',3,['yueren','shangshi']], // swd_miles:['male','qun',4,['aojian','miles_xueyi','mohua2']], - swd_nicole:['female','wu',3,['huanjian','lingwu','minjing']], + swd_nicole:['female','qun',3,['huanjian','lingwu','minjing']], swd_wangsiyue:['female','wei',3,['duishi','biyue']], swd_weida:['female','qun',3,['yueren','zhenlie']], swd_xuanyuanjianxian:['male','qun',4,['pozhou','huajian']], @@ -3209,6 +3209,9 @@ character.swd={ }, viewAs:{name:'dujian'}, position:'he', + filter:function(event,player){ + return player.num('h',{color:'black'})>0; + }, viewAsFilter:function(player){ if(!player.num('he',{color:'black'})) return false; }, diff --git a/game/game.js b/game/game.js index 61e68adf8..a3ee3fadd 100755 --- a/game/game.js +++ b/game/game.js @@ -22698,48 +22698,95 @@ var packsource; var clickCapt=function(e){ if(_status.dragged) return; - if(newlined2){ - newlined2.style.display='none'; - packsource.innerHTML='武将包'; - packsource.classList.remove('thundertext'); + if(this.alphabet){ + if(this.classList.contains('thundertext')){ + dialog.currentcapt=null; + dialog.currentcaptnode=null; + this.classList.remove('thundertext'); + for(var i=0;i托管中...',ui.arena); + ui.autonode.listen(ui.click.auto); if(lib.config.mode=='connect'){ ui.auto.hide(); ui.pause.hide(); @@ -26121,6 +26206,7 @@ if(!_status.auto){ _status.auto=true; ui.auto.classList.add('glow'); + ui.arena.classList.add('auto'); if(_status.imchoosing&&_status.paused){ if(ui.confirm) ui.confirm.close(); @@ -26147,6 +26233,7 @@ ui.control.show(); _status.auto=false; ui.auto.classList.remove('glow'); + ui.arena.classList.remove('auto'); if(game.online){ game.send('unauto'); diff --git a/game/update.js b/game/update.js index 26a0be416..e2f1b405d 100644 --- a/game/update.js +++ b/game/update.js @@ -18,10 +18,14 @@ window.noname_update={ 'card/shenqi.js', 'card/hearth.js', 'card/mingzhong.js', + 'card/standard.js', 'game/game.js', 'game/config.js', 'mode/stone.js', 'layout/default/layout.css', + 'layout/mobile/layout.css', + 'layout/newlayout/global.css', + 'layout/mode/chess.css', ], '1.8.16.1':[], '1.8.16.2':[] diff --git a/layout/default/layout.css b/layout/default/layout.css index 73de20eca..5001f0e08 100755 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -357,6 +357,11 @@ table{table-layout: fixed;} } #me,#mebg{width: 100%;height: 140px;top:calc(100% - 140px);left:0;} #mebg{z-index:-1} +#autonode{z-index: 10;width: 100%;height: 140px;top:calc(100% - 140px);left:0;display: table;text-align: center;font-size: 60px;font-family: 'xinwei';text-shadow: black 0 0 10px} +#arena:not(.chess):not(.mobile)>#autonode{display: none} +#arena:not(.auto)>#autonode{opacity: 0;pointer-events: none} +#arena.auto #handcards1,#arena.auto #handcards2{opacity: 0.5} +#autonode>div{display: table-cell;vertical-align: middle;position: relative} #handcards1,#handcards2{ width: calc(50% - 140px);height: 127px;padding: 10px; text-align: left; diff --git a/layout/mobile/layout.css b/layout/mobile/layout.css index 0b3887c39..9857e8bd6 100644 --- a/layout/mobile/layout.css +++ b/layout/mobile/layout.css @@ -20,7 +20,8 @@ line-height: 34px; }*/ #arena:not(.chess)>#me, -#arena:not(.chess)>#mebg{ +#arena:not(.chess)>#mebg, +#arena:not(.chess)>#autonode{ bottom:30px; width: calc(5000% / 47); left:calc(-150% / 47); diff --git a/layout/mode/chess.css b/layout/mode/chess.css index 2ff6d8409..b3a832dc4 100755 --- a/layout/mode/chess.css +++ b/layout/mode/chess.css @@ -6,12 +6,20 @@ transition:all 0s !important; } #arena.chess>#me, -#arena.chess>#mebg{ +#arena.chess>#mebg, +#arena.chess>#autonode{ bottom:0; top:auto; border-radius:0; } - +#me>.fakeme.avatar { + width: 120px; + height: 120px; + border-radius: 0px; + top: 0; + left: 0; + background-size: cover; +} #chess-container{ width:100%; height :calc(100% - 120px); @@ -45,7 +53,7 @@ #handcards2{ display:none; } -#mebg,#me{ +#mebg,#me,#autonode{ height:120px; } diff --git a/layout/newlayout/global.css b/layout/newlayout/global.css index 72a1ee5c9..9aea85c2e 100644 --- a/layout/newlayout/global.css +++ b/layout/newlayout/global.css @@ -399,7 +399,7 @@ .card[data-position='0']{top:calc(100% - 130px);left:calc(50% - 52px);} .popup[data-position='0']{top:calc(100% - 206px);left:calc(50% - 61px);} -#me,#mebg{top:calc(100% - 150px);} +#me,#mebg,#autonode{top:calc(100% - 150px);} #handcards1,#handcards2{width: calc(50% - 95px);height: 127px;padding: 10px;} #handcards2{left: calc(50% + 75px);} .dialog{ diff --git a/mode/stone.js b/mode/stone.js index e131a7354..fd7ea8f70 100755 --- a/mode/stone.js +++ b/mode/stone.js @@ -138,7 +138,9 @@ mode.stone={ career[lib.careerList[i]]=[]; careerspell[lib.careerList[i]]=[]; } - var result={} + var result={ + list:{} + }; for(var i=0;i