This commit is contained in:
libccy 2017-01-16 21:32:31 +08:00
parent f8d6b19340
commit 013bd76574
2 changed files with 18 additions and 7 deletions

View File

@ -666,11 +666,22 @@ character.ow={
zhiyuan:{ zhiyuan:{
trigger:{source:'damageBefore'}, trigger:{source:'damageBefore'},
check:function(event,player){ check:function(event,player){
if(event.player.hp<event.player.maxHp&&ai.get.attitude(player,event.player)<0) return false; player.disableSkill('tmp','zhiyuan');
player.disabledSkills.temp='zhiyuan'; var eff=ai.get.damageEffect(event.player,player,player);
var num=ai.get.damageEffect(event.player,player,player,event.nature)<ai.get.recoverEffect(event.player,player,player); var att=ai.get.attitude(player,event.player);
delete player.disabledSkills.temp; var bool=false;
return num; if(att>0){
if(eff<=0||event.player.hp<event.player.maxHp){
bool=true;
}
}
else{
if(eff<0&&event.player.hp==event.player.maxHp){
bool=true;
}
}
player.enableSkill('tmp','zhiyuan');
return bool;
}, },
logTarget:'player', logTarget:'player',
filter:function(event,player){ filter:function(event,player){