Add slowness IV

This commit is contained in:
Brandon 2020-06-27 07:57:51 -04:00
parent d1c2ce1bb6
commit e50aa40bea
3 changed files with 29 additions and 2 deletions

View File

@ -324,7 +324,7 @@ local output_table = {
local enhancement_table = {} local enhancement_table = {}
local extension_table = {} local extension_table = {}
local potions = {"awkward", "mundane", "thick"} local potions = {"awkward", "mundane", "thick"}
for i, potion in ipairs({"healing","harming","swiftness","leaping","poison","regeneration","invisibility","weakness","water_breathing","night_vision"}) do for i, potion in ipairs({"healing","harming","swiftness","slowness","leaping","poison","regeneration","invisibility","weakness","water_breathing","night_vision"}) do
table.insert(potions, potion) table.insert(potions, potion)

View File

@ -316,6 +316,29 @@ minetest.register_craftitem("mcl_potions:slowness_plus", {
end, end,
}) })
minetest.register_craftitem("mcl_potions:slowness_2", {
description = S("Slowness Potion IV"),
_doc_items_longdesc = brewhelp,
wield_image = potion_image("#000090"),
inventory_image = potion_image("#000090"),
groups = { brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=0 },
stack_max = 1,
on_place = function(itemstack, user, pointed_thing)
mcl_potions.swiftness_func(user, 0.40, 20)
minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
mcl_potions._use_potion(itemstack, user, "#000090")
return itemstack
end,
on_secondary_use = function(itemstack, user, pointed_thing)
mcl_potions.swiftness_func(user, 0.40, 20)
minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
mcl_potions._use_potion(itemstack, user, "#000090")
return itemstack
end,
})
minetest.register_craftitem("mcl_potions:leaping", { minetest.register_craftitem("mcl_potions:leaping", {
description = S("Leaping Potion"), description = S("Leaping Potion"),

View File

@ -141,6 +141,10 @@ register_splash("slowness", "Splash Slowness ", "#000080", {
potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 0.85, 68*redx) end potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 0.85, 68*redx) end
}) })
register_splash("slowness_2", "Splash Slowness IV", "#000080", {
potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 0.4, 20*redx) end
})
register_splash("slowness_plus", "Splash Slowness +", "#000066", { register_splash("slowness_plus", "Splash Slowness +", "#000066", {
potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 0.85, 180*redx) end potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 0.85, 180*redx) end
}) })