From 3725e6d37069b5c839adf9030fadb2606c258581 Mon Sep 17 00:00:00 2001 From: libccy Date: Fri, 11 Dec 2015 13:07:11 +0800 Subject: [PATCH] skill --- .../skill/{longdan11.mp3 => longdan_sha1.mp3} | Bin .../skill/{longdan12.mp3 => longdan_sha2.mp3} | Bin .../{longdan21.mp3 => longdan_shan1.mp3} | Bin .../{longdan22.mp3 => longdan_shan2.mp3} | Bin character/sp.js | 32 +++--- character/standard.js | 105 +++++++++--------- character/wind.js | 1 - game/game.js | 21 +++- 8 files changed, 90 insertions(+), 69 deletions(-) rename audio/skill/{longdan11.mp3 => longdan_sha1.mp3} (100%) rename audio/skill/{longdan12.mp3 => longdan_sha2.mp3} (100%) rename audio/skill/{longdan21.mp3 => longdan_shan1.mp3} (100%) rename audio/skill/{longdan22.mp3 => longdan_shan2.mp3} (100%) diff --git a/audio/skill/longdan11.mp3 b/audio/skill/longdan_sha1.mp3 similarity index 100% rename from audio/skill/longdan11.mp3 rename to audio/skill/longdan_sha1.mp3 diff --git a/audio/skill/longdan12.mp3 b/audio/skill/longdan_sha2.mp3 similarity index 100% rename from audio/skill/longdan12.mp3 rename to audio/skill/longdan_sha2.mp3 diff --git a/audio/skill/longdan21.mp3 b/audio/skill/longdan_shan1.mp3 similarity index 100% rename from audio/skill/longdan21.mp3 rename to audio/skill/longdan_shan1.mp3 diff --git a/audio/skill/longdan22.mp3 b/audio/skill/longdan_shan2.mp3 similarity index 100% rename from audio/skill/longdan22.mp3 rename to audio/skill/longdan_shan2.mp3 diff --git a/character/sp.js b/character/sp.js index defeb80ca..b0c9bbc0a 100755 --- a/character/sp.js +++ b/character/sp.js @@ -1290,21 +1290,23 @@ character.sp={ threaten:1.2 }, tongji:{ - global:'tongji2', + global:'tongji_disable', unique:true, gainnable:true, - }, - tongji2:{ - mod:{ - targetEnabled:function(card,player,target){ - if(player.skills.contains('tongji')) return; - if(card.name=='sha'){ - if(target.skills.contains('tongji')) return; - for(var i=0;i0; }, content:function(){ @@ -2918,7 +2920,7 @@ character.sp={ audio:2, trigger:{player:'respond'}, filter:function(event,player){ - if(event.skill!='longdan2'&&event.skill!='longdan1') return false; + if(event.skill!='longdan_shan'&&event.skill!='longdan_sha') return false; return event.source&&event.source.num('h')>0; }, content:function(){ diff --git a/character/standard.js b/character/standard.js index 1184776a5..8307045dd 100755 --- a/character/standard.js +++ b/character/standard.js @@ -405,10 +405,16 @@ character.standard={ return get.color(card)=='black'; }, viewAs:{name:'shan'}, + viewAsFilter:function(player){ + if(!player.num('h',{color:'black'})) return false; + }, prompt:'将一张黑色牌当闪打出', check:function(){return 1}, ai:{ respondShan:true, + skillTagFilter:function(player){ + if(!player.num('h',{color:'black'})) return false; + }, result:{ target:function(card,player,target,current){ if(get.tag(card,'respondShan')&¤t<0) return 0.6 @@ -651,6 +657,9 @@ character.standard={ prompt:'将一张红色牌当杀使用或打出', check:function(card){return 4-ai.get.value(card)}, ai:{ + skillTagFilter:function(player){ + if(!player.num('he',{color:'red'})) return false; + }, respondSha:true, } }, @@ -806,60 +815,56 @@ character.standard={ }, content:function(){} }, - test:{ - subSkills:{ - t1:{}, - t2:{} - } - }, longdan:{ - group:['longdan1','longdan2'] - }, - longdan1:{ - audio:2, - enable:['chooseToUse','chooseToRespond'], - filterCard:{name:'shan'}, - viewAs:{name:'sha'}, - viewAsFilter:function(player){ - if(!player.num('h','shan')) return false; - }, - prompt:'将一张闪当杀使用或打出', - check:function(){return 1}, - ai:{ - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondSha')&¤t<0) return 0.6 + group:['longdan_sha','longdan_shan'], + subSkill:{ + sha:{ + audio:2, + enable:['chooseToUse','chooseToRespond'], + filterCard:{name:'shan'}, + viewAs:{name:'sha'}, + viewAsFilter:function(player){ + if(!player.num('h','shan')) return false; + }, + prompt:'将一张闪当杀使用或打出', + check:function(){return 1}, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondSha')&¤t<0) return 0.6 + } + }, + respondSha:true, + skillTagFilter:function(player){ + if(!player.num('h','shan')) return false; + }, + order:4, + useful:-1, + value:-1 } }, - respondSha:true, - skillTagFilter:function(player){ - if(!player.num('h','shan')) return false; - }, - order:4, - useful:-1, - value:-1 - } - }, - longdan2:{ - audio:2, - enable:['chooseToRespond'], - filterCard:{name:'sha'}, - viewAs:{name:'shan'}, - prompt:'将一张杀当闪打出', - check:function(){return 1}, - ai:{ - respondShan:true, - skillTagFilter:function(player){ - if(!player.num('h','sha')) return false; - }, - effect:{ - target:function(card,player,target,current){ - if(get.tag(card,'respondShan')&¤t<0) return 0.6 + shan:{ + audio:2, + enable:['chooseToRespond'], + filterCard:{name:'sha'}, + viewAs:{name:'shan'}, + prompt:'将一张杀当闪打出', + check:function(){return 1}, + ai:{ + respondShan:true, + skillTagFilter:function(player){ + if(!player.num('h','sha')) return false; + }, + effect:{ + target:function(card,player,target,current){ + if(get.tag(card,'respondShan')&¤t<0) return 0.6 + } + }, + order:4, + useful:-1, + value:-1 } - }, - order:4, - useful:-1, - value:-1 + } } }, mashu:{ diff --git a/character/wind.js b/character/wind.js index 9ee2c0f18..1fbb2d2c3 100755 --- a/character/wind.js +++ b/character/wind.js @@ -13,7 +13,6 @@ character.wind={ // yuji:['male','qun',3,['guhuo']], }, skill:{ - diyleiji:{ audio:2, trigger:{player:'respond'}, diff --git a/game/game.js b/game/game.js index 987c8f272..471c420d9 100755 --- a/game/game.js +++ b/game/game.js @@ -11684,9 +11684,9 @@ lib.translate[i+'_info']=lib.translate[lib.skill[i].inherit+'_info']; } } - if(lib.skill[i].subSkills){ - for(var j in lib.skill[i].subSkills){ - lib.skill[i+'_'+j]=lib.skill[i].subSkills[j]; + if(lib.skill[i].subSkill){ + for(var j in lib.skill[i].subSkill){ + lib.skill[i+'_'+j]=lib.skill[i].subSkill[j]; lib.translate[i+'_'+j]=lib.translate[i]; } } @@ -20029,6 +20029,21 @@ window.lib=lib; window._status=_status; }, + u:function(){ + var card={name:'sha'},source=game.me.next; + for(var i=0;i