Fix range jewels not working

This commit is contained in:
Wuzzy 2019-09-21 23:39:31 +02:00
parent b0d8c517ab
commit fcc69fb517
2 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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,