From dbe919543b3bce983fe7d18565d5ebe11f51d949 Mon Sep 17 00:00:00 2001 From: libccy Date: Wed, 7 Mar 2018 16:21:38 +0800 Subject: [PATCH] jlm --- character/diy.js | 4 +++- character/shenhua.js | 40 ++++++++++++++++++++++++++++++++++++++++ character/yijiang.js | 3 +++ 3 files changed, 46 insertions(+), 1 deletion(-) diff --git a/character/diy.js b/character/diy.js index 16f5a99a9..4d8ca79a9 100644 --- a/character/diy.js +++ b/character/diy.js @@ -1808,7 +1808,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ direct:true, content:function(){ 'step 0' - player.chooseToUse(get.prompt('nsjianxiong',trigger.player),trigger.player,-1); + player.chooseToUse(function(card){ + return !get.info(card).multitarget; + },get.prompt('nsjianxiong',trigger.player),trigger.player,-1); 'step 1' if(event.damaged){ trigger.cancel(); diff --git a/character/shenhua.js b/character/shenhua.js index 49df5d5f0..44f4e0efc 100644 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -440,6 +440,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, selectCard:2, check:function(card){ + var player=_status.event.player; + var targets=game.filterPlayer(function(current){ + return player.canUse('wanjian',current); + }); + var num=0; + for(var i=0;i=7){ + if(num<2) return 0; + } + else if(targets.length>=5){ + if(num<1.5) return 0; + } + } return 6-get.value(card); }, ai:{ @@ -3254,6 +3274,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ selectCard:2, complexCard:true, check:function(card){ + var player=_status.event.player; + var targets=game.filterPlayer(function(current){ + return player.canUse('wanjian',current); + }); + var num=0; + for(var i=0;i=7){ + if(num<2) return 0; + } + else if(targets.length>=5){ + if(num<1.5) return 0; + } + } return 6-get.value(card); }, ai:{ diff --git a/character/yijiang.js b/character/yijiang.js index 079776c63..01e936878 100644 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -2989,6 +2989,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:'phaseUse', usable:1, + filter:function(event,player){ + return player.countCards('h',{type:['trick','delay'],color:'black'}); + }, filterCard:function(card){ return get.color(card)=='black'&&get.type(card,'trick')=='trick'; },