0
0
Fork 0

Groundwork for weakness.

This commit is contained in:
Brandon 2020-06-28 18:28:23 -04:00
parent 34631dd32e
commit 34867bb481
3 changed files with 10 additions and 10 deletions

View File

@ -229,9 +229,9 @@ register_lingering("invisibility_plus", "Lingering Invisibility +", "#A0A0A0", {
}) })
register_lingering("weakness", "Lingering Weakness", "#6600AA", { register_lingering("weakness", "Lingering Weakness", "#6600AA", {
potion_fun = function(player, redx) mcl_potions.weakness_func(player, 1.2, mcl_potions.DURATION*mcl_potions.INV_FACTOR*0.25) end potion_fun = function(player, redx) mcl_potions.weakness_func(player, -4, mcl_potions.DURATION*mcl_potions.INV_FACTOR*0.25) end
}) })
register_lingering("weakness_plus", "Lingering Weakness +", "#7700BB", { register_lingering("weakness_plus", "Lingering Weakness +", "#7700BB", {
potion_fun = function(player, redx) mcl_potions.weakness_func(player, 1.4, mcl_potions.DURATION_PLUS*mcl_potions.INV_FACTOR*0.25) end potion_fun = function(player, redx) mcl_potions.weakness_func(player, -4, mcl_potions.DURATION_PLUS*mcl_potions.INV_FACTOR*0.25) end
}) })

View File

@ -427,7 +427,7 @@ minetest.register_craftitem("mcl_potions:leaping_plus", {
minetest.register_craftitem("mcl_potions:weakness", { minetest.register_craftitem("mcl_potions:weakness", {
description = S("Weakness Potion"), description = S("Weakness Potion"),
_tt_help = S("No effect | 1:30"), _tt_help = S("-2 hearts per damage | 1:30"),
_doc_items_longdesc = brewhelp, _doc_items_longdesc = brewhelp,
wield_image = potion_image("#6600AA"), wield_image = potion_image("#6600AA"),
inventory_image = potion_image("#6600AA"), inventory_image = potion_image("#6600AA"),
@ -435,14 +435,14 @@ minetest.register_craftitem("mcl_potions:weakness", {
stack_max = 1, stack_max = 1,
on_place = function(itemstack, user, pointed_thing) on_place = function(itemstack, user, pointed_thing)
mcl_potions.weakness_func(user, 1.2, mcl_potions.DURATION*mcl_potions.INV_FACTOR) mcl_potions.weakness_func(user, -4, mcl_potions.DURATION*mcl_potions.INV_FACTOR)
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, "#6600AA") mcl_potions._use_potion(itemstack, user, "#6600AA")
return itemstack return itemstack
end, end,
on_secondary_use = function(itemstack, user, pointed_thing) on_secondary_use = function(itemstack, user, pointed_thing)
mcl_potions.weakness_func(user, 1.2, mcl_potions.DURATION*mcl_potions.INV_FACTOR) mcl_potions.weakness_func(user, -4, mcl_potions.DURATION*mcl_potions.INV_FACTOR)
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, "#6600AA") mcl_potions._use_potion(itemstack, user, "#6600AA")
return itemstack return itemstack
@ -451,7 +451,7 @@ minetest.register_craftitem("mcl_potions:weakness", {
minetest.register_craftitem("mcl_potions:weakness_plus", { minetest.register_craftitem("mcl_potions:weakness_plus", {
description = S("Weakness Potion +"), description = S("Weakness Potion +"),
_tt_help = S("No effect | 4:00"), _tt_help = S("-2 hearts per damage | 4:00"),
_doc_items_longdesc = brewhelp, _doc_items_longdesc = brewhelp,
wield_image = potion_image("#7700BB"), wield_image = potion_image("#7700BB"),
inventory_image = potion_image("#7700BB"), inventory_image = potion_image("#7700BB"),
@ -459,14 +459,14 @@ minetest.register_craftitem("mcl_potions:weakness_plus", {
stack_max = 1, stack_max = 1,
on_place = function(itemstack, user, pointed_thing) on_place = function(itemstack, user, pointed_thing)
mcl_potions.weakness_func(user, 1.4, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR) mcl_potions.weakness_func(user, -4, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR)
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, "#7700BB") mcl_potions._use_potion(itemstack, user, "#7700BB")
return itemstack return itemstack
end, end,
on_secondary_use = function(itemstack, user, pointed_thing) on_secondary_use = function(itemstack, user, pointed_thing)
mcl_potions.weakness_func(user, 1.4, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR) mcl_potions.weakness_func(user, -4, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR)
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, "#7700BB") mcl_potions._use_potion(itemstack, user, "#7700BB")
return itemstack return itemstack

View File

@ -187,11 +187,11 @@ register_splash("invisibility_plus", "Splash Invisibility +", "#A0A0A0", {
}) })
register_splash("weakness", "Splash Weakness", "#6600AA", { register_splash("weakness", "Splash Weakness", "#6600AA", {
potion_fun = function(player, redx) mcl_potions.weakness_func(player, 1.2, splash_DUR*mcl_potions.INV_FACTOR*redx) end potion_fun = function(player, redx) mcl_potions.weakness_func(player, -4, splash_DUR*mcl_potions.INV_FACTOR*redx) end
}) })
register_splash("weakness_plus", "Splash Weakness +", "#7700BB", { register_splash("weakness_plus", "Splash Weakness +", "#7700BB", {
potion_fun = function(player, redx) mcl_potions.weakness_func(player, 1.4, splash_DUR_pl*mcl_potions.INV_FACTOR*redx) end potion_fun = function(player, redx) mcl_potions.weakness_func(player, -4, splash_DUR_pl*mcl_potions.INV_FACTOR*redx) end
}) })
register_splash("water_breathing", "Splash Water Breathing", "#0000AA", { register_splash("water_breathing", "Splash Water Breathing", "#0000AA", {