iceman.lua 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. mobs.register_mob("iceman:iceman", {
  2. description = "Iceland Native",
  3. type = "monster",
  4. passive = false,
  5. attack_type = "dogfight",
  6. group_attack = true,
  7. -- Require at least steel sword to get any drops.
  8. armor_level = 1,
  9. pathfinding = 1,
  10. pathfinding_chance = 10,
  11. place_node = "default:snowblock",
  12. despawns_in_dark_caves = true,
  13. daytime_despawn = true,
  14. reach = 2,
  15. damage = 3*500,
  16. damage_min = 2*500,
  17. damage_max = 5*500,
  18. damage_group = "cracky",
  19. hp_min = 12*500,
  20. hp_max = 25*500,
  21. armor = 80,
  22. collisionbox = {-0.3, -1, -0.3, 0.3, 0.7, 0.3},
  23. visual = "mesh",
  24. mesh = "mobs_stone_monster.b3d",
  25. textures = {
  26. {"mobs_ice_monster.png"},
  27. },
  28. makes_footstep_sound = true,
  29. sounds = {
  30. random = "mobs_dirtmonster",
  31. death = "mobs_dirtmonster",
  32. distance = 10,
  33. },
  34. walk_velocity = 1.5,
  35. run_velocity = 2.8,
  36. jump = true,
  37. jump_chance = 30,
  38. walk_chance = 5,
  39. floats = 0,
  40. view_range = 20,
  41. drops = {
  42. -- Drop mossycobble sometimes. By MustTest
  43. {name = "default:mossycobble", chance = 3, min = 3, max = 12},
  44. {name = "default:snow", chance = 4, min = 1, max = 2},
  45. {name = "bones:bones_type2", chance = 2, min = 1, max = 1},
  46. },
  47. water_damage = 1*500,
  48. lava_damage = 100*500,
  49. makes_bones_in_lava = false,
  50. light_damage = 2*500,
  51. animation = {
  52. speed_normal = 15,
  53. speed_run = 15,
  54. stand_start = 0,
  55. stand_end = 14,
  56. walk_start = 15,
  57. walk_end = 38,
  58. run_start = 40,
  59. run_end = 63,
  60. punch_start = 40,
  61. punch_end = 63,
  62. },
  63. on_despawn = function(self)
  64. local pos = self.object:get_pos()
  65. ambiance.sound_play("teleport", pos, 1.0, 20)
  66. preload_tp.spawn_particles(pos)
  67. -- Note: cannot call object:remove()!
  68. --self.object:remove()
  69. -- We must do this instead: mark object for removal by the mob API.
  70. self.mkrm = true
  71. end,
  72. })
  73. mobs.register_egg("iceman:iceman", "Iceman", "default_ice.png", 1)
  74. mobs.alias_mob("mobs_monster:ice_native", "iceman:iceman")