mirror of
https://git.minetest.land/Mineclonia/Mineclonia.git
synced 2024-11-24 09:35:10 +00:00
Correct poison effect duration
This commit is contained in:
parent
a88c5b65de
commit
596d4ddc47
2 changed files with 10 additions and 10 deletions
|
@ -554,14 +554,14 @@ minetest.register_craftitem("mcl_potions:poison", {
|
|||
stack_max = 1,
|
||||
|
||||
on_place = function(itemstack, user, pointed_thing)
|
||||
mcl_potions.poison_func(user, 2.5, mcl_potions.DURATION*mcl_potions.INV_FACTOR*mcl_potions.INV_FACTOR)
|
||||
mcl_potions.poison_func(user, 2.5, mcl_potions.DURATION*mcl_potions.INV_FACTOR^2)
|
||||
minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
|
||||
mcl_potions._use_potion(itemstack, user, "#225533")
|
||||
return itemstack
|
||||
end,
|
||||
|
||||
on_secondary_use = function(itemstack, user, pointed_thing)
|
||||
mcl_potions.poison_func(user, 2.5, mcl_potions.DURATION*mcl_potions.INV_FACTOR*mcl_potions.INV_FACTOR)
|
||||
mcl_potions.poison_func(user, 2.5, mcl_potions.DURATION*mcl_potions.INV_FACTOR^2)
|
||||
minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
|
||||
mcl_potions._use_potion(itemstack, user, "#225533")
|
||||
return itemstack
|
||||
|
@ -578,14 +578,14 @@ minetest.register_craftitem("mcl_potions:poison_2", {
|
|||
stack_max = 1,
|
||||
|
||||
on_place = function(itemstack, user, pointed_thing)
|
||||
mcl_potions.poison_func(user, 1.2, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR*mcl_potions.INV_FACTOR)
|
||||
mcl_potions.poison_func(user, 1.2, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR^2)
|
||||
minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
|
||||
mcl_potions._use_potion(itemstack, user, "#447755")
|
||||
return itemstack
|
||||
end,
|
||||
|
||||
on_secondary_use = function(itemstack, user, pointed_thing)
|
||||
mcl_potions.poison_func(user, 1.2, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR*mcl_potions.INV_FACTOR)
|
||||
mcl_potions.poison_func(user, 1.2, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR^2)
|
||||
minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
|
||||
mcl_potions._use_potion(itemstack, user, "#447755")
|
||||
return itemstack
|
||||
|
|
|
@ -179,18 +179,18 @@ register_splash("slowness_plus", "Splash Slowness +", "#000066", {
|
|||
})
|
||||
|
||||
register_splash("poison", "Splash Poison", "#335544", {
|
||||
potion_fun = function(player, redx) mcl_potions.poison_func(player, 2.5, splash_DUR*mcl_potions.INV_FACTOR*redx) end,
|
||||
tt = "-1/2 heart / 2.5sec | "..time_string(splash_DUR*mcl_potions.INV_FACTOR)
|
||||
potion_fun = function(player, redx) mcl_potions.poison_func(player, 2.5, splash_DUR*mcl_potions.INV_FACTOR^2*redx) end,
|
||||
tt = "-1/2 heart / 2.5sec | "..time_string(splash_DUR*mcl_potions.INV_FACTOR^2)
|
||||
})
|
||||
|
||||
register_splash("poison_2", "Splash Poison II", "#446655", {
|
||||
potion_fun = function(player, redx) mcl_potions.poison_func(player, 1.2, splash_DUR_2*mcl_potions.INV_FACTOR*redx) end,
|
||||
tt = "-1/2 heart / 1.2sec | "..time_string(splash_DUR_2*mcl_potions.INV_FACTOR)
|
||||
potion_fun = function(player, redx) mcl_potions.poison_func(player, 1.2, splash_DUR_2*mcl_potions.INV_FACTOR^2*redx) end,
|
||||
tt = "-1/2 heart / 1.2sec | "..time_string(splash_DUR_2*mcl_potions.INV_FACTOR^2)
|
||||
})
|
||||
|
||||
register_splash("poison_plus", "Splash Poison +", "#557766", {
|
||||
potion_fun = function(player, redx) mcl_potions.poison_func(player, 2.5, splash_DUR_pl*mcl_potions.INV_FACTOR*redx) end,
|
||||
tt = "-1/2 heart / 2.5sec | "..time_string(splash_DUR_pl*mcl_potions.INV_FACTOR)
|
||||
potion_fun = function(player, redx) mcl_potions.poison_func(player, 2.5, splash_DUR*mcl_potions.INV_FACTOR*redx) end,
|
||||
tt = "-1/2 heart / 2.5sec | "..time_string(splash_DUR_pl*mcl_potions.INV_FACTOR^2)
|
||||
})
|
||||
|
||||
register_splash("regeneration", "Splash Regeneration", "#A52BB2", {
|
||||
|
|
Loading…
Reference in a new issue