public override bool CanCast(Character target, BattleCommand spell)
 {
     // todo:
     if (target == null)
     {
         // Target does not exist.
         return(false);
     }
     if (Utils.Distance(positionX, positionY, positionZ, target.positionX, target.positionY, target.positionZ) > spell.range)
     {
         // The target is out of range.
         return(false);
     }
     if (!IsValidTarget(target, spell.mainTarget) || !spell.IsValidMainTarget(this, target))
     {
         // error packet is set in IsValidTarget
         return(false);
     }
     return(true);
 }
Beispiel #2
0
 private bool CanUse()
 {
     return(skill.IsValidMainTarget(owner, target));
 }
 private bool CanUse()
 {
     return(owner.CanWeaponSkill(target, skill) && skill.IsValidMainTarget(owner, target));
 }
 private bool CanCast()
 {
     return(owner.CanCast(target, spell) && spell.IsValidMainTarget(owner, target) && !HasMoved());
 }