init.lua 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. -- Obsidian Sword
  2. minetest.register_tool("ebitems:sword_obsidian", {
  3. wield_scale = {x=1.5,y=1.5,z=2.5},
  4. description = "Obsidian Sword",
  5. inventory_image = "obsidian_sword.png",
  6. tool_capabilities = {
  7. full_punch_interval = 0.7,
  8. max_drop_level=1,
  9. groupcaps={
  10. snappy={times={[1]=1.90, [2]=0.90, [3]=0.30}, uses=80, maxlevel=3},
  11. },
  12. damage_groups = {fleshy=12},
  13. },
  14. sound = {breaks = "default_tool_breaks"},
  15. groups = {sword = 1}
  16. })
  17. -- Luva
  18. if minetest.global_exists("armor") and armor.elements then
  19. table.insert(armor.elements, "hand")
  20. end
  21. if minetest.get_modpath("3d_armor") then
  22. armor:register_armor("ebitems:glove_glove", {
  23. description = "Glove",
  24. inventory_image = "ebitems_inv_glove_glove.png",
  25. groups = {armor_hand=2, armor_heal=2, armor_use=40,physics_speed=0.5,physics_jump=0.5},
  26. })
  27. end
  28. -- TROFÉIS :
  29. minetest.register_node("ebitems:frostyqueen_trophy", {
  30. description = "Frosty Queen Trophy",
  31. drawtype = "mesh",
  32. mesh = "frostyqueen_trofeu.obj",
  33. tiles = {"frostyqueen_trofeu.png"} ,
  34. wield_scale = {x=1, y=1, z=1},
  35. groups = {dig_immediate=3},
  36. -- CAIXA DE COLISÃO :
  37. paramtype2 = "facedir",
  38. selection_box = {
  39. type = "fixed", -- fica no formato da caixa se ajustado
  40. fixed = {
  41. {-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
  42. },
  43. },
  44. })
  45. minetest.register_node("ebitems:crazymushrrom_trophy", {
  46. description = "Crazy Mushrrom Trophy",
  47. drawtype = "mesh",
  48. mesh = "crazymushrrom_trofeu.obj",
  49. tiles = {"crazymushrrom_trofeu.png"} ,
  50. wield_scale = {x=1, y=1, z=1},
  51. groups = {dig_immediate=3},
  52. -- CAIXA DE COLISÃO :
  53. paramtype2 = "facedir",
  54. selection_box = {
  55. type = "fixed", -- fica no formato da caixa se ajustado
  56. fixed = {
  57. {-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
  58. },
  59. },
  60. })
  61. minetest.register_node("ebitems:heated_trophy", {
  62. description = "Heated Trophy",
  63. drawtype = "mesh",
  64. mesh = "heated_trofeu.obj",
  65. tiles = {"heated_trofeu.png"} ,
  66. wield_scale = {x=1, y=1, z=1},
  67. groups = {dig_immediate=3},
  68. -- CAIXA DE COLISÃO :
  69. paramtype2 = "facedir",
  70. selection_box = {
  71. type = "fixed", -- fica no formato da caixa se ajustado
  72. fixed = {
  73. {-0.5, -0.5, -0.25, 0.5, 0.5, 0.5},
  74. },
  75. },
  76. })
  77. -- == Cura ==
  78. ---- ITENS ------------------------------------------------------------------------------
  79. -- Sound : https://freesound.org/people/craigglenday/sounds/517173/
  80. minetest.register_craftitem("ebitems:miraclehealing", {
  81. description = "Miracle Healing ",
  82. inventory_image = "miraclehealing.png",
  83. groups = {vessel = 1},
  84. on_use = function(itemstack, user, pointed_thing,pos) -- função para recuperar vida simples
  85. local hp = user:get_hp() -- usuario consegue o valor atual de sua vida
  86. if hp ~= 20 then -- comparando vida
  87. user:set_hp(hp + 10) -- atribuindo mais 10 de vida
  88. --itemstack:take_item( )
  89. end
  90. minetest.sound_play("bebendo", {
  91. pos = pos,
  92. gain = 1.0,
  93. max_hear_distance = 5,
  94. })
  95. local pos = user:getpos()
  96. for i=1,30 do
  97. minetest.add_particle({
  98. pos = pos,
  99. acceleration = 0,
  100. velocity = {x =math.random(-3,3),y=math.random(-3,3),z=math.random(-3,3)},
  101. -- x ou y ,ou z = random (-3 right , 3 left )
  102. size = 2,
  103. expirationtime = 2.0,
  104. collisiondetection = false,
  105. vertical = false,
  106. texture = "curam.png",
  107. glow = 8,
  108. })
  109. end
  110. return "vessels:glass_bottle"
  111. end
  112. })
  113. minetest.register_craft({
  114. output = "ebitems:miraclehealing 3",
  115. recipe = {
  116. {"", "default:diamond", ""},
  117. {"ethereal:illumishroom", "default:apple", "ethereal:illumishroom"},
  118. {"", "vessels:glass_bottle", ""}
  119. }
  120. })