diff --git a/card/yunchou.js b/card/yunchou.js index 471519996..c3020fcbc 100644 --- a/card/yunchou.js +++ b/card/yunchou.js @@ -36,6 +36,7 @@ card.yunchou={ }, ai:{ order:4, + value:[5,1], result:{ target:function(player,target){ if(player.hasShan()) return -1; @@ -75,6 +76,7 @@ card.yunchou={ }, ai:{ order:6, + value:[4,1], result:{ target:function(player,target){ return -2/Math.sqrt(1+target.num('h')); @@ -121,6 +123,8 @@ card.yunchou={ selectTarget:2, ai:{ order:5, + value:[7,1], + useful:[4,1], result:{ target:-1, } @@ -161,7 +165,7 @@ card.yunchou={ 'step 1' if(event.list.length){ event.current=event.list.shift(); - event.current.chooseBool('是否响应'+get.translation(player)+'的舌战群儒?',function(event,player){ + event.current.chooseBool('是否响应'+get.translation(target)+'的舌战群儒?',function(event,player){ if(ai.get.attitude(player,_status.event.source)>=0) return false; var hs=player.get('h'); for(var i=0;i0){ - player.draw(3); + target.draw(3); } }, callback:function(){ @@ -213,6 +217,8 @@ card.yunchou={ }, ai:{ order:8.5, + value:[6,1], + useful:[3,1], result:{ target:function(player,target){ var hs=target.get('h'); @@ -229,7 +235,46 @@ card.yunchou={ youdishenru:{ fullskin:true, type:'trick', - enable:true, + notarget:true, + content:function(){ + 'step 0' + event.source=event.getParent(3).source; + if(!event.source){ + event.finish(); + return; + } + var evt=event.getParent(3)._trigger; + evt.untrigger(); + evt.finish(); + event.source.storage.youdishenru=player; + event.source.addSkill('youdishenru'); + 'step 1' + event.source.chooseToUse({name:'sha'},player,-1,'对'+get.translation(player)+'使用一张杀,或受到一点伤害'); + 'step 2' + if(result.bool){ + if(event.source.storage.youdishenru){ + event.goto(1); + } + else{ + event.source.removeSkill('youdishenru'); + } + } + else{ + event.source.damage(player); + event.source.removeSkill('youdishenru'); + } + }, + ai:{ + value:[5,1], + useful:[5,1], + order:1, + result:{ + player:function(player){ + if(ai.get.attitude(player,_status.event.parent.source)<=0) return 1; + return 0; + } + } + } }, wangmeizhike:{ fullskin:true, @@ -504,8 +549,8 @@ card.yunchou={ wuxie:function(){ return 0; }, - useful:3, - value:4 + useful:[3,1], + value:[4,1] } }, hufu:{ @@ -897,6 +942,32 @@ card.yunchou={ } }, toulianghuanzhu2:{}, + youdishenru:{ + trigger:{source:'damageEnd'}, + forced:true, + popup:false, + silent:true, + onremove:function(player){ + delete player.storage.youdishenru; + }, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.player==player.storage.youdishenru; + }, + content:function(){ + delete player.storage.youdishenru; + } + }, + _youdishenru:{ + trigger:{target:'shaBefore'}, + direct:true, + filter:function(event,player){ + return player.hasCard('youdishenru'); + }, + content:function(){ + event.source=trigger.player; + player.chooseToUse({name:'youdishenru'},'是否使用诱敌深入?'); + } + }, _chenhuodajie:{ trigger:{global:'damageEnd'}, direct:true, @@ -904,14 +975,7 @@ card.yunchou={ if(event.player==player) return false; if(!event.player.num('he')) return false; if(!lib.filter.targetEnabled({name:'chenhuodajie'},player,event.player)) return false; - if(player.num('h','chenhuodajie')) return true; - var mn=player.get('e','5'); - if(mn&&mn.name=='muniu'&&mn.cards&&mn.cards.length){ - for(var i=0;ievent.card2.number){ + player.popup('胜'); + event.current.popup('负'); + str=get.translation(player.name)+'拼点成功'; + } + else{ + if(event.card1.number==event.card2.number){ + player.popup('平'); + event.current.popup('平'); + } + else{ + player.popup('负'); + event.current.popup('胜'); + } + str=get.translation(player.name)+'拼点失败'; + } + game.broadcastAll(function(str){ + var dialog=ui.create.dialog(str); + dialog.classList.add('center'); + setTimeout(function(){ + dialog.close(); + },500); + },str); + },1500); } else{ event.finish(); @@ -12802,6 +12831,16 @@ if(this.hasSkillTag('respondShan',true)) return true; return false; }, + hasCard:function(name){ + if(this.num('h',name)) return true; + var mn=this.get('e','5'); + if(mn&&mn.name.indexOf('muniu')==0&&mn.cards&&mn.cards.length){ + for(var i=0;i