Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 private bool CanUse()
 {
     return(skill.IsValidMainTarget(owner, target));
 }
Ejemplo n.º 3
0
 private bool CanUse()
 {
     return(owner.CanWeaponSkill(target, skill) && skill.IsValidMainTarget(owner, target));
 }
Ejemplo n.º 4
0
 private bool CanCast()
 {
     return(owner.CanCast(target, spell) && spell.IsValidMainTarget(owner, target) && !HasMoved());
 }