From 6b88760a0fa7c856ce4776d2b6712c166f4d339e Mon Sep 17 00:00:00 2001 From: libccy Date: Thu, 14 Apr 2016 18:46:23 +0800 Subject: [PATCH] ol --- character/shenhua.js | 2 +- game/game.js | 76 ++++++++++++++++++++++++++++++++++++-------- game/update.js | 6 ++-- mode/guozhan.js | 6 +--- mode/identity.js | 21 +++++++----- 5 files changed, 79 insertions(+), 32 deletions(-) diff --git a/character/shenhua.js b/character/shenhua.js index f07cc338e..e879dc7ba 100644 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -3002,7 +3002,7 @@ character.shenhua={ huashen2:'化身', xinsheng:'新生', tiaoxin_info:'出牌阶段,你可以指定一名使用【杀】能攻击到你的角色,该角色需对你使用一张【杀】,若该角色不如此做,你弃掉他的一张牌,每回合限一次。', - zhiji_info:'觉醒技,回合开始阶段,若你没有手牌,你须回复1点体力或摸两张牌,然后剪1点体力上限,并永久获得技能“观星”。', + zhiji_info:'觉醒技,回合开始阶段,若你没有手牌,你须回复1点体力或摸两张牌,然后减1点体力上限,并永久获得技能“观星”。', xiangle_info:'锁定技,当其他玩家使用【杀】指定你为目标时,需额外弃掉一张基本牌,否则该【杀】对你无效。', fangquan_info:'你可跳过你的出牌阶段,若如此做,在回合结束时可弃一张手牌令一名其他角色进行一个额外的回合。', ruoyu_info:'主公技,觉醒技,回合开始阶段,若你的体力是全场最少的(或之一),你须增加1点体力上限,回复1点体力,并永久获得技能“激将”。', diff --git a/game/game.js b/game/game.js index 34dd08ca3..39b30c0b5 100755 --- a/game/game.js +++ b/game/game.js @@ -48,7 +48,7 @@ var lib={ configprefix:'noname_0.9_', versionOL:4, - updateURL:localStorage.getItem('noname_download_source')||'http://123.206.77.253', + updateURL:localStorage.getItem('noname_download_source')||'http://123.206.77.253/', assetURL:'', hallURL:'123.206.77.253', changeLog:[], @@ -2343,7 +2343,6 @@ name:'联机昵称', input:true, frequent:true, - init:'无名玩家' }, connect_avatar:{ name:'联机头像', @@ -2359,7 +2358,6 @@ name:'联机大厅', input:true, frequent:true, - init:'123.206.77.253' }, hall_button:{ name:'联机大厅按钮', @@ -13139,6 +13137,9 @@ } }, multiDownload:function(list,onsuccess,onerror,onfinish){ + if(lib.updateURL[lib.updateURL.length-1]!='/'){ + lib.updateURL+='/'; + } list=list.slice(0); var download=function(){ if(list.length){ @@ -16834,11 +16835,21 @@ if(!lib.config.mode_config[localmode]){ lib.config.mode_config[localmode]={}; } - lib.config.mode_config[localmode][key]=value; + if(value==undefined){ + delete lib.config.mode_config[localmode][key]; + } + else{ + lib.config.mode_config[localmode][key]=value; + } key+='_mode_config_'+localmode; } else{ - lib.config[key]=value; + if(value==undefined){ + delete lib.config[key]; + } + else{ + lib.config[key]=value; + } } if(value===undefined){ delete config[key]; @@ -17278,6 +17289,7 @@ } }; var clickSwitcher=function(){ + if(this.classList.contains('disabled')) return; var node=this; this.classList.add('on'); if(this._link.menu){ @@ -17782,6 +17794,18 @@ } } } + if(connectMenu){ + menuUpdates.push(function(){ + if(_status.waitingForPlayer){ + if(map.connect_player_number){ + map.connect_player_number.style.display='none'; + } + if(map.connect_versus_mode){ + map.connect_versus_mode.style.display='none'; + } + } + }) + } return node; }; var modeorder=lib.config.modeorder||[]; @@ -20365,7 +20389,7 @@ }); } }; - var checkForAssetUpdate=function(){ + game.checkForAssetUpdate=function(type){ if(button2.disabled){ return; } @@ -20384,19 +20408,19 @@ return; } var n=updates.length; + if(!ui.arena.classList.contains('menupaused')){ + ui.click.configMenu(); + ui.click.menuTab('帮助'); + } var proceed=function(){ if(updates.length==0){ game.saveConfig('asset_version',asset_version); - alert('素材已是最新'); - button2.disabled=false; + alert('素材已是最新'); + button2.disabled=false; button2.innerHTML='检查素材更新'; return; } - if(!ui.arena.classList.contains('menupaused')){ - ui.click.configMenu(); - ui.click.menuTab('帮助'); - } var p=button2.parentNode; button2.remove(); var span=document.createElement('span'); @@ -20477,7 +20501,7 @@ li1.lastChild.appendChild(button1); button2=document.createElement('button'); button2.innerHTML='检查素材更新'; - button2.onclick=checkForAssetUpdate; + button2.onclick=game.checkForAssetUpdate; li2.lastChild.appendChild(button2); ul.appendChild(li1); @@ -20754,7 +20778,6 @@ } } } - if(e) e.stopPropagation(); }; for(i=0;ibb?1:-1; }); dialog=ui.create.dialog('hidden'); + dialog.classList.add('noupdate'); + dialog.classList.add('scroll1'); + dialog.classList.add('scroll2'); dialog.getCurrentCapt=function(link,capt){ if(lib.characterDialogGroup[this.currentcapt]){ return lib.characterDialogGroup[this.currentcapt](link,capt); @@ -21518,6 +21544,28 @@ game.checkForUpdate(false); },3000); } + if(!lib.config.asset_version){ + setTimeout(function(){ + var func=function(){ + if(confirm('是否下载图片和音频素材?(约100MB)')){ + if(!ui.arena.classList.contains('menupaused')){ + ui.click.configMenu(); + ui.click.menuTab('帮助'); + } + setTimeout(game.checkForAssetUpdate,500); + } + else{ + game.saveConfig('asset_version','无'); + } + } + if(_status.new_tutorial){ + _status.new_tutorial=func; + } + else{ + func(); + } + },4000); + } clearTimeout(window.resetGameTimeout); delete window.resetGameTimeout; delete window.resetExtension; diff --git a/game/update.js b/game/update.js index cca858d6e..1b89d4ba8 100644 --- a/game/update.js +++ b/game/update.js @@ -1,8 +1,6 @@ window.noname_update={ - version:'1.8.6', + version:'1.8.6.1', changeLog:[ - '模式排序', - '国战联机', - '联机房间改进', + '修bug' ] } diff --git a/mode/guozhan.js b/mode/guozhan.js index 75ac38415..58c9d95ae 100755 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -734,11 +734,7 @@ mode.guozhan={ } }, dieAfter:function(source){ - game.broadcastAll(function(player){ - player.showCharacter(2); - player.classList.remove('unseen'); - player.classList.remove('unseen2'); - },this); + this.showCharacter(2); if(source&&source.identity!='unknown'){ if(this.identity=='ye') source.draw(1); else if(this.identity!=source.identity) source.draw(get.population(this.identity)+1); diff --git a/mode/identity.js b/mode/identity.js index 3f9083f10..7ba7ecdce 100755 --- a/mode/identity.js +++ b/mode/identity.js @@ -39,6 +39,7 @@ mode.identity={ } "step 2" if(!lib.config.new_tutorial){ + _status.new_tutorial=true; game.saveConfig('version',lib.version); var clear=function(){ ui.dialog.close(); @@ -139,6 +140,10 @@ mode.identity={ } } "step 3" + if(typeof _status.new_tutorial=='function'){ + _status.new_tutorial(); + } + delete _status.new_tutorial; if(lib.storage.test){ lib.config.game_speed='vfast'; _status.auto=true; @@ -850,29 +855,29 @@ mode.identity={ } else{ identityList=lib.config.mode_config.identity.identity[game.players.length-2].slice(0); - if(get.config('double_nei')){ - switch(get.config('player_number')){ - case '8': + if(lib.configOL.double_nei){ + switch(lib.configOL.number){ + case 8: identityList.remove('fan'); identityList.push('nei'); break; - case '7': + case 7: identityList.remove('zhong'); identityList.push('nei'); break; - case '6': + case 6: identityList.remove('fan'); identityList.push('nei'); break; - case '5': + case 5: identityList.remove('fan'); identityList.push('nei'); break; - case '4': + case 4: identityList.remove('zhong'); identityList.push('nei'); break; - case '3': + case 3: identityList.remove('fan'); identityList.push('nei'); break;