OmaSlasher.cs 943 B

1234567891011121314151617181920212223242526272829303132333435
  1. using Server.MirDatabase;
  2. using Server.MirEnvir;
  3. using S = ServerPackets;
  4. namespace Server.MirObjects.Monsters
  5. {
  6. public class OmaSlasher : MonsterObject
  7. {
  8. protected internal OmaSlasher(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. ActionTime = Envir.Time + 300;
  20. AttackTime = Envir.Time + AttackSpeed;
  21. Direction = Functions.DirectionFromPoint(CurrentLocation, Target.CurrentLocation);
  22. Broadcast(new S.ObjectAttack { ObjectID = ObjectID, Direction = Direction, Location = CurrentLocation });
  23. int damage = GetAttackPower(Stats[Stat.MinDC], Stats[Stat.MaxDC]);
  24. if (damage == 0) return;
  25. HalfmoonAttack(damage);
  26. }
  27. }
  28. }