From b6f52e4a5a592610c141db3a372a646882f83fbc Mon Sep 17 00:00:00 2001 From: libccy Date: Tue, 15 Aug 2017 21:57:18 +0800 Subject: [PATCH] 4 --- character/yijiang.js | 3 ++- game/update.js | 18 +++++++++--------- mode/connect.js | 16 +++++++++++++--- mode/versus.js | 2 +- 4 files changed, 25 insertions(+), 14 deletions(-) diff --git a/character/yijiang.js b/character/yijiang.js index 7f6f576c5..4e75766da 100644 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -5626,7 +5626,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.chooseCardButton(player.storage.quanji,true); "step 1" var card=result.links[0]; - player.discard(card); + card.discard(); + player.$throw(card); player.storage.quanji.remove(card); if(!player.storage.quanji.length){ player.unmarkSkill('quanji'); diff --git a/game/update.js b/game/update.js index 3df35b2c7..577525c7f 100644 --- a/game/update.js +++ b/game/update.js @@ -1,9 +1,8 @@ window.noname_update={ - version:'1.9.36', - // update:'1.9.35', + version:'1.9.36.1', + update:'1.9.36', changeLog:[ - '武将修改', - '可显示游戏时间和剩余牌数' + 'bug修复', ], files:[ 'game/game.js', @@ -11,23 +10,24 @@ window.noname_update={ // 'game/config.js', // 'game/source.js', // 'game/pressure.js', - 'game/asset.js', + // 'game/asset.js', // 'card/*', // 'card/standard.js', - 'card/gwent.js', + // 'card/gwent.js', // 'card/gujian.js', // 'character/*', // 'character/hearth.js', // 'character/old.js', - 'character/gwent.js', + // 'character/gwent.js', // 'character/sp.js', // 'character/swd.js', // 'character/rank.js', - // 'character/yijiang.js', + 'character/yijiang.js', // 'character/xianjian.js', // 'mode/identity.js', // 'mode/guozhan.js', - // 'mode/versus.js', + 'mode/versus.js', + 'mode/connect.js', // 'mode/chess.js', // 'mode/tafang.js', // 'mode/guozhan.js', diff --git a/mode/connect.js b/mode/connect.js index bbbe201de..e0edd9dff 100644 --- a/mode/connect.js +++ b/mode/connect.js @@ -5,6 +5,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ start:function(){ var directstartmode=lib.config.directstartmode; ui.create.menu(true); + event.textnode=ui.create.div('','输入联机地址'); var createNode=function(){ if(event.created) return; if(directstartmode&&lib.node){ @@ -39,10 +40,16 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ node.style.textAlign='center'; var connect=function(e){ + event.textnode.innerHTML='正在连接...'; clearTimeout(event.timeout); if(e) e.preventDefault(); game.saveConfig('last_ip',node.innerHTML); - game.connect(node.innerHTML); + game.connect(node.innerHTML,function(success){ + if(!success&&event.textnode){ + alert('连接失败'); + event.textnode.innerHTML='输入联机地址'; + } + }); }; node.addEventListener('keydown',function(e){ if(e.keyCode==13){ @@ -52,7 +59,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ ui.window.appendChild(node); ui.ipnode=node; - var text=ui.create.div(); + var text=event.textnode; text.style.width='400px'; text.style.height='30px'; text.style.lineHeight='30px'; @@ -61,7 +68,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ text.style.padding='10px'; text.style.left='calc(50% - 200px)'; text.style.top='calc(50% - 80px)'; - text.innerHTML='输入联机地址'; text.style.textAlign='center'; ui.window.appendChild(text); ui.iptext=text; @@ -117,11 +123,15 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ game.roomId=info[2]; var n=5; var connect=function(){ + event.textnode.innerHTML='正在连接...'; game.connect(info[0],function(success){ if(!success&&n--){ createNode(); event.timeout=setTimeout(connect,1000); } + else{ + event.textnode.innerHTML='输入联机地址'; + } }); }; event.timeout=setTimeout(connect,500); diff --git a/mode/versus.js b/mode/versus.js index f0084ba1a..9ec091b7e 100644 --- a/mode/versus.js +++ b/mode/versus.js @@ -1458,7 +1458,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(get.config('change_identity')){ event.addSetting(); } - if(get.config('fouralign')){ + if(get.config('fouralign')&&!event.fouralignbutton){ event.fouralignbutton=ui.create.control('变阵',function(){ if(!_status.fouralign.length||(_status.fouralign.length==1&&_status.fouralign[0]==0)){ _status.fouralign=[0,1,2,3,4];