1
0
Fork 0

Added dolphin's grace

This commit is contained in:
the-real-herowl 2024-01-24 02:37:24 +01:00
parent 456d205161
commit bf82241e82
1 changed files with 21 additions and 0 deletions

View File

@ -299,6 +299,27 @@ mcl_potions.register_effect({
uses_factor = false,
})
mcl_potions.register_effect({
name = "dolphin_grace",
description = S("Dolphin's Grace"),
get_tt = function(factor)
return S("swimming gracefully")
end,
on_hit_timer = function(object, factor, duration)
local node = minetest.get_node_or_nil(object:get_pos())
if node and minetest.registered_nodes[node.name]
and minetest.get_item_group(node.name, "liquid") ~= 0 then
playerphysics.add_physics_factor(object, "speed", "mcl_potions:dolphin", 2)
else
playerphysics.remove_physics_factor(object, "speed", "mcl_potions:dolphin", 2)
end
end,
particle_color = "#6AABFD",
uses_factor = false,
timer_uses_factor = false,
hit_timer_step = 1,
})
mcl_potions.register_effect({
name = "leaping",
description = S("Leaping"),