This commit is contained in:
libccy 2017-04-02 13:35:37 +08:00
parent 01b4e4abef
commit 26908a0a7b
5 changed files with 124 additions and 14 deletions

View File

@ -155,17 +155,38 @@ card.sp={
qibaodao:{
fullskin:true,
type:'equip',
subtype:'equip1'
subtype:'equip1',
skills:['qibaodao'],
distance:{attackFrom:-1},
ai:{
equipValue:function(card,player){
if(game.hasPlayer(function(current){
return player.canUse('sha',current)&&current.isHealthy()&&ai.get.attitude(player,current)<0;
})){
return 5;
}
return 3;
}
},
},
zhungangshuo:{
fullskin:true,
type:'equip',
subtype:'equip1'
subtype:'equip1',
skills:['zhungangshuo'],
distance:{attackFrom:-2},
ai:{
equipValue:4
},
},
lanyinjia:{
fullskin:true,
type:'equip',
subtype:'equip2'
subtype:'equip2',
skills:['lanyinjia','lanyinjia2'],
ai:{
equipValue:6
}
},
yinyueqiang:{
fullskin:true,
@ -399,6 +420,95 @@ card.sp={
}
},
skill:{
lanyinjia:{
enable:['chooseToRespond'],
filterCard:true,
viewAs:{name:'shan'},
viewAsFilter:function(player){
if(!player.countCards('h')) return false;
},
prompt:'将一张手牌当闪打出',
check:function(card){
return 6-ai.get.value(card);
},
ai:{
respondShan:true,
skillTagFilter:function(player){
if(!player.countCards('h')) return false;
},
effect:{
target:function(card,player,target,current){
if(get.tag(card,'respondShan')&&current<0&&target.countCards('h')) return 0.59
}
},
order:4,
useful:-0.5,
value:-0.5
}
},
lanyinjia2:{
trigger:{player:'damageEnd'},
forced:true,
filter:function(event,player){
return event.card&&event.card.name=='sha'&&player.getEquip('lanyinjia');
},
content:function(){
var card=player.getEquip('lanyinjia');
if(card){
player.discard(card);
}
},
},
zhungangshuo:{
trigger:{player:'shaBegin'},
logTarget:'target',
filter:function(event,player){
return event.player.countCards('h')||player.countCards('h');
},
check:function(event,player){
var target=event.target;
if(ai.get.attitude(player,target)>=0) return false;
if(player.hasCard(function(card){
return ai.get.value(card)>=8;
})){
return false;
}
var n1=event.target.countCards('h');
return n1>0&&n1<=player.countCards('h');
},
content:function(){
'step 0'
game.delayx();
'step 1'
trigger.target.discardPlayerCard('h',player,true);
'step 2'
player.discardPlayerCard('h',trigger.target,true);
}
},
qibaodao:{
trigger:{source:'damageBegin'},
forced:true,
filter:function(event){
return event.card&&event.card.name=='sha'&&event.player.isHealthy();
},
content:function(){
trigger.num++;
},
ai:{
unequip:true,
skillTagFilter:function(player,tag,arg){
if(arg&&arg.name=='sha') return true;
return false;
},
effect:{
player:function(card,player,target){
if(card.name=='sha'&&target.isHealthy()&&ai.get.attitude(player,target)>0){
return [1,-2];
}
}
}
}
},
_jinchan:{
trigger:{target:'useCardToBefore'},
forced:true,

View File

@ -78,17 +78,14 @@ card.standard={
}
else{
var next=target.chooseToRespond({name:'shan'});
next.set('ai',function(){
next.set('ai',function(card){
var target=_status.event.player;
var evt=_status.event.getParent();
var sks=target.getSkills();
if(sks.contains('leiji')||
sks.contains('releiji')||
sks.contains('lingbo')){
return 1;
if(target.hasSkillTag('useShan')){
return 11-ai.get.value(card);
}
if(ai.get.damageEffect(target,evt.player,target,evt.card.nature)>=0) return -1;
return 1;
return 11-ai.get.value(card);
});
next.autochoose=lib.filter.autoRespondShan;
}
@ -649,7 +646,7 @@ card.standard={
if(ai.get.damageEffect(evt.target,evt.player,evt.target)>=0) return 0;
if(evt.player.hasSkillTag('notricksource')) return 0;
if(evt.target.hasSkillTag('notrick')) return 0;
return 1;
return 11-ai.get.value(card);
});
next.autochoose=lib.filter.autoRespondSha;
"step 1"
@ -707,7 +704,7 @@ card.standard={
if(ai.get.damageEffect(evt.target,evt.player,evt.target)>=0) return 0;
if(evt.player.hasSkillTag('notricksource')) return 0;
if(evt.target.hasSkillTag('notrick')) return 0;
return 1;
return 11-ai.get.value(card);
});
next.autochoose=lib.filter.autoRespondShan;
"step 1"

View File

@ -1778,7 +1778,7 @@ card.swd={
if(ai.get.damageEffect(target,player,target,'thunder')>=0) return 0;
if(player.hasSkillTag('notricksource')) return 0;
if(target.hasSkillTag('notrick')) return 0;
return 1;
return 11-ai.get.value(card);
};
next.autochoose=lib.filter.autoRespondSha;
"step 1"
@ -1837,7 +1837,7 @@ card.swd={
if(ai.get.damageEffect(target,player,target,'fire')>=0) return 0;
if(player.hasSkillTag('notricksource')) return 0;
if(target.hasSkillTag('notrick')) return 0;
return 1;
return 11-ai.get.value(card);
};
next.autochoose=lib.filter.autoRespondShan;
"step 1"

View File

@ -3306,6 +3306,7 @@ character.shenhua={
}
},
ai:{
useShan:true,
effect:{
target:function(card,player,target,current){
if(get.tag(card,'respondShan')){
@ -3948,6 +3949,7 @@ character.shenhua={
},
ai:{
mingzhi:false,
useShan:true,
effect:{
target:function(card,player,target,current){
if(get.tag(card,'respondShan')){

View File

@ -1358,6 +1358,7 @@ character.swd={
},
ai:{
mingzhi:false,
useShan:true,
effect:{
target:function(card,player,target){
if(get.tag(card,'respondShan')){