mobs.lua 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601
  1. ----------green slime----------------
  2. mobs:register_mob("minerdream:slime_green", {
  3. type = "monster",
  4. passive = false,
  5. attack_type = "dogfight",
  6. reach = 2,
  7. damage = 1,
  8. hp_min = 5,
  9. hp_max = 5,
  10. armor = 100,
  11. collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.3, 0.3},
  12. visual = "wielditem",
  13. textures = {
  14. {"minerdream:slime_green"},
  15. },
  16. blood_texture = "minerdream_slimeball_green.png",
  17. makes_footstep_sound = true,
  18. walk_velocity = 2,
  19. run_velocity = 2,
  20. walk_chance = 0,
  21. fall_speed = -50,
  22. jump_chance = 30,
  23. jump_height = 6,
  24. stepheight = 1.1,
  25. floats = 0,
  26. view_range = 16,
  27. drops = {
  28. {name = "minerdream:slimeball_green", chance = 1, min = 1, max = 3},
  29. {name = "minerdream:slime_green_egg", chance = 100, min = 1, max = 1},
  30. {name = "minerdream:accessory_slimering", chance = 200, min = 1, max = 1},
  31. },
  32. water_damage = 0,
  33. lava_damage = 8,
  34. light_damage = 0,
  35. animation = {
  36. speed_normal = 15,
  37. speed_run = 15,
  38. stand_start = 0,
  39. stand_end = 14,
  40. walk_start = 15,
  41. walk_end = 38,
  42. run_start = 40,
  43. run_end = 63,
  44. punch_start = 40,
  45. punch_end = 63,
  46. },
  47. })
  48. mobs:spawn({
  49. name = "minerdream:slime_green",
  50. nodes = {"default:stone"},
  51. max_light = 10,
  52. chance = 1000,
  53. max_height = 0,
  54. })
  55. minetest.register_craftitem("minerdream:slime_green_egg", {
  56. description = "Green slime spawnegg",
  57. inventory_image = "minerdream_egg_greenslime.png",
  58. on_place = function(itemstack, placer, pointed_thing)
  59. if pointed_thing.above then
  60. minetest.env:add_entity(pointed_thing.above, "minerdream:slime_green")
  61. itemstack:take_item()
  62. end
  63. return itemstack
  64. end,
  65. })
  66. minetest.register_node("minerdream:slime_green", {
  67. tiles = {
  68. "minerdream_slime_top.png",
  69. "minerdream_slime_top.png",
  70. "minerdream_slime_side.png",
  71. "minerdream_slime_side.png",
  72. "minerdream_slime_side.png",
  73. "minerdream_slime_side.png"
  74. },
  75. drawtype = "nodebox",
  76. wield_scale = {x=0.4,y=0.4,z=0.4},
  77. paramtype = "light",
  78. node_box = {
  79. type = "fixed",
  80. fixed = {
  81. {-0.3125, -0.5, -0.3125, 0.3125, 0.3125, 0.3125}, -- NodeBox1
  82. {-0.375, -0.5, -0.3125, 0.375, 0.25, 0.3125}, -- NodeBox2
  83. {-0.3125, -0.5, -0.375, 0.3125, 0.25, 0.375}, -- NodeBox3
  84. {-0.3125, -0.4375, -0.4375, 0.3125, 0.125, 0.4375}, -- NodeBox4
  85. {-0.375, -0.4375, -0.375, 0.375, 0.125, 0.375}, -- NodeBox5
  86. {-0.4375, -0.4375, -0.3125, 0.4375, 0.125, 0.3125}, -- NodeBox6
  87. {-0.25, -0.375, -0.5, 0.25, 0, 0.5}, -- NodeBox7
  88. {-0.5, -0.375, -0.25, 0.5, 0, 0.25}, -- NodeBox8
  89. }
  90. }
  91. })
  92. ----------blue slime----------------
  93. mobs:register_mob("minerdream:slime_blue", {
  94. type = "monster",
  95. passive = false,
  96. attack_type = "dogfight",
  97. reach = 2,
  98. damage = 2,
  99. hp_min = 8,
  100. hp_max = 8,
  101. armor = 100,
  102. collisionbox = {-0.45, -0.45, -0.45, 0.45, 0.45, 0.45},
  103. visual = "wielditem",
  104. textures = {
  105. {"minerdream:slime_blue"},
  106. },
  107. blood_texture = "minerdream_slimeball_blue.png",
  108. makes_footstep_sound = true,
  109. walk_velocity = 2,
  110. run_velocity = 2,
  111. walk_chance = 0,
  112. fall_speed = -50,
  113. jump_chance = 30,
  114. jump_height = 6,
  115. stepheight = 1.1,
  116. floats = 0,
  117. view_range = 16,
  118. drops = {
  119. {name = "minerdream:slimeball_blue", chance = 1, min = 1, max = 3},
  120. {name = "minerdream:slime_blue_egg", chance = 100, min = 1, max = 1},
  121. {name = "minerdream:accessory_slimering", chance = 175, min = 1, max = 1},
  122. },
  123. water_damage = 0,
  124. lava_damage = 8,
  125. light_damage = 0,
  126. animation = {
  127. speed_normal = 15,
  128. speed_run = 15,
  129. stand_start = 0,
  130. stand_end = 14,
  131. walk_start = 15,
  132. walk_end = 38,
  133. run_start = 40,
  134. run_end = 63,
  135. punch_start = 40,
  136. punch_end = 63,
  137. },
  138. })
  139. mobs:spawn({
  140. name = "minerdream:slime_blue",
  141. nodes = {"default:stone"},
  142. max_light = 10,
  143. chance = 1250,
  144. max_height = -50,
  145. })
  146. minetest.register_craftitem("minerdream:slime_blue_egg", {
  147. description = "blue slime spawnegg",
  148. inventory_image = "minerdream_egg_blueslime.png",
  149. on_place = function(itemstack, placer, pointed_thing)
  150. if pointed_thing.above then
  151. minetest.env:add_entity(pointed_thing.above, "minerdream:slime_blue")
  152. itemstack:take_item()
  153. end
  154. return itemstack
  155. end,
  156. })
  157. minetest.register_node("minerdream:slime_blue", {
  158. tiles = {
  159. "minerdream_slime_blue_top.png",
  160. "minerdream_slime_blue_top.png",
  161. "minerdream_slime_blue_side.png",
  162. "minerdream_slime_blue_side.png",
  163. "minerdream_slime_blue_side.png",
  164. "minerdream_slime_blue_side.png"
  165. },
  166. drawtype = "nodebox",
  167. wield_scale = {x=0.6,y=0.6,z=0.6},
  168. paramtype = "light",
  169. node_box = {
  170. type = "fixed",
  171. fixed = {
  172. {-0.3125, -0.5, -0.3125, 0.3125, 0.3125, 0.3125}, -- NodeBox1
  173. {-0.375, -0.5, -0.3125, 0.375, 0.25, 0.3125}, -- NodeBox2
  174. {-0.3125, -0.5, -0.375, 0.3125, 0.25, 0.375}, -- NodeBox3
  175. {-0.3125, -0.4375, -0.4375, 0.3125, 0.125, 0.4375}, -- NodeBox4
  176. {-0.375, -0.4375, -0.375, 0.375, 0.125, 0.375}, -- NodeBox5
  177. {-0.4375, -0.4375, -0.3125, 0.4375, 0.125, 0.3125}, -- NodeBox6
  178. {-0.25, -0.375, -0.5, 0.25, 0, 0.5}, -- NodeBox7
  179. {-0.5, -0.375, -0.25, 0.5, 0, 0.25}, -- NodeBox8
  180. }
  181. }
  182. })
  183. ----------red slime----------------
  184. mobs:register_mob("minerdream:slime_red", {
  185. type = "monster",
  186. passive = false,
  187. attack_type = "dogfight",
  188. reach = 2,
  189. damage = 3,
  190. hp_min = 12,
  191. hp_max = 12,
  192. armor = 100,
  193. collisionbox = {-0.6, -0.6, -0.6, 0.6, 0.6, 0.6},
  194. visual = "wielditem",
  195. textures = {
  196. {"minerdream:slime_red"},
  197. },
  198. blood_texture = "minerdream_slimeball_red.png",
  199. makes_footstep_sound = true,
  200. walk_velocity = 3,
  201. run_velocity = 3,
  202. walk_chance = 0,
  203. fall_speed = -50,
  204. jump_chance = 30,
  205. jump_height = 7,
  206. stepheight = 1.1,
  207. floats = 0,
  208. view_range = 16,
  209. drops = {
  210. {name = "minerdream:slimeball_red", chance = 1, min = 1, max = 3},
  211. {name = "minerdream:slime_red_egg", chance = 100, min = 1, max = 1},
  212. {name = "minerdream:accessory_slimering", chance = 150, min = 1, max = 1},
  213. },
  214. water_damage = 0,
  215. lava_damage = 8,
  216. light_damage = 0,
  217. animation = {
  218. speed_normal = 15,
  219. speed_run = 15,
  220. stand_start = 0,
  221. stand_end = 14,
  222. walk_start = 15,
  223. walk_end = 38,
  224. run_start = 40,
  225. run_end = 63,
  226. punch_start = 40,
  227. punch_end = 63,
  228. },
  229. })
  230. mobs:spawn({
  231. name = "minerdream:slime_red",
  232. nodes = {"default:stone"},
  233. max_light = 10,
  234. chance = 1500,
  235. max_height = -100,
  236. })
  237. minetest.register_craftitem("minerdream:slime_red_egg", {
  238. description = "red slime spawnegg",
  239. inventory_image = "minerdream_egg_redslime.png",
  240. on_place = function(itemstack, placer, pointed_thing)
  241. if pointed_thing.above then
  242. minetest.env:add_entity(pointed_thing.above, "minerdream:slime_red")
  243. itemstack:take_item()
  244. end
  245. return itemstack
  246. end,
  247. })
  248. minetest.register_node("minerdream:slime_red", {
  249. tiles = {
  250. "minerdream_slime_red_top.png",
  251. "minerdream_slime_red_top.png",
  252. "minerdream_slime_red_side.png",
  253. "minerdream_slime_red_side.png",
  254. "minerdream_slime_red_side.png",
  255. "minerdream_slime_red_side.png"
  256. },
  257. drawtype = "nodebox",
  258. wield_scale = {x=0.8,y=0.8,z=0.8},
  259. paramtype = "light",
  260. node_box = {
  261. type = "fixed",
  262. fixed = {
  263. {-0.3125, -0.5, -0.3125, 0.3125, 0.3125, 0.3125}, -- NodeBox1
  264. {-0.375, -0.5, -0.3125, 0.375, 0.25, 0.3125}, -- NodeBox2
  265. {-0.3125, -0.5, -0.375, 0.3125, 0.25, 0.375}, -- NodeBox3
  266. {-0.3125, -0.4375, -0.4375, 0.3125, 0.125, 0.4375}, -- NodeBox4
  267. {-0.375, -0.4375, -0.375, 0.375, 0.125, 0.375}, -- NodeBox5
  268. {-0.4375, -0.4375, -0.3125, 0.4375, 0.125, 0.3125}, -- NodeBox6
  269. {-0.25, -0.375, -0.5, 0.25, 0, 0.5}, -- NodeBox7
  270. {-0.5, -0.375, -0.25, 0.5, 0, 0.25}, -- NodeBox8
  271. }
  272. }
  273. })
  274. ----------yellow slime----------------
  275. mobs:register_mob("minerdream:slime_yellow", {
  276. type = "monster",
  277. passive = false,
  278. attack_type = "dogfight",
  279. reach = 2,
  280. damage = 4,
  281. hp_min = 20,
  282. hp_max = 20,
  283. armor = 100,
  284. collisionbox = {-0.75, -0.75, -0.75, 0.75, 0.75, 0.75},
  285. visual = "wielditem",
  286. textures = {
  287. {"minerdream:slime_yellow"},
  288. },
  289. blood_texture = "minerdream_slimeball_yellow.png",
  290. makes_footstep_sound = true,
  291. walk_velocity = 3,
  292. run_velocity = 3,
  293. walk_chance = 0,
  294. fall_speed = -50,
  295. jump_chance = 30,
  296. jump_height = 7,
  297. stepheight = 1.1,
  298. floats = 0,
  299. view_range = 16,
  300. drops = {
  301. {name = "minerdream:slimeball_yellow", chance = 1, min = 1, max = 3},
  302. {name = "minerdream:slime_yellow_egg", chance = 100, min = 1, max = 1},
  303. {name = "minerdream:accessory_slimering", chance = 125, min = 1, max = 1},
  304. },
  305. water_damage = 0,
  306. lava_damage = 8,
  307. light_damage = 0,
  308. animation = {
  309. speed_normal = 15,
  310. speed_run = 15,
  311. stand_start = 0,
  312. stand_end = 14,
  313. walk_start = 15,
  314. walk_end = 38,
  315. run_start = 40,
  316. run_end = 63,
  317. punch_start = 40,
  318. punch_end = 63,
  319. },
  320. })
  321. mobs:spawn({
  322. name = "minerdream:slime_yellow",
  323. nodes = {"default:stone"},
  324. max_light = 10,
  325. chance = 1750,
  326. max_height = -250,
  327. })
  328. minetest.register_craftitem("minerdream:slime_yellow_egg", {
  329. description = "yellow slime spawnegg",
  330. inventory_image = "minerdream_egg_yellowslime.png",
  331. on_place = function(itemstack, placer, pointed_thing)
  332. if pointed_thing.above then
  333. minetest.env:add_entity(pointed_thing.above, "minerdream:slime_yellow")
  334. itemstack:take_item()
  335. end
  336. return itemstack
  337. end,
  338. })
  339. minetest.register_node("minerdream:slime_yellow", {
  340. tiles = {
  341. "minerdream_slime_yellow_top.png",
  342. "minerdream_slime_yellow_top.png",
  343. "minerdream_slime_yellow_side.png",
  344. "minerdream_slime_yellow_side.png",
  345. "minerdream_slime_yellow_side.png",
  346. "minerdream_slime_yellow_side.png"
  347. },
  348. drawtype = "nodebox",
  349. wield_scale = {x=1.0,y=1.0,z=1.0},
  350. paramtype = "light",
  351. node_box = {
  352. type = "fixed",
  353. fixed = {
  354. {-0.3125, -0.5, -0.3125, 0.3125, 0.3125, 0.3125}, -- NodeBox1
  355. {-0.375, -0.5, -0.3125, 0.375, 0.25, 0.3125}, -- NodeBox2
  356. {-0.3125, -0.5, -0.375, 0.3125, 0.25, 0.375}, -- NodeBox3
  357. {-0.3125, -0.4375, -0.4375, 0.3125, 0.125, 0.4375}, -- NodeBox4
  358. {-0.375, -0.4375, -0.375, 0.375, 0.125, 0.375}, -- NodeBox5
  359. {-0.4375, -0.4375, -0.3125, 0.4375, 0.125, 0.3125}, -- NodeBox6
  360. {-0.25, -0.375, -0.5, 0.25, 0, 0.5}, -- NodeBox7
  361. {-0.5, -0.375, -0.25, 0.5, 0, 0.25}, -- NodeBox8
  362. }
  363. }
  364. })
  365. ----------purple slime----------------
  366. mobs:register_mob("minerdream:slime_purple", {
  367. type = "monster",
  368. passive = false,
  369. attack_type = "dogfight",
  370. reach = 3,
  371. damage = 6,
  372. hp_min = 35,
  373. hp_max = 35,
  374. armor = 100,
  375. collisionbox = {-0.9, -0.9, -0.9, 0.9, 0.9, 0.9},
  376. visual = "wielditem",
  377. textures = {
  378. {"minerdream:slime_purple"},
  379. },
  380. blood_texture = "minerdream_slimeball_purple.png",
  381. makes_footstep_sound = true,
  382. walk_velocity = 4,
  383. run_velocity = 4,
  384. walk_chance = 0,
  385. fall_speed = -50,
  386. jump_chance = 30,
  387. jump_height = 8,
  388. stepheight = 1.1,
  389. floats = 0,
  390. view_range = 16,
  391. drops = {
  392. {name = "minerdream:slimeball_purple", chance = 1, min = 1, max = 3},
  393. {name = "minerdream:slime_purple_egg", chance = 100, min = 1, max = 1},
  394. {name = "minerdream:accessory_slimering", chance = 100, min = 1, max = 1},
  395. },
  396. water_damage = 0,
  397. lava_damage = 8,
  398. light_damage = 0,
  399. animation = {
  400. speed_normal = 15,
  401. speed_run = 15,
  402. stand_start = 0,
  403. stand_end = 14,
  404. walk_start = 15,
  405. walk_end = 38,
  406. run_start = 40,
  407. run_end = 63,
  408. punch_start = 40,
  409. punch_end = 63,
  410. },
  411. })
  412. mobs:spawn({
  413. name = "minerdream:slime_purple",
  414. nodes = {"default:stone"},
  415. max_light = 10,
  416. chance = 2000,
  417. max_height = -500,
  418. })
  419. minetest.register_craftitem("minerdream:slime_purple_egg", {
  420. description = "purple slime spawnegg",
  421. inventory_image = "minerdream_egg_purpleslime.png",
  422. on_place = function(itemstack, placer, pointed_thing)
  423. if pointed_thing.above then
  424. minetest.env:add_entity(pointed_thing.above, "minerdream:slime_purple")
  425. itemstack:take_item()
  426. end
  427. return itemstack
  428. end,
  429. })
  430. minetest.register_node("minerdream:slime_purple", {
  431. tiles = {
  432. "minerdream_slime_purple_top.png",
  433. "minerdream_slime_purple_top.png",
  434. "minerdream_slime_purple_side.png",
  435. "minerdream_slime_purple_side.png",
  436. "minerdream_slime_purple_side.png",
  437. "minerdream_slime_purple_side.png"
  438. },
  439. drawtype = "nodebox",
  440. wield_scale = {x=1.2,y=1.2,z=1.2},
  441. paramtype = "light",
  442. node_box = {
  443. type = "fixed",
  444. fixed = {
  445. {-0.3125, -0.5, -0.3125, 0.3125, 0.3125, 0.3125}, -- NodeBox1
  446. {-0.375, -0.5, -0.3125, 0.375, 0.25, 0.3125}, -- NodeBox2
  447. {-0.3125, -0.5, -0.375, 0.3125, 0.25, 0.375}, -- NodeBox3
  448. {-0.3125, -0.4375, -0.4375, 0.3125, 0.125, 0.4375}, -- NodeBox4
  449. {-0.375, -0.4375, -0.375, 0.375, 0.125, 0.375}, -- NodeBox5
  450. {-0.4375, -0.4375, -0.3125, 0.4375, 0.125, 0.3125}, -- NodeBox6
  451. {-0.25, -0.375, -0.5, 0.25, 0, 0.5}, -- NodeBox7
  452. {-0.5, -0.375, -0.25, 0.5, 0, 0.25}, -- NodeBox8
  453. }
  454. }
  455. })
  456. ----------brown slime----------------
  457. mobs:register_mob("minerdream:slime_brown", {
  458. type = "monster",
  459. passive = false,
  460. attack_type = "dogfight",
  461. reach = 3.5,
  462. damage = 8,
  463. hp_min = 50,
  464. hp_max = 50,
  465. armor = 100,
  466. collisionbox = {-1.05, -1.05, -1.05, 1.05, 1.05, 1.05},
  467. visual = "wielditem",
  468. textures = {
  469. {"minerdream:slime_brown"},
  470. },
  471. blood_texture = "minerdream_slimeball_brown.png",
  472. makes_footstep_sound = true,
  473. walk_velocity = 4,
  474. run_velocity = 4,
  475. walk_chance = 0,
  476. fall_speed = -50,
  477. jump_chance = 30,
  478. jump_height = 9,
  479. stepheight = 1.2,
  480. floats = 0,
  481. view_range = 16,
  482. drops = {
  483. {name = "minerdream:slimeball_brown", chance = 1, min = 1, max = 3},
  484. {name = "minerdream:slime_brown_egg", chance = 100, min = 1, max = 1},
  485. {name = "minerdream:accessory_slimering", chance = 75, min = 1, max = 1},
  486. },
  487. water_damage = 0,
  488. lava_damage = 8,
  489. light_damage = 0,
  490. animation = {
  491. speed_normal = 16,
  492. speed_run = 16,
  493. stand_start = 0,
  494. stand_end = 14,
  495. walk_start = 15,
  496. walk_end = 38,
  497. run_start = 40,
  498. run_end = 63,
  499. punch_start = 40,
  500. punch_end = 63,
  501. },
  502. })
  503. mobs:spawn({
  504. name = "minerdream:slime_brown",
  505. nodes = {"default:stone"},
  506. max_light = 10,
  507. chance = 2000,
  508. max_height = -1200,
  509. })
  510. minetest.register_craftitem("minerdream:slime_brown_egg", {
  511. description = "brown slime spawnegg",
  512. inventory_image = "minerdream_egg_brownslime.png",
  513. on_place = function(itemstack, placer, pointed_thing)
  514. if pointed_thing.above then
  515. minetest.env:add_entity(pointed_thing.above, "minerdream:slime_brown")
  516. itemstack:take_item()
  517. end
  518. return itemstack
  519. end,
  520. })
  521. minetest.register_node("minerdream:slime_brown", {
  522. tiles = {
  523. "minerdream_slime_brown_top.png",
  524. "minerdream_slime_brown_top.png",
  525. "minerdream_slime_brown_side.png",
  526. "minerdream_slime_brown_side.png",
  527. "minerdream_slime_brown_side.png",
  528. "minerdream_slime_brown_side.png"
  529. },
  530. drawtype = "nodebox",
  531. wield_scale = {x=1.4,y=1.4,z=1.4},
  532. paramtype = "light",
  533. node_box = {
  534. type = "fixed",
  535. fixed = {
  536. {-0.3125, -0.5, -0.3125, 0.3125, 0.3125, 0.3125}, -- NodeBox1
  537. {-0.375, -0.5, -0.3125, 0.375, 0.25, 0.3125}, -- NodeBox2
  538. {-0.3125, -0.5, -0.375, 0.3125, 0.25, 0.375}, -- NodeBox3
  539. {-0.3125, -0.4375, -0.4375, 0.3125, 0.125, 0.4375}, -- NodeBox4
  540. {-0.375, -0.4375, -0.375, 0.375, 0.125, 0.375}, -- NodeBox5
  541. {-0.4375, -0.4375, -0.3125, 0.4375, 0.125, 0.3125}, -- NodeBox6
  542. {-0.25, -0.375, -0.5, 0.25, 0, 0.5}, -- NodeBox7
  543. {-0.5, -0.375, -0.25, 0.5, 0, 0.25}, -- NodeBox8
  544. }
  545. }
  546. })