forked from LizzyFleckenstein03/Memeclone
Correct Lingering effect durations.
This commit is contained in:
parent
5d5c96455d
commit
d1c2ce1bb6
|
@ -1,6 +1,14 @@
|
|||
local S = minetest.get_translator("mcl_potions")
|
||||
mcl_potions = {}
|
||||
|
||||
|
||||
mcl_potions.DURATION = 180
|
||||
mcl_potions.DURATION_PLUS = mcl_potions.DURATION * (8/3)
|
||||
mcl_potions.DURATION_2 = mcl_potions.DURATION * (1/2)
|
||||
|
||||
mcl_potions.INV_FACTOR = 0.25
|
||||
|
||||
|
||||
local modpath = minetest.get_modpath("mcl_potions")
|
||||
dofile(modpath .. "/functions.lua")
|
||||
dofile(modpath .. "/splash.lua")
|
||||
|
|
|
@ -157,51 +157,55 @@ register_lingering("thick", "Lingering Thick Potion", "#0000FF", {
|
|||
})
|
||||
|
||||
register_lingering("healing", "Lingering Healing", "#AA0000", {
|
||||
potion_fun = function(player) player:set_hp(player:get_hp() + 3*0.5) end,
|
||||
potion_fun = function(player) player:set_hp(player:get_hp() + 4*0.5) end,
|
||||
})
|
||||
|
||||
register_lingering("healing_2", "Lingering Healing II", "#DD0000", {
|
||||
potion_fun = function(player, redx) player:set_hp(player:get_hp() + 6*0.5) end,
|
||||
potion_fun = function(player, redx) player:set_hp(player:get_hp() + 8*0.5) end,
|
||||
})
|
||||
|
||||
register_lingering("harming", "Lingering Harming", "#660099", {
|
||||
potion_fun = function(player, redx) mcl_potions.healing_func(player, -4*0.5) end,
|
||||
})
|
||||
|
||||
register_lingering("harming_2", "Lingering Harming II", "#330066", {
|
||||
potion_fun = function(player, redx) mcl_potions.healing_func(player, -6*0.5) end,
|
||||
})
|
||||
|
||||
register_lingering("harming_2", "Lingering Harming II", "#330066", {
|
||||
potion_fun = function(player, redx) mcl_potions.healing_func(player, -12*0.5) end,
|
||||
})
|
||||
|
||||
register_lingering("leaping", "Lingering Leaping", "#00CC33", {
|
||||
potion_fun = function(player, redx) mcl_potions.leaping_func(player, 1.2, 135*0.25) end
|
||||
potion_fun = function(player, redx) mcl_potions.leaping_func(player, 1.2, mcl_potions.DURATION*0.25) end
|
||||
})
|
||||
|
||||
register_lingering("leaping_2", "Lingering Leaping II", "#00EE33", {
|
||||
potion_fun = function(player, redx) mcl_potions.leaping_func(player, 1.4, 135*0.25) end
|
||||
potion_fun = function(player, redx) mcl_potions.leaping_func(player, 1.4, mcl_potions.DURATION_2*0.25) end
|
||||
})
|
||||
|
||||
register_lingering("leaping_plus", "Lingering Leaping +", "#00DD33", {
|
||||
potion_fun = function(player, redx) mcl_potions.leaping_func(player, 1.2, 360*0.25) end
|
||||
potion_fun = function(player, redx) mcl_potions.leaping_func(player, 1.2, mcl_potions.DURATION_PLUS*0.25) end
|
||||
})
|
||||
|
||||
register_lingering("swiftness", "Lingering Swiftness", "#009999", {
|
||||
potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 1.2, 135*0.25) end
|
||||
potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 1.2, mcl_potions.DURATION*0.25) end
|
||||
})
|
||||
|
||||
register_lingering("swiftness_2", "Lingering Swiftness II", "#00BBBB", {
|
||||
potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 1.4, 135*0.25) end
|
||||
potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 1.4, mcl_potions.DURATION*0.25) end
|
||||
})
|
||||
|
||||
register_lingering("swiftness_plus", "Lingering Swiftness +", "#00BBBB", {
|
||||
potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 1.2, 360*0.25) end
|
||||
potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 1.2, mcl_potions.DURATION_PLUS*0.25) end
|
||||
})
|
||||
|
||||
register_lingering("slowness", "Lingering Slowness ", "#000080", {
|
||||
potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 0.85, 68*0.25) end
|
||||
register_lingering("slowness", "Lingering Slowness", "#000080", {
|
||||
potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 0.85, mcl_potions.DURATION*mcl_potions.INV_FACTOR*0.25) end
|
||||
})
|
||||
|
||||
register_lingering("slowness_plus", "Lingering Slowness +", "#000066", {
|
||||
potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 0.85, 180*0.25) end
|
||||
potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 0.85, mcl_potions.DURATION_PLUS*mcl_potions.INV_FACTOR*0.25) end
|
||||
})
|
||||
|
||||
register_lingering("slowness_2", "Lingering Slowness IV", "#000066", {
|
||||
potion_fun = function(player, redx) mcl_potions.swiftness_func(player, 0.4, 20*0.25) end
|
||||
})
|
||||
|
||||
register_lingering("poison", "Lingering Poison", "#335544", {
|
||||
|
@ -221,7 +225,7 @@ register_lingering("regeneration", "Lingering Regeneration", "#A52BB2", {
|
|||
})
|
||||
|
||||
register_lingering("regeneration_2", "Lingering Regeneration II", "#B52CC2", {
|
||||
potion_fun = function(player, redx) mcl_potions.regeneration_func(player, 1.2, 21*0.25) end
|
||||
potion_fun = function(player, redx) mcl_potions.regeneration_func(player, 1.2, 22*0.25) end
|
||||
})
|
||||
|
||||
register_lingering("regeneration_plus", "Lingering Regeneration +", "#C53DD3", {
|
||||
|
@ -229,17 +233,17 @@ register_lingering("regeneration_plus", "Lingering Regeneration +", "#C53DD3", {
|
|||
})
|
||||
|
||||
register_lingering("invisibility", "Lingering Invisibility", "#B0B0B0", {
|
||||
potion_fun = function(player, redx) mcl_potions.invisiblility_func(player, 135*0.25) end
|
||||
potion_fun = function(player, redx) mcl_potions.invisiblility_func(player, mcl_potions.DURATION*0.25) end
|
||||
})
|
||||
|
||||
register_lingering("invisibility_plus", "Lingering Invisibility +", "#A0A0A0", {
|
||||
potion_fun = function(player, redx) mcl_potions.invisiblility_func(player, 300*0.25) end
|
||||
potion_fun = function(player, redx) mcl_potions.invisiblility_func(player, mcl_potions.DURATION_PLUS*0.25) end
|
||||
})
|
||||
|
||||
register_lingering("weakness", "Lingering Weakness", "#6600AA", {
|
||||
potion_fun = function(player, redx) mcl_potions.weakness_func(player, 1.2, 68*0.25) end
|
||||
potion_fun = function(player, redx) mcl_potions.weakness_func(player, 1.2, mcl_potions.DURATION*mcl_potions.INV_FACTOR*0.25) end
|
||||
})
|
||||
|
||||
register_lingering("weakness_plus", "Lingering Weakness +", "#7700BB", {
|
||||
potion_fun = function(player, redx) mcl_potions.weakness_func(player, 1.4, 180*0.25) end
|
||||
potion_fun = function(player, redx) mcl_potions.weakness_func(player, 1.4, mcl_potions.DURATION_PLUS*mcl_potions.INV_FACTOR*0.25) end
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue