MinotaurKing.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using Server.MirDatabase;
  2. namespace Server.MirObjects.Monsters
  3. {
  4. public class MinotaurKing : RightGuard
  5. {
  6. protected override byte AttackRange
  7. {
  8. get
  9. {
  10. return 6;
  11. }
  12. }
  13. protected internal MinotaurKing(MonsterInfo info)
  14. : base(info)
  15. {
  16. }
  17. protected override void CompleteRangeAttack(IList<object> data)
  18. {
  19. MapObject target = (MapObject)data[0];
  20. int damage = (int)data[1];
  21. DefenceType defence = (DefenceType)data[2];
  22. if (target == null || !target.IsAttackTarget(this) || target.CurrentMap != CurrentMap || target.Node == null) return;
  23. List<MapObject> targets = FindAllTargets(3, target.CurrentLocation);
  24. for (int i = 0; i < targets.Count; i++)
  25. {
  26. targets[i].Attacked(this, damage, defence);
  27. }
  28. }
  29. protected override void ProcessTarget()
  30. {
  31. if (Target == null || !CanAttack) return;
  32. if (InAttackRange())
  33. {
  34. Attack();
  35. return;
  36. }
  37. if (Envir.Time < ShockTime)
  38. {
  39. Target = null;
  40. return;
  41. }
  42. MoveTo(Target.CurrentLocation);
  43. }
  44. }
  45. }