diff --git a/character/refresh.js b/character/refresh.js index a767b3bb4..8530e04d6 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -80,7 +80,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, characterFilter:{ re_zuoci:function(mode){ - return mode=='identity'||mode=='single'; + return mode=='identity'||mode=='single'||mode=='doudizhu'; } }, perfectPair:{ @@ -88,7 +88,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, skill:{ rehuashen:{ - mode:['identity','single'], + mode:['identity','single','doudizhu'], audio:2, unique:true, direct:true, @@ -340,7 +340,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, rexinsheng:{ - mode:['identity','single'], + mode:['identity','single','doudizhu'], unique:true, audio:2, trigger:{player:'damageEnd'}, diff --git a/character/shenhua.js b/character/shenhua.js index 7233b600d..3525b82fc 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -1544,10 +1544,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(name=='useCardAfter'&&['equip','delay'].contains(get.type(event.card))) return false; if(event.cards.filterInD().length<=0) return false; var history=player.getHistory('useCard'); + var evt=name=='useCardAfter'?event:event.getParent(); for(var i=0;i0; + }, + content:function(){ + player.chooseToDiscard('he',true); + }, + }, + xjshijian:{ + audio:2, + trigger:{global:'useCardAfter'}, + direct:true, + filter:function(event,player){ + if(event.player==player) return false; + var evt=event.getParent('phaseUse'); + if(!evt||evt.player!=event.player) return false; + return event.player.getHistory('useCard',function(evtt){ + return evtt.getParent('phaseUse')==evt; + }).indexOf(event)==1&&player.countCards('he')>0; + }, + content:function(){ + 'step 0' + var next=player.chooseToDiscard('he',get.prompt('xjshijian',trigger.player),'弃置一张牌并令其获得技能〖誉虚〗至回合结束'); + next.set('logSkill',['xjshijian',trigger.player]); + next.set('check',get.attitude(player,trigger.player)>0&&trigger.player.countCards('h')>2); + next.ai=function(card){ + if(_status.event.check) return 5-get.value(card); + return -1; + }; + 'step 1' + if(result.bool) trigger.player.addTempSkill('yuxu'); + }, + }, pingjian:{ mode:['identity','single','guozhan'], audio:2, @@ -1216,8 +1275,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xpchijie2:{ charlotte:true, trigger:{ - global:'useCardAfter', - player:'damage', + global:['useCardAfter','damage'], }, onremove:true, forced:true, @@ -1227,8 +1285,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return event.card==player.storage.xpchijie2; }, content:function(){ - if(trigger.name=='damage') player.addTempSkill('xpchijie3'); - else if(!player.hasSkill('xpchijie3')){ + if(trigger.name=='damage') player.addTempSkill(player==trigger.player?'xpchijie3':'xpchijie4'); + else if(!player.hasSkill('xpchijie4')&&!player.hasSkill('xpchijie3')){ var cards=[]; var cs=trigger.cards; for(var i=0;i=player.hp; + if(_status.currentPhase==player) return false; + var num=0; + player.getHistory('lose',function(evt){ + if(evt.cards2&&evt.getParent('phaseUse')==event) num+=evt.cards2.length; + }); + return num>=player.hp; }, content:function(){ 'step 0' @@ -2747,30 +2810,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.draw(num); } }, - subSkill:{ - init:{ - trigger:{global:'phaseUseBegin'}, - filter:function(event,player){ - return _status.currentPhase!=player; - }, - silent:true, - content:function(){ - player.storage.diancai=0; - } - }, - count:{ - trigger:{player:'loseEnd'}, - silent:true, - filter:function(event,player){ - return _status.currentPhase!=player; - }, - content:function(){ - for(var i=0;i0; + var num=0; + player.getHistory('lose',function(evt){ + if(evt.cards2) num+=evt.cards2.length; + }); + return num>0&&num<=player.hp }, frequent:true, content:function (){ 'step 0' - var num=player.storage.xinfu_shangjian; + var num=0; + player.getHistory('lose',function(evt){ + if(evt.cards2) num+=evt.cards2.length; + }); if(num>0){ player.draw(num); } }, - subSkill:{ - init:{ - trigger:{ - global:"phaseBefore", - }, - filter:function (event,player){ - return true; - }, - silent:true, - content:function (){ - player.storage.xinfu_shangjian=0; - }, - sub:true, - forced:true, - popup:false, - }, - count:{ - trigger:{ - player:"loseEnd", - }, - silent:true, - filter:function (event,player){ - return true; - }, - content:function (){ - for(var i=0;i0||target.hp<=2){ spade=false; @@ -3980,12 +3982,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return -get.value(card); }).set('spade',spade); 'step 1' + if(!result.cards||!result.cards.length) return; var card=result.cards[0]; if(get.suit(card)=='spade'){ player.turnOver(); target.loseHp(); } - player.storage.jiyu.push(target); player.storage.jiyu2.add(get.suit(card)); }, ai:{ @@ -4005,7 +4007,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, jiyu2:{ - trigger:{player:['phaseUseBegin','phaseAfter']}, + trigger:{player:['phaseUseBegin','phaseUseAfter']}, silent:true, content:function(){ player.storage.jiyu=[];