IncarnatedZT.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using Server.MirDatabase;
  2. using S = ServerPackets;
  3. namespace Server.MirObjects.Monsters
  4. {
  5. public class IncarnatedZT : ZumaMonster
  6. {
  7. protected internal IncarnatedZT(MonsterInfo info) : base(info)
  8. {
  9. AvoidFireWall = false;
  10. Stoned = false;
  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.ObjectAttack { ObjectID = ObjectID, Direction = Direction, Location = CurrentLocation });
  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.Damage, Envir.Time + 300, Target, damage, DefenceType.MACAgility);
  27. ActionList.Add(action);
  28. }
  29. protected override void CompleteAttack(IList<object> data)
  30. {
  31. MapObject target = (MapObject)data[0];
  32. int damage = (int)data[1];
  33. DefenceType defence = (DefenceType)data[2];
  34. if (target == null || !target.IsAttackTarget(this) || target.CurrentMap != CurrentMap || target.Node == null) return;
  35. if (target.Attacked(this, damage, defence) <= 0) return;
  36. PoisonTarget(target, 12, 5, PoisonType.Paralysis, 1000);
  37. }
  38. }
  39. }