From aaa0d617d29e2de0f289f4f7f9a6ef41c55690e7 Mon Sep 17 00:00:00 2001 From: libccy Date: Thu, 9 Feb 2017 21:32:31 +0800 Subject: [PATCH] 2 --- card/sp.js | 8 ++------ card/swd.js | 7 +++++-- character/extra.js | 2 +- character/hearth.js | 2 +- character/refresh.js | 19 ++----------------- character/standard.js | 11 ++--------- character/swd.js | 6 ++---- character/xianjian.js | 2 +- character/yijiang.js | 7 ++++--- character/yxs.js | 2 +- game/game.js | 6 +++++- 11 files changed, 26 insertions(+), 46 deletions(-) diff --git a/card/sp.js b/card/sp.js index b71b3d20b..bc6b72e3f 100644 --- a/card/sp.js +++ b/card/sp.js @@ -66,12 +66,7 @@ card.sp={ }, shengdong:{ fullskin:true, - enable:function(card,player){ - var hs=player.get('h'); - if(hs.length>1) return true; - if(hs.length==1&&hs[0]!=card) return true; - return false; - }, + enable:true, chongzhu:function(){ return game.players.length<=2; }, @@ -127,6 +122,7 @@ card.sp={ target:function(player,target){ var ok=false; var hs=player.get('h'); + if(hs.length<=1) return 0; for(var i=0;i0&&event.source!=player); }, content:function(){ - "step 0" - event.num=trigger.num; - "step 1" - if(num==0||trigger.source.num('he')==0){ - event.finish(); - return; - } - event.num--; - player.choosePlayerCard(get.prompt('refankui',trigger.source),trigger.source,ai.get.buttonValue,'he'); - "step 2" - if(result.bool){ - player.logSkill('refankui',trigger.source); - player.gain(result.links[0],trigger.source); - trigger.source.$give(1,player); - event.goto(1); - } + player.gainPlayerCard([1,trigger.num],get.prompt('fankui',trigger.source),trigger.source,ai.get.buttonValue,'he').set('logSkill',['fankui',trigger.source]); }, ai:{ effect:{ diff --git a/character/standard.js b/character/standard.js index 49ad20d82..753952fa5 100644 --- a/character/standard.js +++ b/character/standard.js @@ -124,17 +124,10 @@ character.standard={ trigger:{player:'damageEnd'}, direct:true, filter:function(event,player){ - return (event.source&&event.source.num('he')); + return (event.source&&event.source.num('he')&&event.source!=player); }, content:function(){ - "step 0" - player.choosePlayerCard(get.prompt('fankui',trigger.source),trigger.source,ai.get.buttonValue,'he'); - "step 1" - if(result.bool){ - player.logSkill('fankui',trigger.source); - player.gain(result.links[0],trigger.source); - trigger.source.$give(1,player); - } + player.gainPlayerCard(get.prompt('fankui',trigger.source),trigger.source,ai.get.buttonValue,'he').set('logSkill',['fankui',trigger.source]); }, ai:{ effect:{ diff --git a/character/swd.js b/character/swd.js index 1636e9de2..32ac68175 100644 --- a/character/swd.js +++ b/character/swd.js @@ -4719,8 +4719,7 @@ character.swd={ else{ player.gain(result.buttons[0].link,event.target); } - event.target.$give(1,player); - game.delay(); + event.target.$giveAuto(result.buttons[0].link,player); } }, }, @@ -7735,8 +7734,7 @@ character.swd={ "step 1" if(result.bool){ player.gain(result.links[0],target); - target.$give(1,player); - game.delay(0,500); + target.$giveAuto(result.links[0],player); } }, ai:{ diff --git a/character/xianjian.js b/character/xianjian.js index f39595513..1ff8e12f2 100644 --- a/character/xianjian.js +++ b/character/xianjian.js @@ -114,7 +114,7 @@ character.xianjian={ trigger.target.$give(card,player); } else{ - trigger.target.$give(1,player); + trigger.target.$giveAuto(card,player); } 'step 1' if(game.players.length>2){ diff --git a/character/yijiang.js b/character/yijiang.js index 62e5b00dc..90f310a6b 100644 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -602,7 +602,7 @@ character.yijiang={ player.$give(card,trigger.source); } else{ - player.$give(1,trigger.source); + player.$giveAuto(card,trigger.source); } trigger.untrigger(); trigger.finish(); @@ -1188,8 +1188,9 @@ character.yijiang={ audio:2, content:function(){ 'step 0' - player.gain(target.get('h').randomGet(),target); - target.$give(1,player); + var card=target.get('h').randomGet(); + player.gain(card,target); + target.$giveAuto(card,player); 'step 1' var name=get.translation(target.name); player.chooseControl(function(){ diff --git a/character/yxs.js b/character/yxs.js index 647afb4d6..f272ba688 100644 --- a/character/yxs.js +++ b/character/yxs.js @@ -856,7 +856,7 @@ character.yxs={ if(hs.length){ event.card=hs.randomGet(); player.gain(event.card,target); - target.$give(1,player); + target.$giveAuto(event.card,player); } else{ event.finish(); diff --git a/game/game.js b/game/game.js index 01691a3df..934bcf337 100644 --- a/game/game.js +++ b/game/game.js @@ -30205,6 +30205,10 @@ var nodes=[]; _status.clickingidentity=[this.parentNode,nodes]; var num=1; + var dy=30; + if(get.is.phoneLayout()){ + dy=40; + } for(var i in list){ if(this.firstChild.innerHTML!=list[i]){ var node=ui.create.div('.identity.hidden',this.parentNode,ui.click.identity2); @@ -30212,7 +30216,7 @@ node.dataset.color=i; ui.refresh(node); node.show(); - var transstr='translateY('+((num++)*30)+'px)'; + var transstr='translateY('+((num++)*dy)+'px)'; if(get.is.phoneLayout()){ transstr+=' scale(1.3)'; }