diff --git a/game/config.js b/game/config.js index e88957795..93bcd8b79 100755 --- a/game/config.js +++ b/game/config.js @@ -38,7 +38,7 @@ window.config={ qunyingzhuan:'群英', swd:'剧情', - character_play_config:'角色卡牌', + character_play_config:'技能卡牌', soldier_play_config:'士兵模式', strategy_play_config:'尔虞我诈', wuxing_play_config:'五行生克', diff --git a/game/game.js b/game/game.js index 009717d56..973e549ff 100755 --- a/game/game.js +++ b/game/game.js @@ -641,7 +641,7 @@ name:'玩法', config:{ character:{ - name:'角色卡牌', + name:'技能卡牌', init:false, restart:true, onclick:function(bool){ @@ -654,6 +654,16 @@ game.saveConfig('plays',lib.config.plays); } }, + character_num_playpackconfig:{ + name:'卡牌比例', + init:'0.05', + item:{ + '0.02':'2%', + '0.05':'5%', + '0.1':'10%', + '0.2':'20%', + } + }, soldier:{ name:'士兵模式', init:false, @@ -682,6 +692,16 @@ game.saveConfig('plays',lib.config.plays); } }, + wuxing_num_playpackconfig:{ + name:'带属性卡牌', + init:'0.3', + item:{ + '0.1':'10%', + '0.2':'20%', + '0.3':'30%', + '0.5':'50%', + } + }, weather:{ name:'天气变化', init:false, @@ -696,13 +716,74 @@ game.saveConfig('plays',lib.config.plays); } }, + // weather_noqing_playpackconfig:{ + // name:'异常天气出现概率', + // init:'0.5', + // item:{ + // '0.1':'10%', + // '0.3':'30%', + // '0.5':'50%', + // '0.7':'70%', + // } + // }, + weather_chance_playpackconfig:{ + name:'天气效果触发概率', + init:'0.2', + item:{ + '0.1':'10%', + '0.2':'20%', + '0.3':'30%', + '0.5':'50%', + }, + onclick:function(item){ + game.saveConfig('weather_chance_playpackconfig',item); + _status.weatherchance=parseFloat(lib.config.weather_chance_playpackconfig)||0; + var chancestr=parseInt(_status.weatherchance*100)+'%'; + for(var i in lib.translate){ + if(i.indexOf('__weather_')==0){ + lib.translate[i.slice(1)]=lib.translate[i].replace(/&weather&/,chancestr); + } + } + } + }, + weather_duration_playpackconfig:{ + name:'异常天气持续时间', + init:'[3,6]', + item:{ + '[3,3]':'3~6回合', + '[3,6]':'3~9回合', + '[6,3]':'6~9回合', + '[6,6]':'6~12回合', + } + }, + weather_qingduration_playpackconfig:{ + name:'晴朗天气持续时间', + init:'[3,6]', + item:{ + '[3,3]':'3~6回合', + '[3,6]':'3~9回合', + '[6,3]':'6~9回合', + '[6,6]':'6~12回合', + } + }, update:function(config,map){ for(var i in map){ - if(lib.config.plays.contains(i)){ - map[i].classList.add('on'); + if(i.indexOf('_playpackconfig')!=-1){ + map[i].classList.add('indent'); + if(lib.config.plays.contains(i.slice(0,i.indexOf('_')))){ + map[i].show(); + } + else{ + map[i].hide(); + } } else{ - map[i].classList.remove('on'); + if(lib.config.plays.contains(i)){ + map[i].classList.add('on'); + } + else{ + map[i].classList.remove('on'); + } } } } @@ -7553,6 +7634,26 @@ if(content.type=='delay'){ game.delay(content.content); } + else if(content.type=='play'){ + window.play={}; + if(!event.playtoload){ + event.playtoload=1; + } + else{ + event.playtoload++; + } + var script=lib.init.js('play',content.name); + script.addEventListener('load',function(){ + var play=window.play[content.name] + if(play&&play.video){ + play.video(content.init); + } + event.playtoload--; + if(event.playtoload==0){ + delete window.play; + } + }); + } else if(typeof content.player=='string'&&game.playerMap[content.player]&& game.playerMap[content.player].classList&& !game.playerMap[content.player].classList.contains('obstacle')){ @@ -11992,7 +12093,10 @@ var autoskillNodes=[]; var banskillNodes=[]; var banskill; - if(mode=='skill'){ + if(mode=='playpack'){ + page.style.paddingBottom='10px'; + } + else if(mode=='skill'){ var autoskillexpanded=false; var banskillexpanded=false; ui.create.div('.config.more','自动发动
>
',page,function(){ diff --git a/game/package.js b/game/package.js index b655088f1..56f1b412a 100755 --- a/game/package.js +++ b/game/package.js @@ -36,7 +36,7 @@ card.pack={ compensate:'补充卡牌', }; play.pack={ - character:'武将卡牌', + character:'技能卡牌', soldier:'士兵模式', wuxing:'五行生克', weather:'天气变化', diff --git a/layout/default/layout.css b/layout/default/layout.css index 8016055ca..e62eb90b2 100755 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -864,6 +864,14 @@ div[data-color="unknownm"]{ font-family:'huangcao'; font-size: 24px; color:white !important; + pointer-events: none; +} +div:hover>.wunature{ + /*opacity: 0.5;*/ +} +.button.noclick .wunature, +.player.treasure .wunature{ + display: none; } .player .actcount.hp{ left: -24px; diff --git a/layout/default/menu.css b/layout/default/menu.css index 441ab05d9..fbe8b310f 100644 --- a/layout/default/menu.css +++ b/layout/default/menu.css @@ -202,7 +202,7 @@ .menu.main>.menu-content>div>.right.pane>div>.config.indent, .menu.main>.menu-content>div>.right.pane>div>.config.toggle.indent{ left:12px !important; - width: calc(100% - 20px) !important; + width: calc(100% - 32px) !important; } .menu.main>.menu-content>div>.right.pane>div:not(.expanded)>.config.auto-hide, .menu.main>.menu-content>div>.right.pane>div>.config.hidden{ diff --git a/layout/mobile/layout.css b/layout/mobile/layout.css index 4f5ee5cd1..55af88694 100644 --- a/layout/mobile/layout.css +++ b/layout/mobile/layout.css @@ -113,6 +113,9 @@ top:10px; left:2px; } +#arena:not(.chess) .player[data-position='0']:not(.minskin) .wunature{ + top:84px; +} #arena:not(.chess) .player.fullskin2[data-position='0']:not(.minskin)>.avatar, #arena:not(.chess) .player.fullskin2[data-position='0']:not(.minskin)>.avatar2{ diff --git a/layout/newlayout/global.css b/layout/newlayout/global.css index 0eb4122ad..fdb2b4c87 100644 --- a/layout/newlayout/global.css +++ b/layout/newlayout/global.css @@ -37,6 +37,9 @@ .player .wunature{ top:137px; } +.player.minskin .wunature{ + top:80px; +} .player .actcount.hp{ top: 18px; left: 15px; diff --git a/play/character.js b/play/character.js index adc97cc6a..b56523a2f 100755 --- a/play/character.js +++ b/play/character.js @@ -1,6 +1,12 @@ play.character={ - mode:['identity','guozhan','versus'], - init:function(){ + // mode:['identity','guozhan','versus'], + video:function(list){ + this.init(list); + for(var i in this.skill){ + lib.skill[i]=this.skill[i]; + } + }, + init:function(videolist){ var list=[],list2=[]; var i,j,name; for(i in lib.character){ @@ -11,7 +17,19 @@ play.character={ list.push(i); } list.randomSort(); - list=list.splice(0,Math.ceil(lib.card.list.length/20)); + list=list.splice(0,Math.ceil(lib.card.list.length*(parseFloat(lib.config.character_num_playpackconfig)||0))); + if(_status.video){ + if(videolist){ + list=videolist; + } + } + else{ + lib.video.push({ + type:'play', + init:list, + name:'character' + }); + } var suit=['heart','diamond','club','spade']; for(i=0;i
  • 牌堆中随机加入5%的角色牌
  • 出牌阶段对自己使用,'+ + '技能卡牌':'