forked from VoxeLibre/VoxeLibre
Added dolphin's grace
This commit is contained in:
parent
48b7b77b9d
commit
c19ec0b617
|
@ -299,6 +299,27 @@ mcl_potions.register_effect({
|
||||||
uses_factor = false,
|
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({
|
mcl_potions.register_effect({
|
||||||
name = "leaping",
|
name = "leaping",
|
||||||
description = S("Leaping"),
|
description = S("Leaping"),
|
||||||
|
|
Loading…
Reference in New Issue