From 51cc96817424ca31c3c26de5dc781a41fdaa7aca Mon Sep 17 00:00:00 2001 From: libccy Date: Wed, 13 Apr 2016 13:36:59 +0800 Subject: [PATCH] 1.8.6 --- character/shenhua.js | 29 ++++++++++++++++++----------- character/standard.js | 2 ++ game/game.js | 12 +++++++----- mode/connect.js | 7 +++++-- 4 files changed, 32 insertions(+), 18 deletions(-) diff --git a/character/shenhua.js b/character/shenhua.js index cf441927d..f07cc338e 100644 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -312,19 +312,21 @@ character.shenhua={ if(result.bool){ player.logSkill('qiaobian',result.targets); player.discard(result.cards); + event.targets=result.targets; + } + else{ + event.finish(); } "step 2" game.delay(); "step 3" - if(result.bool){ - for(var i=0;i0) return false; @@ -2233,7 +2235,10 @@ character.shenhua={ return -2; }, target:function(player,target){ - if(player.hp<=2) return 0; + if(!ui.selected.cards.length){ + if(player.hp<2) return 0; + if(player.hp==2&&target.hp>=2) return 0; + } return ai.get.damageEffect(target,player); } } @@ -2477,6 +2482,7 @@ character.shenhua={ content:function(){ "step 0"; player.chooseTarget('是否发动【新雷击】?').ai=function(target){ + if(target.skills.contains('hongyan')) return 0; return ai.get.damageEffect(target,_status.event.player,_status.event.player,'thunder'); }; "step 1" @@ -2816,6 +2822,7 @@ character.shenhua={ content:function(){ "step 0"; player.chooseTarget('是否发动【雷击】?').ai=function(target){ + if(target.skills.contains('hongyan')) return 0; return ai.get.damageEffect(target,_status.event.player,_status.event.player,'thunder'); }; "step 1" diff --git a/character/standard.js b/character/standard.js index 4eda9b08e..64ffe6830 100755 --- a/character/standard.js +++ b/character/standard.js @@ -217,6 +217,8 @@ character.standard={ event.finish();return; } trigger.source.chooseToDiscard(2).set('ai',function(card){ + if(card.name=='tao') return -10; + if(card.name=='jiu'&&_status.event.player.hp==1) return -10; return ai.get.unuseful(card)+2.5*(5-get.owner(card).hp); }); "step 2" diff --git a/game/game.js b/game/game.js index 704a61ee0..a6f1d4ded 100755 --- a/game/game.js +++ b/game/game.js @@ -15420,11 +15420,6 @@ else if(!_status.connectMode&&get.config('continue_game')){ ui.continue_game=ui.create.control('再战',game.reloadCurrent); } - if(_status.connectMode&&!game.online&&!game.onlineroom){ - localStorage.setItem(lib.configprefix+'directstart',true); - game.saveConfig('directstartmode',lib.config.mode); - game.saveConfig('mode','connect'); - } if(!ui.restart){ ui.restart=ui.create.control('restart',game.reload); } @@ -17587,6 +17582,13 @@ game.send('server','enter',_status.roomindex,lib.config.connect_nickname,lib.config.connect_avatar); } else{ + localStorage.setItem(lib.configprefix+'directstart',true); + game.saveConfig('directstartmode',active.mode); + game.saveConfig('mode','connect'); + ui.exitroom=ui.create.system('退出房间',function(){ + game.saveConfig('directstartmode'); + game.reload(); + },true); game.switchMode(active.mode); } clickContainer.call(menuContainer); diff --git a/mode/connect.js b/mode/connect.js index 7d0522676..5eb0e4a3e 100644 --- a/mode/connect.js +++ b/mode/connect.js @@ -2,11 +2,14 @@ mode.connect={ start:function(){ var directstartmode=lib.config.directstartmode; - game.saveConfig('directstartmode'); ui.create.menu(true); var createNode=function(){ if(event.created) return; - if(directstartmode){ + if(directstartmode&&lib.node){ + ui.exitroom=ui.create.system('退出房间',function(){ + game.saveConfig('directstartmode'); + game.reload(); + },true); game.switchMode(directstartmode); return; }