BlueSoul.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Server.MirDatabase;
  2. using Server.MirEnvir;
  3. using S = ServerPackets;
  4. namespace Server.MirObjects.Monsters
  5. {
  6. public class BlueSoul : AxeSkeleton
  7. {
  8. protected internal BlueSoul(MonsterInfo info)
  9. : base(info)
  10. {
  11. }
  12. protected override void Attack()
  13. {
  14. if (!Target.IsAttackTarget(this))
  15. {
  16. Target = null;
  17. return;
  18. }
  19. ShockTime = 0;
  20. Direction = Functions.DirectionFromPoint(CurrentLocation, Target.CurrentLocation);
  21. Broadcast(new S.ObjectRangeAttack { ObjectID = ObjectID, Direction = Direction, Location = CurrentLocation, TargetID = Target.ObjectID, Type = 0 });
  22. ActionTime = Envir.Time + 300;
  23. AttackTime = Envir.Time + AttackSpeed;
  24. int damage = GetAttackPower(Stats[Stat.MinDC], Stats[Stat.MaxDC]);
  25. if (damage == 0) return;
  26. DelayedAction action = new DelayedAction(DelayedType.RangeDamage, Envir.Time + 500, Target, damage, DefenceType.MACAgility);
  27. ActionList.Add(action);
  28. }
  29. }
  30. }