From 4705ff37db1173c411458f9b49f34a1d02e06fc4 Mon Sep 17 00:00:00 2001 From: libccy Date: Fri, 1 May 2015 10:36:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=9A=E4=B9=B1=E3=80=81=E7=AA=83=E5=90=AC?= =?UTF-8?q?=E3=80=81=E6=99=BA=E5=9B=8A=E4=BF=AE=E6=AD=A3=EF=BC=8C=E6=9C=A8?= =?UTF-8?q?=E7=89=9BAI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- card/refresh.js | 15 +++++++++------ character/jiange.js | 18 +++++++++--------- character/sp.js | 31 +++++++++++++++++++++++-------- character/yijiang.js | 1 + mode/guozhan.js | 12 +++++++++++- 5 files changed, 53 insertions(+), 24 deletions(-) diff --git a/card/refresh.js b/card/refresh.js index 0c465a13f..3af29b429 100644 --- a/card/refresh.js +++ b/card/refresh.js @@ -132,13 +132,16 @@ card.refresh={ var dialog=ui.create.dialog('木牛流马',player.get('e','5').cards); var trigger=event.parent.parent; player.chooseButton(dialog,function(button){ - if(get.type(button.link)=='delay') return -1; - if(get.type(button.link)=='equip'){ - var current=player.get('e',{subtype:get.subtype(button.link)})[0]; - if(current&&ai.get.equipValue(current)>=ai.get.equipValue(button.link)) return -1; - return 1; + if(get.info(button.link).selectTarget==-1){ + if(get.type(button.link)=='delay') return -1; + if(get.type(button.link)=='equip'){ + var current=player.get('e',{subtype:get.subtype(button.link)})[0]; + if(current&&ai.get.equipValue(current)>=ai.get.equipValue(button.link)) return -1; + return 1; + } + if(get.tag(button.link,'multitarget')) return -1; + if(button.link.name=='huoshaolianying') return -1; } - if(get.tag(button.link,'multitarget')) return -1; return 1; }).filterButton=function(button){ return trigger.filterCard(button.link,player,trigger); diff --git a/character/jiange.js b/character/jiange.js index 3b472ac43..810deff24 100644 --- a/character/jiange.js +++ b/character/jiange.js @@ -424,12 +424,15 @@ character.jiange={ event.cards2.push(event.cards[i]); } } - if(event.cards2.length==0){ + if(!event.isMine()){ player.showCards(event.cards); - event.target=player; + } + "step 1" + if(event.cards2.length==0){ + event.finish(); } else{ - var dialog=ui.create.dialog('将三张牌中的锦囊牌或装备牌交给一名角色'); + var dialog=ui.create.dialog('将三张牌中的锦囊牌或装备牌交给一名角色','hidden'); dialog.add(event.cards); for(var i=0;iplayer.hp){ @@ -451,16 +454,13 @@ character.jiange={ if(target==player) return att+5; return att; } - if(!event.isMine()){ - dialog.style.display='none'; - } } - "step 1" + "step 2" if(result&&result.targets&&result.targets.length){ event.target=result.targets[0]; } if(event.cards2.length){ - event.target.gain(event.cards2,'gain'); + event.target.gain(event.cards2,'gain2'); } }, ai:{ diff --git a/character/sp.js b/character/sp.js index 30eac769b..a0d7f4c87 100644 --- a/character/sp.js +++ b/character/sp.js @@ -980,23 +980,38 @@ character.sp={ trigger:{source:'dieAfter'}, forced:true, priority:-10, - content:function(){ - if(_status.currentPhase!=trigger.player){ - player.addSkill('qiluan2') - } - else{ - player.draw(3); - } + silent:true, + popup:false, + filter:function(event){ + return _status.currentPhase!=event.player; }, + content:function(){ + player.storage.qiluan=true; + }, + group:['qiluan2','qiluan3'] }, qiluan2:{ trigger:{global:'phaseAfter'}, forced:true, + filter:function(event,player){ + return player.storage.qiluan?true:false; + }, content:function(){ player.draw(3); - player.removeSkill('qiluan2'); + player.storage.qiluan=false; } }, + qiluan3:{ + trigger:{source:'dieAfter'}, + forced:true, + priority:-10, + filter:function(event){ + return _status.currentPhase==event.player; + }, + content:function(){ + player.draw(3); + }, + }, shangyi:{ enable:'phaseUse', usable:1, diff --git a/character/yijiang.js b/character/yijiang.js index cbc80fd95..5f8238423 100644 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -1001,6 +1001,7 @@ character.yijiang={ }, qieting:{ global:'qieting2', + globalSilent:true, trigger:{global:'phaseEnd'}, filter:function(event,player){ return event.player!=player&&!event.player.tempSkills['qieting3']; diff --git a/mode/guozhan.js b/mode/guozhan.js index 44c2f119c..edf176f69 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -303,6 +303,16 @@ mode.guozhan={ ifo.init(game.players[i]); game.players[i].initedSkills.push(game.players[i].hiddenSkills[j]); } + if(ifo.globalSilent){ + if(typeof ifo.global=='string'){ + lib.skill.global.add(ifo.global); + } + else{ + for(var j=0;j