This commit is contained in:
libccy 2015-12-11 13:07:11 +08:00
parent 9fdcfa7aa0
commit 3725e6d370
8 changed files with 90 additions and 69 deletions

View File

@ -1290,21 +1290,23 @@ character.sp={
threaten:1.2 threaten:1.2
}, },
tongji:{ tongji:{
global:'tongji2', global:'tongji_disable',
unique:true, unique:true,
gainnable:true, gainnable:true,
}, subSkill:{
tongji2:{ disable:{
mod:{ mod:{
targetEnabled:function(card,player,target){ targetEnabled:function(card,player,target){
if(player.skills.contains('tongji')) return; if(player.skills.contains('tongji')) return;
if(card.name=='sha'){ if(card.name=='sha'){
if(target.skills.contains('tongji')) return; if(target.skills.contains('tongji')) return;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].skills.contains('tongji')){ if(game.players[i].skills.contains('tongji')){
if(game.players[i].hp<game.players[i].num('h')&& if(game.players[i].hp<game.players[i].num('h')&&
get.distance(player,game.players[i],'attack')<=1){ get.distance(player,game.players[i],'attack')<=1){
return false; return false;
}
}
} }
} }
} }
@ -2905,7 +2907,7 @@ character.sp={
audio:2, audio:2,
trigger:{player:'shaBefore'}, trigger:{player:'shaBefore'},
filter:function(event,player){ filter:function(event,player){
if(event.skill!='longdan1') return false; if(event.skill!='longdan_sha') return false;
return event.target.num('h')>0; return event.target.num('h')>0;
}, },
content:function(){ content:function(){
@ -2918,7 +2920,7 @@ character.sp={
audio:2, audio:2,
trigger:{player:'respond'}, trigger:{player:'respond'},
filter:function(event,player){ 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; return event.source&&event.source.num('h')>0;
}, },
content:function(){ content:function(){

View File

@ -405,10 +405,16 @@ character.standard={
return get.color(card)=='black'; return get.color(card)=='black';
}, },
viewAs:{name:'shan'}, viewAs:{name:'shan'},
viewAsFilter:function(player){
if(!player.num('h',{color:'black'})) return false;
},
prompt:'将一张黑色牌当闪打出', prompt:'将一张黑色牌当闪打出',
check:function(){return 1}, check:function(){return 1},
ai:{ ai:{
respondShan:true, respondShan:true,
skillTagFilter:function(player){
if(!player.num('h',{color:'black'})) return false;
},
result:{ result:{
target:function(card,player,target,current){ target:function(card,player,target,current){
if(get.tag(card,'respondShan')&&current<0) return 0.6 if(get.tag(card,'respondShan')&&current<0) return 0.6
@ -651,6 +657,9 @@ character.standard={
prompt:'将一张红色牌当杀使用或打出', prompt:'将一张红色牌当杀使用或打出',
check:function(card){return 4-ai.get.value(card)}, check:function(card){return 4-ai.get.value(card)},
ai:{ ai:{
skillTagFilter:function(player){
if(!player.num('he',{color:'red'})) return false;
},
respondSha:true, respondSha:true,
} }
}, },
@ -806,60 +815,56 @@ character.standard={
}, },
content:function(){} content:function(){}
}, },
test:{
subSkills:{
t1:{},
t2:{}
}
},
longdan:{ longdan:{
group:['longdan1','longdan2'] group:['longdan_sha','longdan_shan'],
}, subSkill:{
longdan1:{ sha:{
audio:2, audio:2,
enable:['chooseToUse','chooseToRespond'], enable:['chooseToUse','chooseToRespond'],
filterCard:{name:'shan'}, filterCard:{name:'shan'},
viewAs:{name:'sha'}, viewAs:{name:'sha'},
viewAsFilter:function(player){ viewAsFilter:function(player){
if(!player.num('h','shan')) return false; if(!player.num('h','shan')) return false;
}, },
prompt:'将一张闪当杀使用或打出', prompt:'将一张闪当杀使用或打出',
check:function(){return 1}, check:function(){return 1},
ai:{ ai:{
effect:{ effect:{
target:function(card,player,target,current){ target:function(card,player,target,current){
if(get.tag(card,'respondSha')&&current<0) return 0.6 if(get.tag(card,'respondSha')&&current<0) return 0.6
}
},
respondSha:true,
skillTagFilter:function(player){
if(!player.num('h','shan')) return false;
},
order:4,
useful:-1,
value:-1
} }
}, },
respondSha:true, shan:{
skillTagFilter:function(player){ audio:2,
if(!player.num('h','shan')) return false; enable:['chooseToRespond'],
}, filterCard:{name:'sha'},
order:4, viewAs:{name:'shan'},
useful:-1, prompt:'将一张杀当闪打出',
value:-1 check:function(){return 1},
} ai:{
}, respondShan:true,
longdan2:{ skillTagFilter:function(player){
audio:2, if(!player.num('h','sha')) return false;
enable:['chooseToRespond'], },
filterCard:{name:'sha'}, effect:{
viewAs:{name:'shan'}, target:function(card,player,target,current){
prompt:'将一张杀当闪打出', if(get.tag(card,'respondShan')&&current<0) return 0.6
check:function(){return 1}, }
ai:{ },
respondShan:true, order:4,
skillTagFilter:function(player){ useful:-1,
if(!player.num('h','sha')) return false; value:-1
},
effect:{
target:function(card,player,target,current){
if(get.tag(card,'respondShan')&&current<0) return 0.6
} }
}, }
order:4,
useful:-1,
value:-1
} }
}, },
mashu:{ mashu:{

View File

@ -13,7 +13,6 @@ character.wind={
// yuji:['male','qun',3,['guhuo']], // yuji:['male','qun',3,['guhuo']],
}, },
skill:{ skill:{
diyleiji:{ diyleiji:{
audio:2, audio:2,
trigger:{player:'respond'}, trigger:{player:'respond'},

View File

@ -11684,9 +11684,9 @@
lib.translate[i+'_info']=lib.translate[lib.skill[i].inherit+'_info']; lib.translate[i+'_info']=lib.translate[lib.skill[i].inherit+'_info'];
} }
} }
if(lib.skill[i].subSkills){ if(lib.skill[i].subSkill){
for(var j in lib.skill[i].subSkills){ for(var j in lib.skill[i].subSkill){
lib.skill[i+'_'+j]=lib.skill[i].subSkills[j]; lib.skill[i+'_'+j]=lib.skill[i].subSkill[j];
lib.translate[i+'_'+j]=lib.translate[i]; lib.translate[i+'_'+j]=lib.translate[i];
} }
} }
@ -20029,6 +20029,21 @@
window.lib=lib; window.lib=lib;
window._status=_status; window._status=_status;
}, },
u:function(){
var card={name:'sha'},source=game.me.next;
for(var i=0;i<arguments.length;i++){
if(get.itemtype(arguments[i])=='player'){
source=arguments[i];
}
else if(typeof arguments[i]=='object'){
card=arguments[i];
}
else if(typeof arguments[i]=='string'){
card={name:arguments[i]}
}
}
source.useCard(card,game.me);
},
rank:function(){ rank:function(){
var list=lib.rank.s.concat(lib.rank.ap).concat(lib.rank.a).concat(lib.rank.am). var list=lib.rank.s.concat(lib.rank.ap).concat(lib.rank.a).concat(lib.rank.am).
concat(lib.rank.bp).concat(lib.rank.b).concat(lib.rank.bm).concat(lib.rank.c).concat(lib.rank.d); concat(lib.rank.bp).concat(lib.rank.b).concat(lib.rank.bm).concat(lib.rank.c).concat(lib.rank.d);