From fcc69fb517c0d2df3d29976ada895c06aaa7d871 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sat, 21 Sep 2019 23:39:31 +0200 Subject: [PATCH] Fix range jewels not working --- mods/jewels/init.lua | 5 ++++- mods/jewels/jewels.lua | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mods/jewels/init.lua b/mods/jewels/init.lua index 6e048f5..7c02dc8 100644 --- a/mods/jewels/init.lua +++ b/mods/jewels/init.lua @@ -96,7 +96,10 @@ function jewels.register_jewel(toolname, new_toolname, def) new_tooldef.inventory_image = new_tool_invimage new_tooldef.wield_image = new_tool_wieldimage - if data.stats.range and new_tooldef.range then + if data.stats.range then + if not new_tooldef.range then + new_tooldef.range = 4 + end new_tooldef.range = new_tooldef.range + data.stats.range desc = desc .. "\n"..S("Range: @1", plus_power(data.stats.range)) end diff --git a/mods/jewels/jewels.lua b/mods/jewels/jewels.lua index c5125ef..4fe2940 100644 --- a/mods/jewels/jewels.lua +++ b/mods/jewels/jewels.lua @@ -115,7 +115,7 @@ local tool_types = { spear = { steel = { reach = { - reach = 1, + range = 1, }, damage = { fleshy = 3, @@ -126,7 +126,7 @@ local tool_types = { }, carbon_steel = { reach = { - reach = 2, + range = 2, }, damage = { fleshy = 4, @@ -137,7 +137,7 @@ local tool_types = { }, bronze = { reach = { - reach = 2, + range = 2, }, damage = { fleshy = 5,