icy.lua 2.0 KB

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