iceman.lua 1.8 KB

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