mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 04:21:07 +01: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,
|
stack_max = 1,
|
||||||
|
|
||||||
on_place = function(itemstack, user, pointed_thing)
|
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)
|
minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
|
||||||
mcl_potions._use_potion(itemstack, user, "#225533")
|
mcl_potions._use_potion(itemstack, user, "#225533")
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_secondary_use = function(itemstack, user, pointed_thing)
|
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)
|
minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
|
||||||
mcl_potions._use_potion(itemstack, user, "#225533")
|
mcl_potions._use_potion(itemstack, user, "#225533")
|
||||||
return itemstack
|
return itemstack
|
||||||
|
@ -578,14 +578,14 @@ minetest.register_craftitem("mcl_potions:poison_2", {
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
|
|
||||||
on_place = function(itemstack, user, pointed_thing)
|
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)
|
minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
|
||||||
mcl_potions._use_potion(itemstack, user, "#447755")
|
mcl_potions._use_potion(itemstack, user, "#447755")
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
|
|
||||||
on_secondary_use = function(itemstack, user, pointed_thing)
|
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)
|
minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing)
|
||||||
mcl_potions._use_potion(itemstack, user, "#447755")
|
mcl_potions._use_potion(itemstack, user, "#447755")
|
||||||
return itemstack
|
return itemstack
|
||||||
|
|
|
@ -179,18 +179,18 @@ register_splash("slowness_plus", "Splash Slowness +", "#000066", {
|
||||||
})
|
})
|
||||||
|
|
||||||
register_splash("poison", "Splash Poison", "#335544", {
|
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,
|
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)
|
tt = "-1/2 heart / 2.5sec | "..time_string(splash_DUR*mcl_potions.INV_FACTOR^2)
|
||||||
})
|
})
|
||||||
|
|
||||||
register_splash("poison_2", "Splash Poison II", "#446655", {
|
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,
|
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)
|
tt = "-1/2 heart / 1.2sec | "..time_string(splash_DUR_2*mcl_potions.INV_FACTOR^2)
|
||||||
})
|
})
|
||||||
|
|
||||||
register_splash("poison_plus", "Splash Poison +", "#557766", {
|
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,
|
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)
|
tt = "-1/2 heart / 2.5sec | "..time_string(splash_DUR_pl*mcl_potions.INV_FACTOR^2)
|
||||||
})
|
})
|
||||||
|
|
||||||
register_splash("regeneration", "Splash Regeneration", "#A52BB2", {
|
register_splash("regeneration", "Splash Regeneration", "#A52BB2", {
|
||||||
|
|
Loading…
Reference in a new issue