WoodBox.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using Server.MirDatabase;
  2. namespace Server.MirObjects.Monsters
  3. {
  4. public class WoodBox : MonsterObject
  5. {
  6. protected override bool CanMove { get { return false; } }
  7. protected internal WoodBox(MonsterInfo info)
  8. : base(info)
  9. {
  10. }
  11. protected override void Attack() { }
  12. public override void Turn(MirDirection dir) { }
  13. public override bool Walk(MirDirection dir) { return false; }
  14. protected override void ProcessRoam() { }
  15. protected override void ProcessTarget()
  16. {
  17. }
  18. public override void Die()
  19. {
  20. ActionList.Add(new DelayedAction(DelayedType.Die, Envir.Time + 300));
  21. base.Die();
  22. }
  23. protected override void CompleteDeath(IList<object> data)
  24. {
  25. List<MapObject> targets = FindAllTargets(1, CurrentLocation, false);
  26. if (targets.Count == 0) return;
  27. for (int i = 0; i < targets.Count; i++)
  28. {
  29. int damage = GetAttackPower(Stats[Stat.MinDC], Stats[Stat.MaxDC]);
  30. if (damage == 0) return;
  31. if (targets[i].Attacked(this, damage, DefenceType.ACAgility) <= 0) continue;
  32. }
  33. }
  34. }
  35. }