Mandrill.cs 1.1 KB

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