This commit is contained in:
libccy 2017-02-28 14:03:49 +08:00
parent 340cb0e8d8
commit 0ff9c06acc
7 changed files with 28 additions and 108 deletions

View File

@ -2653,8 +2653,7 @@ character.shenhua={
if(ai.get.equipValue(card)<=7.5) return 0; if(ai.get.equipValue(card)<=7.5) return 0;
} }
if(target.get('e','2')) return; if(target.get('e','2')) return;
if(player.hasSkillTag('unequip',false,card)) return; return lib.skill.bagua_skill.ai.effect.target.apply(this,arguments);
if(get.tag(card,'respondShan')) return [0.5,0];
} }
} }
} }

View File

@ -3020,8 +3020,7 @@ character.sp={
if(ai.get.equipValue(card)<=7.5) return 0; if(ai.get.equipValue(card)<=7.5) return 0;
} }
if(target.get('e','2')) return; if(target.get('e','2')) return;
if(player.hasSkillTag('unequip',false,card)) return; return lib.skill.bagua_skill.ai.effect.target.apply(this,arguments);
if(get.tag(card,'respondShan')) return [0.5,0];
} }
} }
}, },

View File

@ -2603,7 +2603,6 @@ character.swd={
}, },
suiyan:{ suiyan:{
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
// group:'unequip',
check:function(event,player){ check:function(event,player){
return ai.get.attitude(player,event.player)<0; return ai.get.attitude(player,event.player)<0;
}, },
@ -3160,17 +3159,12 @@ character.swd={
}, },
content:function(){ content:function(){
"step 0" "step 0"
if(!player.hasSkill('unequip')){ player.addAdditionalSkill('jianji','unequip');
event.added=true
player.skills.push('unequip');
}
player.draw(); player.draw();
player.useCard({name:'sha'},cards,targets,'jianji',false).animate=false; player.useCard({name:'sha'},cards,targets,'jianji',false).animate=false;
player.line(targets,'fire'); player.line(targets,'fire');
"step 1" "step 1"
if(event.added){ player.removeAdditionalSkill('jianji');
player.skills.remove('unequip');
}
}, },
ai:{ ai:{
order:function(){ order:function(){
@ -3178,15 +3172,9 @@ character.swd={
}, },
result:{ result:{
target:function(player,target){ target:function(player,target){
var added=false; player.addAdditionalSkill('jianji_ai','unequip');
if(!player.hasSkill('unequip')){
added=true;
player.skills.push('unequip');
}
var eff=ai.get.effect(target,{name:'sha'},player,target); var eff=ai.get.effect(target,{name:'sha'},player,target);
if(added){ player.removeAdditionalSkill('jianji_ai');
player.skills.remove('unequip');
}
return eff; return eff;
} }
}, },
@ -3625,9 +3613,7 @@ character.swd={
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
if(player.get('e','2')) return false; if(player.get('e','2')) return false;
if(event.source&&event.source.num('s','unequip')) return; return lib.skill.guangshatianyi.filter(event,player);
if(Math.random()>1/3) return false;
return true;
}, },
content:function(){ content:function(){
trigger.num--; trigger.num--;
@ -5710,7 +5696,6 @@ character.swd={
}, },
polang:{ polang:{
trigger:{source:'damageEnd'}, trigger:{source:'damageEnd'},
// group:'unequip',
check:function(event,player){ check:function(event,player){
return ai.get.attitude(player,event.player)<0; return ai.get.attitude(player,event.player)<0;
}, },

View File

@ -1736,7 +1736,6 @@ character.yijiang={
if(result.bool){ if(result.bool){
player.storage.xianzhen=target; player.storage.xianzhen=target;
player.addTempSkill('xianzhen2','phaseAfter'); player.addTempSkill('xianzhen2','phaseAfter');
player.addTempSkill('unequip','phaseAfter');
} }
else{ else{
player.addTempSkill('xianzhen3','phaseAfter'); player.addTempSkill('xianzhen3','phaseAfter');
@ -1783,6 +1782,9 @@ character.yijiang={
if(card.name=='sha') return Infinity; if(card.name=='sha') return Infinity;
} }
}, },
ai:{
unequip:true
}
}, },
xianzhen3:{ xianzhen3:{
mod:{ mod:{
@ -2034,25 +2036,6 @@ character.yijiang={
} }
}, },
benxi:{ benxi:{
trigger:{player:['useCardAfter','useSkillAfter']},
forced:true,
popup:false,
silent:true,
filter:function(event,player){
if(!player.storage.benxi) return false;
return _status.currentPhase==player;
},
content:function(){
var players=game.filterPlayer();
for(var i=0;i<players.length;i++){
if(get.distance(player,players[i])>1){
player.removeSkill('unequip');
return;
}
}
player.addSkill('unequip');
},
group:['benxi2','benxi3'],
mod:{ mod:{
globalFrom:function(from,to,distance){ globalFrom:function(from,to,distance){
if(_status.currentPhase==from){ if(_status.currentPhase==from){
@ -2062,47 +2045,23 @@ character.yijiang={
selectTarget:function(card,player,range){ selectTarget:function(card,player,range){
if(_status.currentPhase==player){ if(_status.currentPhase==player){
if(card.name=='sha'&&range[1]!=-1){ if(card.name=='sha'&&range[1]!=-1){
var players=game.filterPlayer(); if(!game.hasPlayer(function(current){
for(var i=0;i<players.length;i++){ return get.distance(player,current)>1;
if(get.distance(player,players[i])>1) return; })){
range[1]++;
} }
range[1]++;
} }
} }
},
},
},
benxi2:{
trigger:{player:'phaseBegin'},
forced:true,
popup:false,
silent:true,
priority:5,
filter:function(event,player){
return player.hasSkill('benxi');
},
content:function(){
player.storage.benxi=!player.hasSkill('unequip');
if(player.storage.benxi){
var players=game.filterPlayer();
for(var i=0;i<players.length;i++){
if(get.distance(player,players[i])>1){
return;
}
}
player.addSkill('unequip');
} }
} },
}, ai:{
benxi3:{ unequip:true,
trigger:{player:'phaseAfter'}, skillTagFilter:function(player){
forced:true, if(game.hasPlayer(function(current){
popup:false, return get.distance(player,current)>1;
silent:true, })){
content:function(){ return false;
if(player.storage.benxi){ }
player.storage.benxi=false;
player.removeSkill('unequip');
} }
} }
}, },

View File

@ -16386,11 +16386,11 @@
global:[], global:[],
globalmap:{}, globalmap:{},
storage:{}, storage:{},
unequip:{},
undist:{}, undist:{},
others:{}, others:{},
zhu:{}, zhu:{},
zhuSkill:{}, zhuSkill:{},
unequip:{ai:{unequip:true}},
autoswap:{ autoswap:{
trigger:{player:['phaseBegin','chooseToUseBegin','chooseToRespondBegin','chooseToDiscardBegin','chooseToCompareBegin', trigger:{player:['phaseBegin','chooseToUseBegin','chooseToRespondBegin','chooseToDiscardBegin','chooseToCompareBegin',
'chooseButtonBegin','chooseCardBegin','chooseTargetBegin','chooseCardTargetBegin','chooseControlBegin', 'chooseButtonBegin','chooseCardBegin','chooseTargetBegin','chooseCardTargetBegin','chooseControlBegin',

View File

@ -2206,10 +2206,7 @@ mode.boss={
priority:6, priority:6,
filter:function(event,player){ filter:function(event,player){
if(player.get('e','2')) return false; if(player.get('e','2')) return false;
if(event.player.num('s','unequip')) return false; return lib.skill.tengjia1.filter(event,player);
if(event.card.name=='nanman') return true;
if(event.card.name=='wanjian') return true;
if(event.card.name=='sha'&&!event.card.nature) return true;
}, },
content:function(){ content:function(){
trigger.untrigger(); trigger.untrigger();
@ -2219,14 +2216,7 @@ mode.boss={
effect:{ effect:{
target:function(card,player,target,current){ target:function(card,player,target,current){
if(target.get('e','2')) return; if(target.get('e','2')) return;
if(player.num('s','unequip')) return; return lib.skill.tengjia1.ai.effect.target.apply(this,arguments);
if(card.name=='nanman'||card.name=='wanjian') return 0;
if(card.name=='sha'){
var equip1=player.get('e','1');
if(equip1&&equip1.name=='zhuque') return 2;
if(equip1&&equip1.name=='qinggang') return 1;
if(!card.nature) return 0;
}
} }
} }
} }
@ -2248,10 +2238,7 @@ mode.boss={
effect:{ effect:{
target:function(card,player,target,current){ target:function(card,player,target,current){
if(target.get('e','2')) return; if(target.get('e','2')) return;
if(card.name=='sha'){ return lib.skill.tengjia2.ai.effect.target.apply(this,arguments);
if(card.nature=='fire'||player.hasSkill('zhuque_skill')) return 2;
}
if(get.tag(card,'fireDamage')&&current<0) return 2;
} }
} }
} }

View File

@ -4767,16 +4767,7 @@ mode.chess={
}, },
result:{ result:{
target:function(player,target){ target:function(player,target){
var added=false; return ai.get.effect(target,{name:'sha'},player,target);
if(!player.hasSkill('unequip')){
added=true;
player.skills.push('unequip');
}
var eff=ai.get.effect(target,{name:'sha'},player,target);
if(added){
player.skills.remove('unequip');
}
return eff;
} }
}, },
effect:{ effect:{