icy.lua 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. mobs:register_mob("tmw_slimes:icy_slime", {
  2. group_attack = true,
  3. type = "monster",
  4. passive = false,
  5. attack_animals = false,
  6. attack_npcs = false,
  7. attack_monsters = false,
  8. attack_type = "dogfight",
  9. reach = 2,
  10. sounds = {random = "steps_in_the_mud_shorter",},
  11. damage = tmw_slimes.strong_dmg,
  12. hp_min = 20,
  13. hp_max = 40,
  14. armor = 180,
  15. collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.4, 0.2},
  16. visual_size = {x = 2, y = 2},
  17. visual = "mesh",
  18. mesh = "slime_land.b3d",
  19. blood_texture = "tmw_slime_goo.png^[colorize:"..tmw_slimes.colors["icy"],
  20. textures = {
  21. {"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["icy"],"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["icy"],"tmw_slime_goo_block.png^[colorize:"..tmw_slimes.colors["icy"]},
  22. },
  23. makes_footstep_sound = false,
  24. walk_velocity = 0.5,
  25. run_velocity = 1.25,
  26. jump_height = 7,
  27. jump = true,
  28. view_range = 15,
  29. --floats = 0,
  30. --fly_in = {"default:water_source", "default:water_flowing", "default:river_water_source", "default:river_water_flowing"},
  31. drops = {
  32. {name = "tmw_slimes:icy_goo", chance = 1, min = 0, max = 2},
  33. },
  34. water_damage = 0,
  35. lava_damage = 256,
  36. light_damage = 0,
  37. replace_rate = 2,
  38. replace_what = {
  39. {"air", "default:snow", 0},
  40. {"group:grass", "default:snow", 0},
  41. {"group:dry_grass", "default:snow", 0},
  42. {"default:water_source", "default:ice", -1},
  43. {"default:water_flowing", "default:ice", -1},
  44. {"default:river_water_source", "default:ice", -1},
  45. {"default:river_water_flowing", "default:ice", -1}
  46. },
  47. animation = {
  48. idle_start = 0,
  49. idle_end = 20,
  50. move_start = 21,
  51. move_end = 41,
  52. fall_start = 42,
  53. fall_end = 62,
  54. jump_start = 63,
  55. jump_end = 83
  56. },
  57. do_custom = function(self)
  58. --tmw_slimes.animate(self)
  59. tmw_slimes.absorb_nearby_items(self)
  60. end,
  61. on_die = function(self, pos)
  62. tmw_slimes.drop_items(self, pos)
  63. end
  64. })
  65. mobs:spawn({
  66. name = "tmw_slimes:icy_slime",
  67. nodes = {"group:snowy", "default:ice"},
  68. min_light = 0,
  69. max_light = 16,
  70. chance = tmw_slimes.uncommon,
  71. active_object_count = tmw_slimes.uncommon_max,
  72. min_height = -31000,
  73. max_height = 31000,
  74. })