nssm_materials.lua 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059
  1. --non eatable craftitems
  2. local function nssm_craftitem (name, descr)
  3. minetest.register_craftitem("nssm:"..name, {
  4. description = descr,
  5. image = name..".png",
  6. })
  7. end
  8. nssm_craftitem ('sky_feather','Sky Feather')
  9. nssm_craftitem ('snake_scute','Snake Scute')
  10. nssm_craftitem ('eyed_tentacle','Eyed Tentacle')
  11. --nssm_craftitem ('king_duck_crown','King Duck Crown')
  12. nssm_craftitem ('great_energy_globe','Great Energy Globe')
  13. nssm_craftitem ('superior_energy_globe','Superior Energy Globe')
  14. nssm_craftitem ('ant_queen_abdomen','Ant Queen Abdomen')
  15. --nssm_craftitem ('masticone_skull','Masticone Skull')
  16. nssm_craftitem ('masticone_skull_fragments','Masticone Skull Fragments')
  17. --nssm_craftitem ('masticone_skull_crowned','Masticone Skull Crowned')
  18. nssm_craftitem ('tentacle_curly','Kraken Tentacle')
  19. nssm_craftitem ('lava_titan_eye','Lava Titan Eye')
  20. nssm_craftitem ('duck_beak','Duck Beak')
  21. nssm_craftitem ('ice_tooth','Ice Tooth')
  22. nssm_craftitem ('little_ice_tooth','Little Ice Tooth')
  23. nssm_craftitem ('digested_sand',"Digested Sand")
  24. nssm_craftitem ('black_ice_tooth','Black Ice Tooth')
  25. nssm_craftitem ('tarantula_chelicerae','Tarantula Chelicerae')
  26. nssm_craftitem ('crab_chela','Crab Chela')
  27. nssm_craftitem ('cursed_pumpkin_seed','Cursed Pumpkin Seed')
  28. nssm_craftitem ('mantis_claw','Mantis Claw')
  29. nssm_craftitem ('manticore_fur','Manticore Fur')
  30. nssm_craftitem ('ant_hard_skin','Ant Hard Skin')
  31. nssm_craftitem ('bloco_skin','Bloco Skin')
  32. nssm_craftitem ('crab_carapace_fragment','Crab Carapace Fragment')
  33. nssm_craftitem ('crocodile_skin','Crocodile Skin')
  34. nssm_craftitem ('manticore_spine','Manticore Spine')
  35. nssm_craftitem ('night_feather','Night Feather')
  36. nssm_craftitem ('sun_feather','Sun Feather')
  37. nssm_craftitem ('duck_feather','Duck Feather')
  38. nssm_craftitem ('black_duck_feather','Black Duck Feather')
  39. nssm_craftitem ('masticone_fang','Masticone Fang')
  40. nssm_craftitem ('white_wolf_fur','White Wolf Fur')
  41. nssm_craftitem ('stoneater_mandible','Stoneater Mandible')
  42. nssm_craftitem ('ant_mandible','Ant Mandible')
  43. nssm_craftitem ('life_energy','Life Energy')
  44. nssm_craftitem ('wolf_fur','Wolf Fur')
  45. nssm_craftitem ('felucco_fur','Felucco Fur')
  46. nssm_craftitem ('felucco_horn','Felucco Horn')
  47. nssm_craftitem ('energy_globe','Energy Globe')
  48. nssm_craftitem ('greedy_soul_fragment','Greedy Soul Fragment')
  49. nssm_craftitem ('lustful_soul_fragment','Lustful Soul Fragment')
  50. nssm_craftitem ('wrathful_soul_fragment','Wrathful Soul Fragment')
  51. nssm_craftitem ('proud_soul_fragment','Proud Soul Fragment')
  52. nssm_craftitem ('slothful_soul_fragment','Slothful Soul Fragment')
  53. nssm_craftitem ('envious_soul_fragment','Envious Soul Fragment')
  54. nssm_craftitem ('gluttonous_soul_fragment','Gluttonous Soul Fragment')
  55. nssm_craftitem ('gluttonous_moranga','Gluttonous Moranga')
  56. nssm_craftitem ('envious_moranga','Envious Moranga')
  57. nssm_craftitem ('proud_moranga','Proud Moranga')
  58. nssm_craftitem ('slothful_moranga','Slothful Moranga')
  59. nssm_craftitem ('lustful_moranga','Lustful Moranga')
  60. nssm_craftitem ('wrathful_moranga','Wrathful Moranga')
  61. nssm_craftitem ('greedy_moranga','Greedy Moranga')
  62. nssm_craftitem ('mantis_skin','Mantis_skin')
  63. nssm_craftitem ('sand_bloco_skin','Sand Bloco Skin')
  64. nssm_craftitem ('sandworm_skin','Sandworm Skin')
  65. nssm_craftitem ('sky_iron','Sky Iron')
  66. nssm_craftitem ('web_string','Cobweb String')
  67. nssm_craftitem ('dense_web_string','Dense Cobweb String')
  68. nssm_craftitem ('black_powder','Black Powder')
  69. nssm_craftitem ('morelentir_dust','Dark Starred Stone Dust')
  70. nssm_craftitem ('empty_evocation_bomb','Empty Evocation Bomb')
  71. local function nssm_craftitem_eat (name, descr, gnam)
  72. minetest.register_craftitem("nssm:"..name, {
  73. description = descr,
  74. image =name..".png",
  75. on_use = minetest.item_eat(gnam),
  76. groups = { meat=1, eatable=1 },
  77. })
  78. end
  79. nssm_craftitem_eat ('werewolf_leg','Werewolf Leg',3)
  80. nssm_craftitem_eat ('felucco_steak','Felucco Steak',3)
  81. nssm_craftitem_eat ('roasted_felucco_steak','Roasted Felucco Steak',6)
  82. nssm_craftitem_eat ('heron_leg','Moonheron Leg',2)
  83. nssm_craftitem_eat ('chichibios_heron_leg',"Chichibio's Moonheron Leg",4)
  84. nssm_craftitem_eat ('crocodile_tail','Crocodile Tail',3)
  85. nssm_craftitem_eat ('roasted_crocodile_tail','Roasted Crocodile Tail',6)
  86. nssm_craftitem_eat ('roasted_werewolf_leg','Roasted_Werewolf Leg',6)
  87. nssm_craftitem_eat ('duck_legs','Duck Legs',1)
  88. nssm_craftitem_eat ('roasted_duck_legs','Roasted Duck Leg',3)
  89. nssm_craftitem_eat ('ant_leg','Ant Leg',-1)
  90. nssm_craftitem_eat ('roasted_ant_leg','Roasted Ant Leg',4)
  91. nssm_craftitem_eat ('spider_leg','Spider Leg',-1)
  92. nssm_craftitem_eat ('roasted_spider_leg','Roasted Spider Leg',4)
  93. --nssm_craftitem_eat ('brain','Brain',3)
  94. --nssm_craftitem_eat ('roasted_brain','Roasted Brain',8)
  95. nssm_craftitem_eat ('tentacle','Tentacle',2)
  96. nssm_craftitem_eat ('roasted_tentacle','Roasted Tentacle',5)
  97. nssm_craftitem_eat ('worm_flesh','Worm Flesh',-2)
  98. nssm_craftitem_eat ('roasted_worm_flesh','Roasted Worm Flesh',4)
  99. nssm_craftitem_eat ('amphibian_heart','Amphibian Heart',1)
  100. nssm_craftitem_eat ('roasted_amphibian_heart','Roasted Amphibian Heart',8)
  101. nssm_craftitem_eat ('raw_scrausics_wing','Raw Scrausics Wing',1)
  102. nssm_craftitem_eat ('spicy_scrausics_wing','Spicy Scrausics Wing',6)
  103. nssm_craftitem_eat ('phoenix_nuggets','Phoenix Nuggets',20)
  104. nssm_craftitem_eat ('phoenix_tear','Phoenix Tear',20)
  105. nssm_craftitem_eat ('frosted_amphibian_heart','Frosted Amphibian Heart',-1)
  106. nssm_craftitem_eat ('surimi','Surimi',4)
  107. nssm_craftitem_eat ('amphibian_ribs','Amphibian Ribs',2)
  108. nssm_craftitem_eat ('roasted_amphibian_ribs','Roasted Amphibian Ribs',6)
  109. nssm_craftitem_eat ('dolidrosaurus_fin','Dolidrosaurus Fin',-2)
  110. nssm_craftitem_eat ('roasted_dolidrosaurus_fin','Roasted Dolidrosaurus Fin',4)
  111. nssm_craftitem_eat ('larva_meat','Larva Meat',-1)
  112. nssm_craftitem_eat ('larva_juice','Larva Juice',-3)
  113. nssm_craftitem_eat ('larva_soup','Larva Soup',10)
  114. nssm_craftitem_eat ('mantis_meat','Mantis Meat',1)
  115. nssm_craftitem_eat ('roasted_mantis_meat','Roasted Mantis Meat',4)
  116. nssm_craftitem_eat ('spider_meat','Spider Meat',-1)
  117. nssm_craftitem_eat ('roasted_spider_meat','Roasted Spider Meat',3)
  118. nssm_craftitem_eat ('silk_gland','Silk Gland',-1)
  119. nssm_craftitem_eat ('roasted_silk_gland','Roasted Silk Gland',3)
  120. nssm_craftitem_eat ('super_silk_gland','Super Silk Gland',-8)
  121. nssm_craftitem_eat ('roasted_super_silk_gland','Roasted Super Silk Gland',2)
  122. --ore generation
  123. minetest.register_ore({
  124. ore_type = "scatter",
  125. ore = "nssm:modders_block",
  126. wherein = "default:stone",
  127. clust_scarcity = 50*50*50,
  128. clust_num_ores = 1,
  129. clust_size = 1,
  130. y_min = -115,
  131. y_max = -95,
  132. })
  133. for i = 1, 9 do
  134. minetest.register_ore({
  135. ore_type = "scatter",
  136. ore = "nssm:ant_dirt",
  137. wherein = "default:cobble",
  138. clust_scarcity = 1,
  139. clust_num_ores = 1,
  140. clust_size = 1,
  141. y_min = -1,
  142. y_max = 40,
  143. })
  144. minetest.register_ore({
  145. ore_type = "scatter",
  146. ore = "nssm:ant_dirt",
  147. wherein = "default:mossycobble",
  148. clust_scarcity = 1,
  149. clust_num_ores = 1,
  150. clust_size = 1,
  151. y_min = -1000,
  152. y_max = 40,
  153. })
  154. minetest.register_ore({
  155. ore_type = "scatter",
  156. ore = "nssm:ant_dirt",
  157. wherein = "default:sandstonebrick",
  158. clust_scarcity = 1,
  159. clust_num_ores = 1,
  160. clust_size = 1,
  161. y_min = -1000,
  162. y_max = 40,
  163. })
  164. minetest.register_ore({
  165. ore_type = "scatter",
  166. ore = "nssm:ant_dirt",
  167. wherein = "stairs:stair_sandstonebrick",
  168. clust_scarcity = 1,
  169. clust_num_ores = 1,
  170. clust_size = 1,
  171. y_min = -1000,
  172. y_max = 40,
  173. })
  174. minetest.register_ore({
  175. ore_type = "scatter",
  176. ore = "nssm:ant_dirt",
  177. wherein = "stairs:stair_cobble",
  178. clust_scarcity = 1,
  179. clust_num_ores = 1,
  180. clust_size = 1,
  181. y_min = -1000,
  182. y_max = 40,
  183. })
  184. end -- END for loop
  185. minetest.register_ore({
  186. ore_type = "scatter",
  187. ore = "nssm:web",
  188. wherein = "default:junglegrass",
  189. clust_scarcity = 2*2*2,
  190. clust_num_ores = 2,
  191. clust_size = 2,
  192. y_min = -20,
  193. y_max = 200,
  194. })
  195. minetest.register_ore({
  196. ore_type = "scatter",
  197. ore = "nssm:web",
  198. wherein = "default:jungleleaves",
  199. clust_scarcity = 4*4*4,
  200. clust_num_ores = 5,
  201. clust_size = 5,
  202. y_min = -20,
  203. y_max = 200,
  204. })
  205. --nodes
  206. minetest.register_node("nssm:ant_dirt", {
  207. description = "Ant Dirt",
  208. tiles = {"ant_dirt.png"},
  209. groups = {crumbly=3},
  210. })
  211. minetest.register_node("nssm:dead_leaves", {
  212. description = "Dead leaves",
  213. tiles = {"dead_leaves.png"},
  214. groups = {snappy=3,leaves=1},
  215. })
  216. minetest.register_node("nssm:invisible_light", {
  217. description = "Invisible light source",
  218. tiles = {"transparent.png"},
  219. paramtype = "light",
  220. drawtype = "airlike",
  221. walkable = false,
  222. sunlight_propagates = true,
  223. pointable = false,
  224. diggable = false,
  225. buildable_to = true,
  226. is_ground_content = false,
  227. groups = {unbreakable=1},
  228. drop = "",
  229. light_source = 14,
  230. })
  231. minetest.register_node("nssm:venomous_gas", {
  232. description = "Venomous Gas",
  233. inventory_image = minetest.inventorycube("venomous_gas.png"),
  234. drawtype = "airlike",
  235. tiles = {
  236. {name="venomous_gas_animated.png",
  237. animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}}
  238. },
  239. paramtype = "light",
  240. walkable = false,
  241. sunlight_propagates = true,
  242. pointable = false,
  243. diggable = false,
  244. buildable_to = true,
  245. drop = "",
  246. drowning = 1,
  247. damage_per_second = 1,
  248. post_effect_color = {a=100, r=1, g=100, b=1},
  249. groups = {flammable = 2},
  250. })
  251. minetest.register_node("nssm:modders_block", {
  252. description = "Modders Block",
  253. tiles = {"modders_block.png"},
  254. is_ground_content = true,
  255. groups = {crumbly=3, not_in_creative_inventory =1},
  256. })
  257. minetest.register_node("nssm:web", {
  258. description = "Web",
  259. inventory_image = "web.png",
  260. tiles = {"web.png"} ,
  261. drawtype = "plantlike",
  262. paramtype = "light",
  263. walkable = false,
  264. pointable = true,
  265. diggable = true,
  266. buildable_to = false,
  267. drop = "",
  268. drowning = 0,
  269. liquid_renewable = false,
  270. liquidtype = "source",
  271. liquid_range= 0,
  272. liquid_alternative_flowing = "nssm:web",
  273. liquid_alternative_source = "nssm:web",
  274. liquid_viscosity = 20,
  275. groups = {flammable=2, snappy=1, liquid=1},
  276. })
  277. minetest.register_node("nssm:thick_web", {
  278. description = "Thick Web",
  279. inventory_image = "thick_web.png",
  280. tiles = {"thick_web.png"} ,
  281. drawtype = "firelike",
  282. paramtype = "light",
  283. walkable = false,
  284. pointable = true,
  285. diggable = true,
  286. buildable_to = false,
  287. drop = "",
  288. drowning = 2,
  289. liquid_renewable = false,
  290. liquidtype = "source",
  291. liquid_range= 0,
  292. liquid_alternative_flowing = "nssm:thick_web",
  293. liquid_alternative_source = "nssm:thick_web",
  294. liquid_viscosity = 30,
  295. groups = {flammable=2, liquid=1},
  296. })
  297. minetest.register_node("nssm:ink", {
  298. description = "Ink",
  299. inventory_image = minetest.inventorycube("ink.png"),
  300. drawtype = "liquid",
  301. tiles = {
  302. {
  303. name = "ink_animated.png",
  304. animation = {
  305. type = "vertical_frames",
  306. aspect_w = 16,
  307. aspect_h = 16,
  308. length = 2.0,
  309. },
  310. },
  311. },
  312. --alpha = 420,
  313. paramtype = "light",
  314. walkable = false,
  315. pointable = false,
  316. diggable = false,
  317. buildable_to = true,
  318. is_ground_content = false,
  319. drop = "",
  320. liquid_range= 0,
  321. drowning = 1,
  322. liquid_renewable = false,
  323. liquidtype = "source",
  324. liquid_alternative_flowing = "nssm:ink",
  325. liquid_alternative_source = "nssm:ink",
  326. liquid_viscosity = 1,
  327. post_effect_color = {a=2000, r=30, g=30, b=30},
  328. groups = {water=3, liquid=3, puts_out_fire=1},
  329. })
  330. minetest.register_node("nssm:mese_meteor", {
  331. description = "Mese Meteor",
  332. tiles = {"mese_meteor.png"} ,
  333. paramtype = "light",
  334. drop = "",
  335. groups = {crumbly=1, falling_node=1, flammable = 2},
  336. })
  337. minetest.register_node("nssm:pumpbomb", {
  338. tiles = {"pumpbomb_top.png","pumpbomb_bottom.png", "pumpbomb_side.png", "pumpbomb_side.png", "pumpbomb_side.png", "pumpbomb_front.png"},
  339. light_source = 5,
  340. groups = {not_in_creative_inventory =1},
  341. drop = "",
  342. on_timer = function(pos, elapsed)
  343. tnt_boom_nssm(pos, {damage_radius=4,radius=3,ignore_protection=false})
  344. minetest.set_node(pos, {name="air"})
  345. end,
  346. })
  347. --abms
  348. minetest.register_abm({
  349. nodenames = {"nssm:mese_meteor"},
  350. neighbors = {"air"},
  351. interval = 2, -- 1
  352. chance = 1,
  353. action = function(pos, node, active_object_count, active_object_count_wider)
  354. if minetest.is_protected(pos, "") then
  355. return
  356. end
  357. minetest.set_node({x=pos.x+1, y=pos.y, z=pos.z}, {name = "fire:basic_flame"})
  358. minetest.set_node({x=pos.x-1, y=pos.y, z=pos.z}, {name = "fire:basic_flame"})
  359. minetest.set_node({x=pos.x, y=pos.y, z=pos.z-1}, {name = "fire:basic_flame"})
  360. minetest.set_node({x=pos.x, y=pos.y, z=pos.z+1}, {name = "fire:basic_flame"})
  361. minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z}, {name = "fire:basic_flame"})
  362. end
  363. })
  364. --[[ These don't actually do anything
  365. minetest.register_abm({
  366. nodenames = {"nssm:web"},
  367. neighbors = {"default:junglegrass"},
  368. interval = 20.0,
  369. chance = 20,
  370. action = function(pos, node, active_object_count, active_object_count_wider)
  371. local n = minetest.get_node(pos).name
  372. if n== "air" then
  373. minetest.set_node({x = pos.x, y = pos.y + 1, z = pos.z}, {name = "nssm:web"})
  374. end
  375. end
  376. })
  377. minetest.register_abm({
  378. nodenames = {"nssm:web"},
  379. neighbors = {"default:junglegrass"},
  380. interval = 20.0,
  381. chance = 20,
  382. action = function(pos, node, active_object_count, active_object_count_wider)
  383. local n = minetest.get_node(pos).name
  384. if n== "air" then
  385. minetest.set_node({x = pos.x + 1, y = pos.y, z = pos.z}, {name = "nssm:web"})
  386. end
  387. end
  388. })
  389. minetest.register_abm({
  390. nodenames = {"nssm:web"},
  391. neighbors = {"default:junglegrass"},
  392. interval = 20.0,
  393. chance = 20,
  394. action = function(pos, node, active_object_count, active_object_count_wider)
  395. local n = minetest.get_node(pos).name
  396. if n== "air" then
  397. minetest.set_node({x = pos.x - 1, y = pos.y, z = pos.z}, {name = "nssm:web"})
  398. end
  399. end
  400. })
  401. ]]
  402. minetest.register_node("nssm:phoenix_fire", {
  403. description = "Phoenix Fire",
  404. drawtype = "firelike",
  405. tiles = {{
  406. name = "phoenix_fire_animated.png",
  407. animation = {type = "vertical_frames",
  408. aspect_w = 16, aspect_h = 16, length = 1},
  409. }},
  410. inventory_image = "phoenix_fire.png",
  411. light_source = 14,
  412. groups = {igniter = 1, snappy=1},
  413. drop = '',
  414. walkable = false,
  415. buildable_to = false,
  416. damage_per_second = 4,
  417. })
  418. minetest.register_abm({
  419. nodenames = {"nssm:phoenix_fire"},
  420. neighbors = {"air"},
  421. interval = 3,
  422. chance = 2,
  423. action = function(pos, node)
  424. minetest.set_node({x = pos.x, y = pos.y , z = pos.z}, {name = "air"})
  425. end
  426. })
  427. minetest.register_abm({
  428. nodenames = {"nssm:dead_leaves"},
  429. neighbors = {"air"},
  430. interval = 15,
  431. chance = 3,
  432. action = function(pos, node)
  433. minetest.set_node({x = pos.x, y = pos.y , z = pos.z}, {name = "air"})
  434. end
  435. })
  436. --tools
  437. minetest.register_tool('nssm:sun_sword', {
  438. description = 'Sun Sword',
  439. inventory_image = 'sun_sword.png',
  440. tool_capabilities = {
  441. full_punch_interval = 0.6,
  442. max_drop_level=1,
  443. groupcaps={
  444. snappy={times={[1]=0.80, [2]=0.40, [3]=0.20}, uses=70, maxlevel=1},
  445. fleshy={times={[2]=0.6, [3]=0.2}, uses=70, maxlevel=1}
  446. },
  447. damage_groups = {fleshy=10},
  448. },
  449. minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
  450. if puncher:get_wielded_item():get_name() == 'nssm:sun_sword' then
  451. if node.name ~= "air" and not minetest.is_protected(pos, "") then
  452. minetest.add_node(pointed_thing.above, {name = "fire:basic_flame"})
  453. end
  454. end
  455. end)
  456. })
  457. minetest.register_tool("nssm:masticone_fang_sword", {
  458. description = "Masticone Fang Sword",
  459. inventory_image = "masticone_fang_sword.png",
  460. tool_capabilities = {
  461. full_punch_interval =0.7 ,
  462. max_drop_level=1,
  463. groupcaps={
  464. snappy={times={[1]=0.6, [2]=0.5, [3]=0.4}, uses=200, maxlevel=1},
  465. fleshy={times={[2]=0.8, [3]=0.4}, uses=200, maxlevel=1}
  466. },
  467. damage_groups = {fleshy=8},
  468. },
  469. })
  470. minetest.register_tool("nssm:night_sword", {
  471. description = "Night Sword",
  472. inventory_image = "night_sword.png",
  473. tool_capabilities = {
  474. full_punch_interval =0.4 ,
  475. max_drop_level=1,
  476. groupcaps={
  477. snappy={times={[1]=0.4, [2]=0.3, [3]=0.2}, uses=300, maxlevel=1},
  478. fleshy={times={[2]=0.7, [3]=0.3}, uses=300, maxlevel=1}
  479. },
  480. damage_groups = {fleshy=12},
  481. },
  482. })
  483. minetest.register_tool("nssm:crab_light_mace", {
  484. description = "Light Crab Mace",
  485. inventory_image = "crab_light_mace.png",
  486. tool_capabilities = {
  487. full_punch_interval =2 ,
  488. max_drop_level=1,
  489. groupcaps={
  490. fleshy={times={[2]=1.4, [3]=1}, uses=20, maxlevel=1}
  491. },
  492. damage_groups = {fleshy=8},
  493. },
  494. })
  495. minetest.register_tool("nssm:crab_heavy_mace", {
  496. description = "Heavy Crab Mace",
  497. inventory_image = "crab_heavy_mace.png",
  498. tool_capabilities = {
  499. full_punch_interval =4 ,
  500. max_drop_level=1,
  501. groupcaps={
  502. fleshy={times={[2]=2, [3]=1.4}, uses=20, maxlevel=1}
  503. },
  504. damage_groups = {fleshy=12},
  505. },
  506. })
  507. minetest.register_tool("nssm:mantis_battleaxe", {
  508. description = "Mantis Battleaxe",
  509. inventory_image = "mantis_battleaxe.png",
  510. tool_capabilities = {
  511. full_punch_interval =3 ,
  512. max_drop_level=1,
  513. groupcaps={
  514. fleshy={times={[2]=2, [3]=1.4}, uses=20, maxlevel=1}
  515. },
  516. damage_groups = {fleshy=10},
  517. },
  518. })
  519. minetest.register_node("nssm:rope", {
  520. description = "Rope",
  521. paramtype = "light",
  522. walkable = false,
  523. climbable = true,
  524. sunlight_propagates = true,
  525. drawtype = "plantlike",
  526. drops = "nssm:rope",
  527. tiles = { "rope.png" },
  528. groups = {snappy=1},
  529. })
  530. minetest.register_tool("nssm:stoneater_pick", {
  531. description = "Stoneater Pickaxe",
  532. inventory_image = "stoneater_pick.png",
  533. tool_capabilities = {
  534. full_punch_interval = 0.9,
  535. max_drop_level=0,
  536. groupcaps={
  537. cracky = {times={[3]=0.0}, uses=200, maxlevel=1},
  538. },
  539. damage_groups = {fleshy=5},
  540. },
  541. })
  542. minetest.register_tool("nssm:mantis_sword", {
  543. description = "Mantis Sword",
  544. inventory_image = "mantis_sword.png",
  545. tool_capabilities = {
  546. full_punch_interval =0.7 ,
  547. max_drop_level=1,
  548. groupcaps={
  549. fleshy={times={[2]=1.0, [3]=0.4}, uses=30, maxlevel=1},
  550. snappy={times={[2]=0.80, [3]=0.3}, uses=40, maxlevel=1},
  551. },
  552. damage_groups = {fleshy=7},
  553. },
  554. })
  555. minetest.register_tool("nssm:little_ice_tooth_knife", {
  556. description = "Little Ice Tooth Knife",
  557. inventory_image = "little_ice_tooth_knife.png",
  558. tool_capabilities = {
  559. full_punch_interval =0.3 ,
  560. max_drop_level=1,
  561. groupcaps={
  562. fleshy={times={[2]=1.0, [3]=0.4}, uses=4, maxlevel=1},
  563. snappy={times={[2]=0.80, [3]=0.3}, uses=7, maxlevel=1},
  564. },
  565. damage_groups = {fleshy=5},
  566. },
  567. })
  568. minetest.register_tool("nssm:manticore_spine_knife", {
  569. description = "Manticore Spine Knife",
  570. inventory_image = "manticore_spine_knife.png",
  571. tool_capabilities = {
  572. full_punch_interval =0.4 ,
  573. max_drop_level=1,
  574. groupcaps={
  575. fleshy={times={[2]=1.0, [3]=0.4}, uses=6, maxlevel=1},
  576. snappy={times={[2]=0.80, [3]=0.3}, uses=6, maxlevel=1},
  577. },
  578. damage_groups = {fleshy=6},
  579. },
  580. })
  581. minetest.register_tool("nssm:felucco_knife", {
  582. description = "Felucco Knife",
  583. inventory_image = "felucco_knife.png",
  584. tool_capabilities = {
  585. full_punch_interval =0.4 ,
  586. max_drop_level=1,
  587. groupcaps={
  588. fleshy={times={[2]=1.0, [3]=0.4}, uses=6, maxlevel=1},
  589. snappy={times={[2]=0.80, [3]=0.3}, uses=6, maxlevel=1},
  590. },
  591. damage_groups = {fleshy=6},
  592. },
  593. })
  594. if minetest.get_modpath("farming") then
  595. farming.register_hoe(":farming:felucco_hoe", {
  596. description = "Felucco Hoe",
  597. inventory_image = "felucco_hoe.png",
  598. max_uses = 290,
  599. material = "nssm:felucco_horn"
  600. })
  601. farming.register_hoe(":farming:ant_hoe", {
  602. description = "Ant Hoe",
  603. inventory_image = "ant_hoe.png",
  604. max_uses = 350,
  605. material = "nssm:ant_mandible"
  606. })
  607. end
  608. minetest.register_tool("nssm:ant_sword", {
  609. description = "Ant Sword",
  610. inventory_image = "ant_sword.png",
  611. tool_capabilities = {
  612. full_punch_interval = 0.8,
  613. max_drop_level=1,
  614. groupcaps={
  615. snappy={times={[1]=1.30, [2]=0.90, [3]=0.40}, uses=40, maxlevel=3},
  616. },
  617. damage_groups = {fleshy=8},
  618. },
  619. })
  620. minetest.register_tool("nssm:ant_shovel", {
  621. description = "Ant Shovel",
  622. inventory_image = "ant_shovel.png",
  623. wield_image = "ant_shovel.png^[transformR90",
  624. tool_capabilities = {
  625. full_punch_interval = 1,
  626. max_drop_level=1,
  627. groupcaps={
  628. crumbly = {times={[1]=1.50, [2]=0.90, [3]=0.40}, uses=35, maxlevel=2},
  629. },
  630. damage_groups = {fleshy=4},
  631. },
  632. })
  633. minetest.register_tool("nssm:duck_beak_shovel", {
  634. description = "Duck Beak Shovel",
  635. inventory_image = "duck_beak_shovel.png",
  636. wield_image = "duck_beak_shovel.png^[transformR90",
  637. tool_capabilities = {
  638. full_punch_interval = 0.6,
  639. max_drop_level=1,
  640. groupcaps={
  641. crumbly = {times={[1]=1.10, [2]=0.80, [3]=0.20}, uses=5, maxlevel=2},
  642. },
  643. damage_groups = {fleshy=4},
  644. },
  645. })
  646. minetest.register_tool("nssm:mantis_axe", {
  647. description = "Mantis Axe",
  648. inventory_image = "mantis_axe.png",
  649. tool_capabilities = {
  650. full_punch_interval = 0.8,
  651. max_drop_level=1,
  652. groupcaps={
  653. choppy={times={[1]=2.20, [2]=1.00, [3]=0.60}, uses=30, maxlevel=3},
  654. },
  655. damage_groups = {fleshy=5},
  656. },
  657. })
  658. minetest.register_tool("nssm:ant_billhook", {
  659. description = "Ant Billhook",
  660. inventory_image = "ant_billhook.png",
  661. tool_capabilities = {
  662. full_punch_interval = 0.8,
  663. max_drop_level=1,
  664. groupcaps={
  665. choppy={times={[1]=1.40, [2]=1.00, [3]=0.60}, uses=30, maxlevel=3},
  666. snappy={times={[1]=1.40, [2]=1.00, [3]=0.60}, uses=30, maxlevel=3},
  667. },
  668. damage_groups = {fleshy=6},
  669. },
  670. })
  671. minetest.register_tool("nssm:duck_beak_pick",{
  672. description = "Duck Beak Pickaxe",
  673. inventory_image = "duck_beak_pick.png",
  674. tool_capabilities = {
  675. full_punch_interval = 0.6,
  676. max_drop_level=3,
  677. groupcaps={
  678. cracky = {times={[1]=1.0, [2]=0.8, [3]=0.20}, uses=3, maxlevel=3},
  679. },
  680. damage_groups = {fleshy=5},
  681. },
  682. })
  683. minetest.register_tool("nssm:ant_pick", {
  684. description = "Ant Pickaxe",
  685. inventory_image = "ant_pick.png",
  686. tool_capabilities = {
  687. full_punch_interval = 1.2,
  688. max_drop_level=1,
  689. groupcaps={
  690. cracky = {times={[1]=2.00, [2]=1.20, [3]=0.80}, uses=30, maxlevel=2},
  691. },
  692. damage_groups = {fleshy=4},
  693. },
  694. })
  695. minetest.register_tool("nssm:mantis_pick", {
  696. description = "Mantis Pickaxe",
  697. inventory_image = "mantis_pick.png",
  698. tool_capabilities = {
  699. full_punch_interval = 1,
  700. max_drop_level=1,
  701. groupcaps={
  702. cracky = {times={[1]=1.6, [2]=1.0, [3]=0.60}, uses=20, maxlevel=2},
  703. },
  704. damage_groups = {fleshy=4},
  705. },
  706. })
  707. minetest.register_tool("nssm:tarantula_warhammer", {
  708. description = "Tarantula Warhammer",
  709. inventory_image = "tarantula_warhammer.png",
  710. wield_scale= {x=2,y=2,z=1.5},
  711. tool_capabilities = {
  712. full_punch_interval =1,
  713. max_drop_level=1,
  714. groupcaps={
  715. cracky={times={[1]=0.6, [2]=0.5, [3]=0.4}, uses=80, maxlevel=1},
  716. fleshy={times={[2]=0.8, [3]=0.4}, uses=200, maxlevel=1}
  717. },
  718. damage_groups = {fleshy=13},
  719. },
  720. })
  721. minetest.register_tool("nssm:axe_of_pride", {
  722. description = "Axe of Pride",
  723. inventory_image = "axe_of_pride.png",
  724. wield_scale= {x=2,y=2,z=1.5},
  725. tool_capabilities = {
  726. full_punch_interval =1.3 ,
  727. max_drop_level=1,
  728. groupcaps={
  729. snappy={times={[1]=0.6, [2]=0.5, [3]=0.4}, uses=100, maxlevel=1},
  730. fleshy={times={[2]=0.8, [3]=0.4}, uses=400, maxlevel=1}
  731. },
  732. damage_groups = {fleshy=16},
  733. },
  734. on_drop = function(itemstack, dropper, pos)
  735. local objects = minetest.get_objects_inside_radius(pos, 10)
  736. local flag = 0
  737. local part = 0
  738. for _,obj in ipairs(objects) do
  739. part = 0
  740. if flag == 0 then
  741. local pname = dropper:get_player_name()
  742. local player_inv = minetest.get_inventory({type='player', name = pname})
  743. if player_inv:is_empty('main') then
  744. --minetest.chat_send_all("Inventory empty")
  745. else
  746. local found = 0
  747. for i = 1,32 do
  748. local items = player_inv:get_stack('main', i)
  749. local n = items:get_name()
  750. if n == "nssm:energy_globe" then
  751. found = i
  752. break
  753. end
  754. end
  755. if found == 0 then
  756. minetest.chat_send_player(pname, "You haven't got any Energy Globe!")
  757. return
  758. else
  759. if (obj:is_player()) then
  760. --minetest.chat_send_all("Giocatore")
  761. if (obj:get_player_name()~=dropper:get_player_name()) then
  762. obj:set_hp(obj:get_hp() - 10)
  763. dropper:set_hp(dropper:get_hp() + 10)
  764. --flag = 1
  765. local items = player_inv:get_stack('main', found)
  766. items:take_item()
  767. player_inv:set_stack('main', found, items)
  768. part = 1
  769. end
  770. else
  771. if (obj:get_luaentity().health) then
  772. --minetest.chat_send_all("Entity")
  773. obj:get_luaentity().health = obj:get_luaentity().health -10
  774. -- check_for_death(obj:get_luaentity())
  775. dropper:set_hp(dropper:get_hp()+10)
  776. --flag = 1
  777. local items = player_inv:get_stack('main', found)
  778. items:take_item()
  779. player_inv:set_stack('main', found, items)
  780. part = 1
  781. end
  782. end
  783. if part == 1 then
  784. local s = dropper:get_pos()
  785. local p = obj:get_pos()
  786. local m = 2
  787. minetest.add_particlespawner(
  788. 3, --amount
  789. 0.1, --time
  790. {x=p.x-0.5, y=p.y-0.5, z=p.z-0.5}, --minpos
  791. {x=p.x+0.5, y=p.y+0.5, z=p.z+0.5}, --maxpos
  792. {x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --minvel
  793. {x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --maxvel
  794. {x=s.x-p.x, y=s.y-p.y, z=s.z-p.z}, --minacc
  795. {x=s.x-p.x, y=s.y-p.y, z=s.z-p.z}, --maxacc
  796. 0.5, --minexptime
  797. 1, --maxexptime
  798. 3, --minsize
  799. 4, --maxsize
  800. false, --collisiondetection
  801. "heart.png" --texture
  802. )
  803. end
  804. end
  805. end
  806. end
  807. end
  808. end,
  809. })
  810. minetest.register_tool("nssm:gratuitousness_battleaxe", {
  811. description = "Gratuitousness Battleaxe",
  812. inventory_image = "gratuitousness_battleaxe.png",
  813. wield_scale= {x=2.2,y=2.2,z=1.5},
  814. tool_capabilities = {
  815. full_punch_interval =1.6 ,
  816. max_drop_level=1,
  817. groupcaps={
  818. snappy={times={[1]=0.6, [2]=0.5, [3]=0.4}, uses=100, maxlevel=1},
  819. fleshy={times={[2]=0.8, [3]=0.4}, uses=400, maxlevel=1}
  820. },
  821. damage_groups = {fleshy=18},
  822. },
  823. on_drop = function(itemstack, dropper, pos)
  824. local objects = minetest.get_objects_inside_radius(pos, 10)
  825. local flag = 0
  826. local vec = dropper:get_look_dir()
  827. local pos = dropper:get_pos()
  828. --vec.y = 0
  829. for i = 1, 10 do
  830. pos = vector.add(pos, vec)
  831. end
  832. local pname = dropper:get_player_name()
  833. local player_inv = minetest.get_inventory({type='player', name = pname})
  834. local found = 0
  835. for i = 1, 32 do
  836. local items = player_inv:get_stack('main', i)
  837. local n = items:get_name()
  838. if n == "nssm:energy_globe" then
  839. found = i
  840. break
  841. end
  842. end
  843. if found == 0 then
  844. minetest.chat_send_player(pname, "You haven't got any Energy Globe!")
  845. return
  846. else
  847. local items = player_inv:get_stack('main', found)
  848. items:take_item()
  849. player_inv:set_stack('main', found, items)
  850. tnt.boom(pos, {damage_radius=5,radius=4,ignore_protection=false})
  851. end
  852. end,
  853. })
  854. minetest.register_tool("nssm:sword_of_eagerness", {
  855. description = "Sword of Eagerness",
  856. inventory_image = "sword_of_eagerness.png",
  857. wield_scale= {x=2,y=2,z=1},
  858. tool_capabilities = {
  859. full_punch_interval =0.7 ,
  860. max_drop_level=1,
  861. groupcaps={
  862. snappy={times={[1]=0.6, [2]=0.5, [3]=0.4}, uses=100, maxlevel=1},
  863. fleshy={times={[2]=0.8, [3]=0.4}, uses=400, maxlevel=1}
  864. },
  865. damage_groups = {fleshy=14},
  866. },
  867. on_drop = function(itemstack, dropper, pos)
  868. local objects = minetest.get_objects_inside_radius(pos, 10)
  869. local flag = 0
  870. for _,obj in ipairs(objects) do
  871. local part = 0
  872. if flag == 0 then
  873. local pname = dropper:get_player_name()
  874. local player_inv = minetest.get_inventory({type='player', name = pname})
  875. if player_inv:is_empty('main') then
  876. --minetest.chat_send_all("Inventory empty")
  877. else
  878. local found = 0
  879. for i = 1,32 do
  880. local items = player_inv:get_stack('main', i)
  881. local n = items:get_name()
  882. if n == "nssm:energy_globe" then
  883. found = i
  884. break
  885. end
  886. end
  887. if found == 0 then
  888. minetest.chat_send_player(pname, "You haven't got any Energy Globe!")
  889. return
  890. else
  891. local pos = obj:get_pos()
  892. pos.y = pos.y + 15
  893. if (obj:is_player()) then
  894. if (obj:get_player_name()~=dropper:get_player_name()) then
  895. part=1
  896. obj:set_pos(pos)
  897. --flag = 1
  898. local items = player_inv:get_stack('main', found)
  899. items:take_item()
  900. player_inv:set_stack('main', found, items)
  901. end
  902. else
  903. if (obj:get_luaentity().health) then
  904. obj:get_luaentity().old_y = pos.y
  905. obj:set_pos(pos)
  906. part=1
  907. --flag = 1
  908. local items = player_inv:get_stack('main', found)
  909. items:take_item()
  910. player_inv:set_stack('main', found, items)
  911. end
  912. end
  913. if part==1 then
  914. local s = pos
  915. s.y = s.y - 15
  916. minetest.add_particlespawner(
  917. 25, --amount
  918. 0.3, --time
  919. vector.subtract(s, 0.5), --minpos
  920. vector.add(s, 0.5), --maxpos
  921. {x=0, y=10, z=0}, --minvel
  922. {x=0.1, y=11, z=0.1}, --maxvel
  923. {x=0,y=1,z=0}, --minacc
  924. {x=0,y=1,z=0}, --maxacc
  925. 0.5, --minexptime
  926. 1, --maxexptime
  927. 1, --minsize
  928. 2, --maxsize
  929. false, --collisiondetection
  930. "slothful_soul_fragment.png" --texture
  931. )
  932. end
  933. end
  934. end
  935. end
  936. end
  937. end,
  938. })
  939. minetest.register_tool("nssm:falchion_of_eagerness", {
  940. description = "Falchion of Eagerness",
  941. inventory_image = "falchion_of_eagerness.png",
  942. wield_scale= {x=2,y=2,z=1},
  943. tool_capabilities = {
  944. full_punch_interval =1 ,
  945. max_drop_level=1,
  946. groupcaps={
  947. snappy={times={[1]=0.6, [2]=0.5, [3]=0.4}, uses=100, maxlevel=1},
  948. fleshy={times={[2]=0.8, [3]=0.4}, uses=400, maxlevel=1}
  949. },
  950. damage_groups = {fleshy=16},
  951. },
  952. on_drop = function(itemstack, dropper, pos)
  953. local vec = dropper:get_look_dir()
  954. local pos = dropper:get_pos()
  955. --vec.y = 0
  956. for i=1,16 do
  957. pos = vector.add(pos, vec)
  958. end
  959. local pname = dropper:get_player_name()
  960. local player_inv = minetest.get_inventory({type='player', name = pname})
  961. if player_inv:is_empty('main') then
  962. --minetest.chat_send_all("Inventory empty")
  963. else
  964. local found = 0
  965. for i = 1,32 do
  966. local items = player_inv:get_stack('main', i)
  967. local n = items:get_name()
  968. if n == "nssm:life_energy" then
  969. if items:get_count() >= 5 then
  970. found = i
  971. break
  972. end
  973. end
  974. end
  975. if found == 0 then
  976. minetest.chat_send_player(pname, "You haven't got enough life_energy!")
  977. return
  978. else
  979. local s = dropper:get_pos()
  980. minetest.add_particlespawner(
  981. 25, --amount
  982. 0.3, --time
  983. vector.subtract(s, 0.5), --minpos
  984. vector.add(s, 0.5), --maxpos
  985. {x=0, y=10, z=0}, --minvel
  986. {x=0.1, y=11, z=0.1}, --maxvel
  987. {x=0,y=1,z=0}, --minacc
  988. {x=0,y=1,z=0}, --maxacc
  989. 0.5, --minexptime
  990. 1, --maxexptime
  991. 1, --minsize
  992. 2, --maxsize
  993. false, --collisiondetection
  994. "slothful_soul_fragment.png" --texture
  995. )
  996. minetest.remove_node(pos)
  997. pos.y=pos.y+1
  998. minetest.remove_node(pos)
  999. pos.y=pos.y-2
  1000. minetest.remove_node(pos)
  1001. dropper:set_pos(pos)
  1002. s = pos
  1003. s.y = s.y+10
  1004. minetest.add_particlespawner(
  1005. 25, --amount
  1006. 0.3, --time
  1007. vector.subtract(s, 0.5), --minpos
  1008. vector.add(s, 0.5), --maxpos
  1009. {x=0, y=-10, z=0}, --minvel
  1010. {x=0.1, y=-11, z=0.1}, --maxvel
  1011. {x=0,y=-1,z=0}, --minacc
  1012. {x=0,y=-1,z=0}, --maxacc
  1013. 0.5, --minexptime
  1014. 1, --maxexptime
  1015. 1, --minsize
  1016. 2, --maxsize
  1017. false, --collisiondetection
  1018. "slothful_soul_fragment.png" --texture
  1019. )
  1020. local items = player_inv:get_stack('main', found)
  1021. items:set_count(items:get_count()-5)
  1022. player_inv:set_stack('main', found, items)
  1023. end
  1024. end
  1025. end,
  1026. })
  1027. minetest.register_tool("nssm:sword_of_envy", {
  1028. description = "Sword of Envy",
  1029. inventory_image = "sword_of_envy.png",
  1030. wield_scale= {x=2,y=2,z=1},
  1031. tool_capabilities = {
  1032. full_punch_interval =0.9 ,
  1033. max_drop_level=1,
  1034. groupcaps={
  1035. snappy={times={[1]=0.6, [2]=0.5, [3]=0.4}, uses=100, maxlevel=1},
  1036. fleshy={times={[2]=0.5, [3]=0.2}, uses=400, maxlevel=1}
  1037. },
  1038. damage_groups = {fleshy=14},
  1039. },
  1040. on_drop = function(itemstack, dropper, pos)
  1041. local objects = minetest.get_objects_inside_radius(pos, 10)
  1042. local flag = 0
  1043. for _,obj in ipairs(objects) do
  1044. if flag == 0 then
  1045. local pname = dropper:get_player_name()
  1046. local player_inv = minetest.get_inventory({type='player', name = pname})
  1047. if player_inv:is_empty('main') then
  1048. --minetest.chat_send_all("Inventory empty")
  1049. else
  1050. local found = 0
  1051. for i = 1,32 do
  1052. local items = player_inv:get_stack('main', i)
  1053. local n = items:get_name()
  1054. if n == "nssm:energy_globe" then
  1055. found = i
  1056. break
  1057. end
  1058. end
  1059. if found == 0 then
  1060. minetest.chat_send_player(pname, "You haven't got any Energy Globe!")
  1061. return
  1062. else
  1063. if (obj:is_player()) then
  1064. --minetest.chat_send_all("Giocatore")
  1065. if (obj:get_player_name()~=dropper:get_player_name()) then
  1066. local hpp = obj:get_hp()
  1067. obj:set_hp(dropper:get_hp())
  1068. dropper:set_hp(hpp)
  1069. flag = 1
  1070. local items = player_inv:get_stack('main', found)
  1071. items:take_item()
  1072. player_inv:set_stack('main', found, items)
  1073. end
  1074. else
  1075. if (obj:get_luaentity().health) then
  1076. local hpp = obj:get_luaentity().health
  1077. obj:get_luaentity().health = dropper:get_hp()
  1078. if hpp > 20 then
  1079. dropper:set_hp(20)
  1080. else
  1081. dropper:set_hp(hpp)
  1082. end
  1083. -- check_for_death(obj:get_luaentity())
  1084. flag = 1
  1085. local items = player_inv:get_stack('main', found)
  1086. items:take_item()
  1087. player_inv:set_stack('main', found, items)
  1088. end
  1089. end
  1090. end
  1091. end
  1092. end
  1093. end
  1094. end,
  1095. })
  1096. minetest.register_tool("nssm:sword_of_gluttony", {
  1097. description = "Sword of Gluttony",
  1098. inventory_image = "sword_of_gluttony.png",
  1099. wield_scale= {x=2,y=2,z=1},
  1100. tool_capabilities = {
  1101. full_punch_interval =1 ,
  1102. max_drop_level=1,
  1103. groupcaps={
  1104. snappy={times={[1]=0.9, [2]=0.7, [3]=0.4}, uses=100, maxlevel=1},
  1105. fleshy={times={[2]=0.6, [3]=0.2}, uses=400, maxlevel=1}
  1106. },
  1107. damage_groups = {fleshy=14},
  1108. },
  1109. on_drop = function(itemstack, dropper, pos)
  1110. local objects = minetest.get_objects_inside_radius(pos, 10)
  1111. local flag = 0
  1112. for _,obj in ipairs(objects) do
  1113. if flag == 0 then
  1114. local pname = dropper:get_player_name()
  1115. local player_inv = minetest.get_inventory({type='player', name = pname})
  1116. if player_inv:is_empty('main') then
  1117. --minetest.chat_send_all("Inventory empty")
  1118. else
  1119. local found = 0
  1120. for i = 1,32 do
  1121. local items = player_inv:get_stack('main', i)
  1122. local n = items:get_name()
  1123. if n == "nssm:energy_globe" then
  1124. found = i
  1125. break
  1126. end
  1127. end
  1128. if found == 0 then
  1129. minetest.chat_send_player(pname, "You haven't got any Energy Globe!")
  1130. return
  1131. else
  1132. if (obj:is_player()) then
  1133. if (obj:get_player_name()~=dropper:get_player_name()) then
  1134. obj:set_hp(obj:get_hp()-10)
  1135. --flag = 1
  1136. --take energy globe from inventory:
  1137. local items = player_inv:get_stack('main', found)
  1138. items:take_item()
  1139. player_inv:set_stack('main', found, items)
  1140. end
  1141. else
  1142. if (obj:get_luaentity().health) then
  1143. if obj:get_luaentity().health <= 32 then
  1144. local pos = obj:get_pos()
  1145. obj:remove()
  1146. --check_for_death(obj:get_luaentity())
  1147. --flag = 1
  1148. --take energy globe from inventory:
  1149. local items = player_inv:get_stack('main', found)
  1150. items:take_item()
  1151. player_inv:set_stack('main', found, items)
  1152. for i = 1,math.random(1,4) do
  1153. drop = minetest.add_item(pos, "nssm:roasted_duck_legs 1")
  1154. drops(drop)
  1155. end
  1156. local s = obj:get_pos()
  1157. local p = dropper:get_pos()
  1158. local m = 3
  1159. minetest.add_particlespawner(
  1160. 10, --amount
  1161. 0.1, --time
  1162. {x=p.x-0.5, y=p.y-0.5, z=p.z-0.5}, --minpos
  1163. {x=p.x+0.5, y=p.y+0.5, z=p.z+0.5}, --maxpos
  1164. {x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --minvel
  1165. {x=(s.x-p.x)*m, y=(s.y-p.y)*m, z=(s.z-p.z)*m}, --maxvel
  1166. {x=s.x-p.x, y=s.y-p.y, z=s.z-p.z}, --minacc
  1167. {x=s.x-p.x, y=s.y-p.y, z=s.z-p.z}, --maxacc
  1168. 0.5, --minexptime
  1169. 1, --maxexptime
  1170. 1, --minsize
  1171. 2, --maxsize
  1172. false, --collisiondetection
  1173. "gluttonous_soul_fragment.png" --texture
  1174. )
  1175. end
  1176. end
  1177. end
  1178. end
  1179. end
  1180. end
  1181. end
  1182. end,
  1183. })
  1184. minetest.register_tool("nssm:death_scythe", {
  1185. description = "Death Scythe",
  1186. wield_scale= {x=3,y=3,z=1.3},
  1187. inventory_image = "death_scythe.png",
  1188. tool_capabilities = {
  1189. full_punch_interval =0.2 ,
  1190. max_drop_level=1,
  1191. groupcaps={
  1192. snappy={times={[1]=0.1, [2]=0.1, [3]=0.1}, uses=28000, maxlevel=1},
  1193. fleshy={times={[2]=0.1, [3]=0.1}, uses=28000, maxlevel=1}
  1194. },
  1195. damage_groups = {fleshy=28},
  1196. },
  1197. groups ={not_in_creative_inventory=1},
  1198. on_drop = function(itemstack, dropper, pos)
  1199. local objects = minetest.get_objects_inside_radius(pos, 10)
  1200. local flag = 0
  1201. dropper:set_hp(dropper:get_hp()-9)
  1202. for _,obj in ipairs(objects) do
  1203. flag = 0
  1204. if (obj:is_player()) then
  1205. if (obj:get_player_name()~=dropper:get_player_name()) then
  1206. obj:set_hp(obj:get_hp()-40)
  1207. flag = 1
  1208. end
  1209. else
  1210. if (obj:get_luaentity().health) then
  1211. obj:get_luaentity().health = obj:get_luaentity().health -40
  1212. -- check_for_death(obj:get_luaentity())
  1213. flag = 1
  1214. end
  1215. end
  1216. if flag == 1 then
  1217. for i = 1,math.random(1,2) do
  1218. drop = minetest.add_item(pos, "nssm:energy_globe 1")
  1219. if drop then
  1220. drop:set_velocity({
  1221. x = math.random(-10, 10) / 9,
  1222. y = 5,
  1223. z = math.random(-10, 10) / 9,
  1224. })
  1225. end
  1226. end
  1227. end
  1228. end
  1229. local pos = dropper:get_pos()
  1230. local vec = {x=5,y=5,z=5}
  1231. local poslist = minetest.find_nodes_in_area(vector.subtract(pos, vec), vector.add(pos,vec), "default:dirt_with_grass")
  1232. for _,v in pairs(poslist) do
  1233. --minetest.chat_send_all(minetest.pos_to_string(v))
  1234. minetest.set_node(v, {name="default:dirt_with_dry_grass"})
  1235. if math.random(1,3)==1 then
  1236. v.y = v.y +2
  1237. drop = minetest.add_item(v, "nssm:life_energy 1")
  1238. drops(drop)
  1239. end
  1240. end
  1241. local poslist = minetest.find_nodes_in_area_under_air(vector.subtract(pos, vec), vector.add(pos,vec), "group:flora")
  1242. for _,v in pairs(poslist) do
  1243. --minetest.chat_send_all(minetest.pos_to_string(v))
  1244. minetest.set_node(v, {name="default:dry_shrub"})
  1245. if math.random(1,3)==1 then
  1246. v.y = v.y +2
  1247. drop = minetest.add_item(v, "nssm:life_energy 1")
  1248. drops(drop)
  1249. end
  1250. end
  1251. local poslist = minetest.find_nodes_in_area(vector.subtract(pos, vec), vector.add(pos,vec), "group:leaves")
  1252. for _,v in pairs(poslist) do
  1253. --minetest.chat_send_all(minetest.pos_to_string(v))
  1254. minetest.set_node(v, {name="nssm:dead_leaves"})
  1255. if math.random(1,3)==1 then
  1256. v.y = v.y +2
  1257. drop = minetest.add_item(v, "nssm:life_energy 1")
  1258. drops(drop)
  1259. end
  1260. end
  1261. end,
  1262. })
  1263. --recipes
  1264. minetest.register_craft({
  1265. output = 'nssm:web_string',
  1266. recipe = {
  1267. {'nssm:web', 'nssm:web'},
  1268. {'nssm:web', 'nssm:web'},
  1269. }
  1270. })
  1271. minetest.register_craft({
  1272. output = 'nssm:dense_web_string',
  1273. recipe = {
  1274. {'nssm:web_string', 'nssm:web_string', 'nssm:web_string'},
  1275. {'nssm:web_string', 'nssm:web_string', 'nssm:web_string'},
  1276. {'nssm:web_string', 'nssm:web_string', 'nssm:web_string'},
  1277. }
  1278. })
  1279. minetest.register_craft({
  1280. output = 'nssm:mantis_sword',
  1281. recipe = {
  1282. {'nssm:mantis_claw'},
  1283. {'nssm:mantis_claw'},
  1284. {'group:stick'},
  1285. }
  1286. })
  1287. minetest.register_craft({
  1288. output = 'nssm:masticone_fang_sword',
  1289. recipe = {
  1290. {'nssm:masticone_fang', 'nssm:masticone_fang'},
  1291. {'nssm:masticone_fang', ''},
  1292. {'group:stick', ''},
  1293. }
  1294. })
  1295. minetest.register_craft({
  1296. output = 'nssm:black_ice_tooth',
  1297. type = "shapeless",
  1298. recipe = {'nssm:digested_sand', 'nssm:ice_tooth'},
  1299. })
  1300. minetest.register_craft({
  1301. output = 'nssm:web 4',
  1302. type = "shapeless",
  1303. recipe = {'nssm:silk_gland'},
  1304. })
  1305. minetest.register_craft({
  1306. output = 'nssm:crab_light_mace',
  1307. recipe = {
  1308. {'nssm:crab_chela'},
  1309. {'group:stick'},
  1310. {'group:stick'},
  1311. }
  1312. })
  1313. minetest.register_craft({
  1314. output = 'nssm:crab_heavy_mace',
  1315. recipe = {
  1316. {'', 'nssm:crab_chela', ''},
  1317. {'nssm:crab_chela', 'nssm:crab_chela', 'nssm:crab_chela'},
  1318. {'', 'group:stick', ''},
  1319. }
  1320. })
  1321. minetest.register_craft({
  1322. output = 'nssm:energy_globe',
  1323. recipe = {
  1324. {'nssm:life_energy', 'nssm:life_energy', 'nssm:life_energy'},
  1325. {'nssm:life_energy', 'nssm:life_energy', 'nssm:life_energy'},
  1326. {'nssm:life_energy', 'nssm:life_energy', 'nssm:life_energy'},
  1327. }
  1328. })
  1329. minetest.register_craft({
  1330. output = 'nssm:great_energy_globe',
  1331. recipe = {
  1332. {'nssm:energy_globe', 'nssm:energy_globe', 'nssm:energy_globe'},
  1333. {'nssm:energy_globe', 'nssm:energy_globe', 'nssm:energy_globe'},
  1334. {'nssm:energy_globe', 'nssm:energy_globe', 'nssm:energy_globe'},
  1335. }
  1336. })
  1337. minetest.register_craft({
  1338. output = 'nssm:superior_energy_globe',
  1339. recipe = {
  1340. {'nssm:great_energy_globe', 'nssm:great_energy_globe', 'nssm:great_energy_globe'},
  1341. {'nssm:great_energy_globe', 'nssm:great_energy_globe', 'nssm:great_energy_globe'},
  1342. {'nssm:great_energy_globe', 'nssm:great_energy_globe', 'nssm:great_energy_globe'},
  1343. }
  1344. })
  1345. minetest.register_craft({
  1346. output = 'nssm:mese_egg',
  1347. type = "shapeless",
  1348. recipe = {'nssm:tarantula_chelicerae', 'nssm:helmet_masticone_crowned', 'nssm:eyed_tentacle','nssm:black_ice_tooth', 'nssm:superior_energy_globe', 'nssm:sky_feather','nssm:cursed_pumpkin_seed', 'nssm:ant_queen_abdomen', 'nssm:snake_scute'}
  1349. })
  1350. --[[minetest.register_craft({
  1351. output = 'nssm:masticone_skull_crowned',
  1352. recipe = {
  1353. {'', 'nssm:king_duck_crown', ''},
  1354. {'', 'nssm:masticone_skull', ''},
  1355. {'', '', ''},
  1356. }
  1357. })]]
  1358. minetest.register_craft({
  1359. output = 'nssm:eyed_tentacle',
  1360. type = "shapeless",
  1361. recipe = {'nssm:lava_titan_eye','nssm:tentacle_curly'}
  1362. })
  1363. minetest.register_craft({
  1364. output = 'nssm:life_energy 9',
  1365. type = "shapeless",
  1366. recipe = {'nssm:energy_globe'}
  1367. })
  1368. minetest.register_craft({
  1369. output = 'nssm:energy_globe 9',
  1370. type = "shapeless",
  1371. recipe = {'nssm:great_energy_globe'}
  1372. })
  1373. minetest.register_craft({
  1374. output = 'nssm:great_energy_globe 9',
  1375. type = "shapeless",
  1376. recipe = {'nssm:superior_energy_globe'}
  1377. })
  1378. --[[
  1379. minetest.register_craft({
  1380. output = 'nssm:masticone_skull',
  1381. recipe = {
  1382. {'nssm:masticone_skull_fragments', 'nssm:masticone_skull_fragments', 'nssm:masticone_skull_fragments'},
  1383. {'nssm:masticone_skull_fragments', 'nssm:masticone_skull_fragments', 'nssm:masticone_skull_fragments'},
  1384. {'nssm:masticone_skull_fragments', 'nssm:masticone_skull_fragments', 'nssm:masticone_skull_fragments'},
  1385. }
  1386. })]]
  1387. minetest.register_craft({
  1388. output = 'nssm:rope 12',
  1389. recipe = {
  1390. {'nssm:web_string'},
  1391. {'nssm:web_string'},
  1392. {'nssm:web_string'},
  1393. }
  1394. })
  1395. minetest.register_craft({
  1396. output = 'nssm:sky_feather',
  1397. type = "shapeless",
  1398. recipe = {'nssm:sun_feather','nssm:night_feather'}
  1399. })
  1400. minetest.register_craft({
  1401. output = 'nssm:sun_sword',
  1402. recipe = {
  1403. {'default:diamond'},
  1404. {'nssm:sun_feather'},
  1405. {'group:stick'},
  1406. }
  1407. })
  1408. minetest.register_craft({
  1409. output = 'nssm:night_sword',
  1410. recipe = {
  1411. {'default:diamond'},
  1412. {'nssm:night_feather'},
  1413. {'group:stick'},
  1414. }
  1415. })
  1416. function nssm_register_recip (ingredient, dish, tictac)
  1417. minetest.register_craft({
  1418. type = "cooking",
  1419. output = "nssm:"..dish,
  1420. recipe = "nssm:"..ingredient,
  1421. cooktime = tictac,
  1422. })
  1423. end
  1424. nssm_register_recip ('worm_flesh', 'roasted_worm_flesh', 12)
  1425. nssm_register_recip ('duck_legs', 'roasted_duck_legs', 6)
  1426. nssm_register_recip ('spider_leg', 'roasted_spider_leg', 6)
  1427. nssm_register_recip ('felucco_steak', 'roasted_felucco_steak', 10)
  1428. nssm_register_recip ('werewolf_leg', 'roasted_werewolf_leg', 10)
  1429. nssm_register_recip ('brain', 'roasted_brain', 6)
  1430. nssm_register_recip ('amphibian_heart', 'roasted_amphibian_heart', 6)
  1431. nssm_register_recip ('tentacle', 'roasted_tentacle', 6)
  1432. nssm_register_recip ('frosted_amphibian_heart', 'amphibian_heart', 8)
  1433. nssm_register_recip ('heron_leg', 'chichibios_heron_leg', 20)
  1434. nssm_register_recip ('raw_scrausics_wing', 'spicy_scrausics_wing', 12)
  1435. nssm_register_recip ('ant_leg', 'roasted_ant_leg', 6)
  1436. nssm_register_recip ('crocodile_tail', 'roasted_crocodile_tail', 16)
  1437. nssm_register_recip ('dolidrosaurus_fin', 'roasted_dolidrosaurus_fin', 8)
  1438. nssm_register_recip ('amphibian_ribs', 'roasted_amphibian_ribs', 12)
  1439. nssm_register_recip ('mantis_meat', 'roasted_mantis_meat', 6)
  1440. nssm_register_recip ('spider_meat', 'roasted_spider_meat', 6)
  1441. nssm_register_recip ('silk_gland', 'roasted_silk_gland', 4)
  1442. nssm_register_recip ('larva_juice', 'larva_soup', 20)
  1443. minetest.register_craft({
  1444. output = 'nssm:larva_juice',
  1445. type = "shapeless",
  1446. recipe = {'nssm:larva_meat','bucket:bucket_empty'}
  1447. })
  1448. minetest.register_craft({
  1449. output = 'nssm:ant_sword',
  1450. recipe = {
  1451. {'nssm:ant_mandible'},
  1452. {'nssm:ant_mandible'},
  1453. {'group:stick'},
  1454. }
  1455. })
  1456. minetest.register_craft({
  1457. output = 'nssm:ant_billhook',
  1458. recipe = {
  1459. {'nssm:ant_mandible', 'nssm:ant_mandible'},
  1460. {'nssm:ant_mandible', 'group:stick'},
  1461. {'', 'group:stick'},
  1462. }
  1463. })
  1464. minetest.register_craft({
  1465. output = 'nssm:ant_shovel',
  1466. recipe = {
  1467. {'nssm:ant_mandible'},
  1468. {'group:stick'},
  1469. {'group:stick'},
  1470. }
  1471. })
  1472. minetest.register_craft({
  1473. output = 'nssm:duck_beak_shovel',
  1474. recipe = {
  1475. {'nssm:duck_beak'},
  1476. {'group:stick'},
  1477. {'group:stick'},
  1478. }
  1479. })
  1480. minetest.register_craft({
  1481. output = 'nssm:duck_beak_pick',
  1482. recipe = {
  1483. {'nssm:duck_beak', 'nssm:duck_beak', 'nssm:duck_beak'},
  1484. {'', 'group:stick', ''},
  1485. {'', 'group:stick', ''},
  1486. }
  1487. })
  1488. minetest.register_craft({
  1489. output = 'nssm:sky_iron 30',
  1490. recipe = {
  1491. {'default:steelblock', 'default:steelblock', 'default:steelblock'},
  1492. {'default:steelblock', 'nssm:sky_feather', 'default:steelblock'},
  1493. {'default:steelblock', 'default:steelblock', 'default:steelblock'},
  1494. }
  1495. })
  1496. minetest.register_craft({
  1497. output = 'nssm:stoneater_pick',
  1498. recipe = {
  1499. {'nssm:stoneater_mandible', 'nssm:stoneater_mandible', 'nssm:stoneater_mandible'},
  1500. {'', 'group:stick', ''},
  1501. {'', 'group:stick', ''},
  1502. }
  1503. })
  1504. minetest.register_craft({
  1505. output = 'nssm:felucco_knife',
  1506. recipe = {
  1507. {'nssm:felucco_horn'},
  1508. {'group:stick'},
  1509. }
  1510. })
  1511. minetest.register_craft({
  1512. output = 'nssm:little_ice_tooth_knife',
  1513. recipe = {
  1514. {'nssm:little_ice_tooth'},
  1515. {'group:stick'},
  1516. }
  1517. })
  1518. minetest.register_craft({
  1519. output = 'nssm:manticore_spine_knife',
  1520. recipe = {
  1521. {'nssm:manticore_spine'},
  1522. {'group:stick'},
  1523. }
  1524. })
  1525. minetest.register_craft({
  1526. output = 'nssm:ant_pick',
  1527. recipe = {
  1528. {'nssm:ant_mandible', 'nssm:ant_mandible', 'nssm:ant_mandible'},
  1529. {'', 'group:stick', ''},
  1530. {'', 'group:stick', ''},
  1531. }
  1532. })
  1533. minetest.register_craft({
  1534. output = 'nssm:mantis_pick',
  1535. recipe = {
  1536. {'nssm:mantis_claw', 'nssm:mantis_claw', 'nssm:mantis_claw'},
  1537. {'', 'group:stick', ''},
  1538. {'', 'group:stick', ''},
  1539. }
  1540. })
  1541. minetest.register_craft({
  1542. output = 'nssm:mantis_axe',
  1543. recipe = {
  1544. {'nssm:mantis_claw', 'nssm:mantis_claw'},
  1545. {'nssm:mantis_claw', 'group:stick'},
  1546. {'', 'group:stick'},
  1547. }
  1548. })
  1549. minetest.register_craft({
  1550. output = 'nssm:tarantula_warhammer',
  1551. recipe = {
  1552. {'nssm:tarantula_chelicerae'},
  1553. {'group:stick'},
  1554. {'group:stick'},
  1555. }
  1556. })
  1557. minetest.register_craft({
  1558. output = 'nssm:mantis_battleaxe',
  1559. recipe = {
  1560. {'nssm:mantis_claw', 'nssm:mantis_claw', 'nssm:mantis_claw'},
  1561. {'nssm:mantis_claw', 'group:stick', 'nssm:mantis_claw'},
  1562. {'', 'group:stick', ''},
  1563. }
  1564. })
  1565. if minetest.get_modpath("nssb") then
  1566. minetest.register_craft({
  1567. output = 'nssm:axe_of_pride',
  1568. recipe = {
  1569. {'nssm:proud_moranga', 'nssm:proud_moranga', 'nssm:proud_moranga'},
  1570. {'nssm:proud_moranga', 'nssb:moranga_ingot', ''},
  1571. {'', 'nssb:moranga_ingot', ''},
  1572. }
  1573. })
  1574. minetest.register_craft({
  1575. output = 'nssm:gratuitousness_battleaxe',
  1576. recipe = {
  1577. {'nssm:greedy_moranga', 'nssm:greedy_moranga', 'nssm:greedy_moranga'},
  1578. {'nssm:greedy_moranga', 'nssb:moranga_ingot', 'nssm:greedy_moranga'},
  1579. {'', 'nssb:moranga_ingot', ''},
  1580. }
  1581. })
  1582. minetest.register_craft({
  1583. output = 'nssm:sword_of_envy',
  1584. recipe = {
  1585. {'nssm:envious_moranga'},
  1586. {'nssm:envious_moranga'},
  1587. {'nssb:moranga_ingot'},
  1588. }
  1589. })
  1590. minetest.register_craft({
  1591. output = 'nssm:sword_of_eagerness',
  1592. recipe = {
  1593. {'nssm:slothful_moranga'},
  1594. {'nssm:slothful_moranga'},
  1595. {'nssb:moranga_ingot'},
  1596. }
  1597. })
  1598. minetest.register_craft({
  1599. output = 'nssm:falchion_of_eagerness',
  1600. recipe = {
  1601. {'nssm:slothful_moranga','nssm:slothful_moranga'},
  1602. {'nssm:slothful_moranga', ''},
  1603. {'nssb:moranga_ingot',''},
  1604. }
  1605. })
  1606. minetest.register_craft({
  1607. output = 'nssm:sword_of_gluttony',
  1608. recipe = {
  1609. {'nssm:gluttonous_moranga', 'nssm:gluttonous_moranga', 'nssm:gluttonous_moranga'},
  1610. {'', 'nssm:gluttonous_moranga', ''},
  1611. {'', 'nssb:moranga_ingot', ''},
  1612. }
  1613. })
  1614. function nssm_register_moranga (viz)
  1615. minetest.register_craft({
  1616. output = 'nssm:'.. viz ..'_moranga',
  1617. recipe = {
  1618. {'nssm:'.. viz ..'_soul_fragment', 'nssb:moranga_ingot', 'nssm:'.. viz ..'_soul_fragment'},
  1619. {'nssb:moranga_ingot', 'nssm:'.. viz ..'_soul_fragment', 'nssb:moranga_ingot'},
  1620. {'nssm:'.. viz ..'_soul_fragment', 'nssb:moranga_ingot', 'nssm:'.. viz ..'_soul_fragment'},
  1621. }
  1622. })
  1623. end
  1624. nssm_register_moranga ("lustful")
  1625. nssm_register_moranga ("greedy")
  1626. nssm_register_moranga ("slothful")
  1627. nssm_register_moranga ("wrathful")
  1628. nssm_register_moranga ("gluttonous")
  1629. nssm_register_moranga ("envious")
  1630. nssm_register_moranga ("proud")
  1631. end
  1632. --Eggs
  1633. local function nssm_register_egg (name, descr)
  1634. minetest.register_craftitem("nssm:".. name, {
  1635. description = descr .. " Egg",
  1636. image = name.."_egg.png",
  1637. on_place = function(itemstack, placer, pointed_thing)
  1638. local pos1=minetest.get_pointed_thing_position(pointed_thing, true)
  1639. pos1.y=pos1.y+1.5
  1640. core.after(0.1, function()
  1641. minetest.add_entity(pos1, "nssm:".. name)
  1642. end)
  1643. itemstack:take_item()
  1644. return itemstack
  1645. end,
  1646. })
  1647. end
  1648. local function nssm_register_egg2 (name, descr) --mobs you can't catch
  1649. minetest.register_craftitem("nssm:".. name.."_egg", {
  1650. description = descr .. " Egg",
  1651. image = name.."_egg.png",
  1652. on_place = function(itemstack, placer, pointed_thing)
  1653. local pos1=minetest.get_pointed_thing_position(pointed_thing, true)
  1654. pos1.y=pos1.y+1.5
  1655. core.after(0.1, function()
  1656. minetest.add_entity(pos1, "nssm:".. name)
  1657. end)
  1658. itemstack:take_item()
  1659. return itemstack
  1660. end,
  1661. })
  1662. end
  1663. nssm_register_egg ('flying_duck', 'Flying Duck')
  1664. nssm_register_egg ('stone_eater', 'Stoneater')
  1665. nssm_register_egg ('signosigno', 'Signosigno')
  1666. nssm_register_egg ('bloco', 'Bloco')
  1667. nssm_register_egg ('sand_bloco', 'Sand Bloco')
  1668. nssm_register_egg ('swimming_duck', 'Swimming Duck')
  1669. nssm_register_egg ('duck', 'Duck')
  1670. nssm_register_egg2 ('duckking', 'Duckking')
  1671. nssm_register_egg ('enderduck', 'Enderduck')
  1672. nssm_register_egg ('spiderduck', 'Spiderduck')
  1673. nssm_register_egg2 ('echidna', 'Echidna')
  1674. nssm_register_egg ('werewolf', 'Werewolf')
  1675. nssm_register_egg ('white_werewolf', 'White Werewolf')
  1676. nssm_register_egg ('snow_biter', 'Snow Biter')
  1677. nssm_register_egg2 ('icelamander', 'Icelamander')
  1678. nssm_register_egg ('icesnake', 'Icesnake')
  1679. nssm_register_egg2 ('lava_titan', 'Lava Titan')
  1680. nssm_register_egg ('masticone', 'Masticone')
  1681. nssm_register_egg ('mantis_beast', 'Mantis Beast')
  1682. nssm_register_egg ('mantis', 'Mantis')
  1683. nssm_register_egg ('larva', 'Larva')
  1684. nssm_register_egg2 ('phoenix', 'Phoenix')
  1685. nssm_register_egg2 ('night_master', 'Night Master')
  1686. nssm_register_egg ('scrausics', 'Scrausics')
  1687. nssm_register_egg ('moonheron', 'Moonheron')
  1688. nssm_register_egg ('sandworm', 'Sandworm')
  1689. nssm_register_egg2 ('giant_sandworm', 'Giant Sandworm')
  1690. nssm_register_egg2 ('ant_queen', 'Ant Queen')
  1691. nssm_register_egg ('ant_soldier', 'Ant Soldier')
  1692. nssm_register_egg ('ant_worker', 'Ant Worker')
  1693. nssm_register_egg ('crocodile', 'Crocodile')
  1694. nssm_register_egg ('dolidrosaurus', 'Dolidrosaurus')
  1695. nssm_register_egg ('crab', 'Crab')
  1696. nssm_register_egg ('octopus', 'Octopus')
  1697. nssm_register_egg ('xgaloctopus', 'Xgaloctopus')
  1698. nssm_register_egg ('black_widow', 'Black Widow')
  1699. nssm_register_egg ('uloboros', 'Uloboros')
  1700. nssm_register_egg2 ('tarantula', 'Tarantula')
  1701. nssm_register_egg ('daddy_long_legs', 'Daddy Long Legs')
  1702. nssm_register_egg2 ('kraken', 'Kraken')
  1703. nssm_register_egg2 ('pumpking', 'Pumpking')
  1704. nssm_register_egg ('manticore', 'Manticore')
  1705. nssm_register_egg ('felucco', 'Felucco')
  1706. nssm_register_egg ('pumpboom_large', 'Large Pumpboom')
  1707. nssm_register_egg ('pumpboom_small', 'Small Pumpboom')
  1708. nssm_register_egg ('pumpboom_medium', 'Medium Pumpboom')
  1709. nssm_register_egg2 ('mordain', 'Mordain')
  1710. nssm_register_egg2 ('morgre', 'Morgre')
  1711. nssm_register_egg2 ('morvy', 'Morvy')
  1712. nssm_register_egg2 ('morgut', 'Morgut')
  1713. nssm_register_egg2 ('morde', 'Morde')
  1714. nssm_register_egg2 ('morlu', 'Morlu')
  1715. nssm_register_egg2 ('morwa', 'Morwa')
  1716. --nssm_register_egg ('morvalar', 'Morvalar')
  1717. minetest.register_craftitem("nssm:mese_egg", {
  1718. description = "Mese Egg",
  1719. image = "mese_egg.png",
  1720. on_place = function(itemstack, placer, pointed_thing)
  1721. local pos1=minetest.get_pointed_thing_position(pointed_thing, true)
  1722. pos1.y=pos1.y+1.5
  1723. minetest.add_particlespawner({
  1724. amount = 1000,
  1725. time = 0.2,
  1726. minpos = {x=pos1.x-1, y=pos1.y-1, z=pos1.z-1},
  1727. maxpos = {x=pos1.x+1, y=pos1.y+4, z=pos1.z+1},
  1728. minvel = {x=0, y=0, z=0},
  1729. maxvel = {x=1, y=5, z=1},
  1730. minacc = {x=-0.5,y=5,z=-0.5},
  1731. maxacc = {x=0.5,y=5,z=0.5},
  1732. minexptime = 1,
  1733. maxexptime = 3,
  1734. minsize = 2,
  1735. maxsize = 4,
  1736. collisiondetection = false,
  1737. vertical = false,
  1738. texture = "tnt_smoke.png",
  1739. })
  1740. core.after(0.4, function()
  1741. minetest.add_entity(pos1, "nssm:mese_dragon")
  1742. end)
  1743. itemstack:take_item()
  1744. return itemstack
  1745. end,
  1746. })
  1747. --experimental morwa statue
  1748. minetest.register_node("nssm:morwa_statue", {
  1749. description = 'Morwa Statue',
  1750. drawtype = 'mesh',
  1751. mesh = 'morwa_statue.b3d',
  1752. tiles = {'morwa_statue.png'},
  1753. inventory_image = 'morwa_statue.png',
  1754. groups = {not_in_creative_inventory=1},
  1755. paramtype = 'light',
  1756. paramtype2 = 'facedir',
  1757. selection_box = {
  1758. type = 'fixed',
  1759. fixed = {-1, -0.5, -1, 1, 3, 1}, -- Right, Bottom, Back, Left, Top, Front
  1760. },
  1761. collision_box = {
  1762. type = 'fixed',
  1763. fixed = {-1, -0.5, -1, 1, 3, 1}, -- Right, Bottom, Back, Left, Top, Front
  1764. },
  1765. })
  1766. --Abm to make the conversion between statue and the entity, caused by light
  1767. minetest.register_abm({
  1768. nodenames = {"nssm:morwa_statue"},
  1769. neighbors = {"air"},
  1770. interval = 2,
  1771. chance = 1,
  1772. action = function(pos, node)
  1773. local pos1 = {x=pos.x, y=pos.y+1, z=pos.z}
  1774. local n = minetest.get_node(pos1).name
  1775. if n ~= "air" then
  1776. return
  1777. end
  1778. if (minetest.get_node_light(pos1) > 8)
  1779. then
  1780. minetest.add_entity(pos1, "nssm:morwa")
  1781. minetest.remove_node(pos)
  1782. end
  1783. end
  1784. })
  1785. --Eggs recipes
  1786. minetest.register_craft({
  1787. output = 'nssm:duck',
  1788. recipe = {
  1789. {'', 'nssm:duck_beak', ''},
  1790. {'nssm:duck_feather', 'nssm:energy_globe', 'nssm:duck_feather'},
  1791. {'nssm:duck_legs', 'nssm:duck_feather', 'nssm:duck_legs'},
  1792. }
  1793. })
  1794. minetest.register_craft({
  1795. output = 'nssm:flying_duck',
  1796. recipe = {
  1797. {'nssm:duck_feather', 'nssm:duck_beak', 'nssm:duck_feather'},
  1798. {'nssm:duck_feather', 'nssm:energy_globe', 'nssm:duck_feather'},
  1799. {'nssm:duck_legs', 'nssm:duck_feather', 'nssm:duck_legs'},
  1800. }
  1801. })
  1802. minetest.register_craft({
  1803. output = 'nssm:enderduck',
  1804. recipe = {
  1805. {'nssm:black_duck_feather', 'nssm:duck_beak', 'nssm:black_duck_feather'},
  1806. {'nssm:duck_legs', 'nssm:energy_globe', 'nssm:duck_legs'},
  1807. {'nssm:duck_legs', '', 'nssm:duck_legs'},
  1808. }
  1809. })
  1810. minetest.register_craft({
  1811. output = 'nssm:swimming_duck',
  1812. recipe = {
  1813. {'nssm:duck_feather', 'nssm:duck_beak', 'nssm:duck_feather'},
  1814. {'nssm:duck_legs', 'nssm:energy_globe', 'nssm:duck_legs'},
  1815. {'nssm:duck_feather', 'nssm:duck_feather', 'nssm:duck_feather'},
  1816. }
  1817. })
  1818. minetest.register_craft({
  1819. output = 'nssm:spiderduck',
  1820. recipe = {
  1821. {'nssm:duck_legs', 'nssm:duck_beak', 'nssm:duck_legs'},
  1822. {'nssm:black_duck_feather', 'nssm:energy_globe', 'nssm:black_duck_feather'},
  1823. {'nssm:duck_legs', 'nssm:black_duck_feather', 'nssm:duck_legs'},
  1824. }
  1825. })
  1826. minetest.register_craft({
  1827. output = 'nssm:duckking_egg',
  1828. recipe = {
  1829. {'', 'nssm:helmet_crown', ''},
  1830. {'nssm:duck_feather', 'nssm:duck_beak', 'nssm:duck_feather'},
  1831. {'nssm:duck_legs', 'nssm:superior_energy_globe', 'nssm:duck_legs'},
  1832. }
  1833. })
  1834. minetest.register_craft({
  1835. output = 'nssm:bloco',
  1836. recipe = {
  1837. {'nssm:bloco_skin', 'nssm:bloco_skin', 'nssm:bloco_skin'},
  1838. {'nssm:bloco_skin', 'nssm:energy_globe', 'nssm:bloco_skin'},
  1839. {'nssm:bloco_skin', 'nssm:bloco_skin', 'nssm:bloco_skin'},
  1840. }
  1841. })