Skip to content

Commit

Permalink
Melee weapon: change attack distance (range). Closes #1841
Browse files Browse the repository at this point in the history
  • Loading branch information
alek13 committed Dec 16, 2024
1 parent 24e118f commit f87eb27
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 21 deletions.
2 changes: 1 addition & 1 deletion mods/lord/Tools/tools/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ minetest.mod(function(mod)
warhammer = require('warhammers'),
spear = require('spears'),
dagger = require('daggers'),
special = require('special'),
special = require('racial'),
}

-- Source materials
Expand Down
10 changes: 10 additions & 0 deletions mods/lord/Tools/tools/src/battleaxes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ return {
end,
wood = {
description = SL("Wooden Battleaxe"),
range = 4.5,
max_drop_level = 1,
choppy = { times = { [1] = 3.75, [2] = 2.75, [3] = 2.05 }, uses = 5, maxlevel = 1 },
snappy = { times = { [1] = 2.75, [2] = 1.75, [3] = 0.75 }, uses = 5, maxlevel = 1 },
Expand All @@ -19,6 +20,7 @@ return {
},
stone = {
description = SL("Stone Battleaxe"),
range = 4.5,
max_drop_level = 1,
choppy = { times = { [1] = 3.35, [2] = 2.10, [3] = 1.85 }, uses = 5, maxlevel = 1 },
snappy = { times = { [1] = 2.75, [2] = 1.75, [3] = 0.75 }, uses = 5, maxlevel = 1 },
Expand All @@ -27,6 +29,7 @@ return {
},
steel = {
description = SL("Steel Battleaxe"),
range = 4.5,
max_drop_level = 1,
choppy = { times = { [1] = 3, [2] = 1.90, [3] = 1.50 }, uses = 15, maxlevel = 2 },
snappy = { times = { [1] = 2.75, [2] = 1.45, [3] = 0.60 }, uses = 25, maxlevel = 2 },
Expand All @@ -36,6 +39,7 @@ return {
},
bronze = {
description = SL("Bronze Battleaxe"),
range = 4.5,
max_drop_level = 1,
choppy = { times = { [1] = 2.80, [2] = 1.70, [3] = 1.30 }, uses = 20, maxlevel = 2 },
snappy = { times = { [1] = 2.55, [2] = 1.25, [3] = 0.50 }, uses = 30, maxlevel = 2 },
Expand All @@ -45,6 +49,7 @@ return {
},
copper = {
description = SL("Copper Battleaxe"),
range = 4.5,
max_drop_level = 1,
choppy = { times = { [1] = 3.25, [2] = 2.00, [3] = 1.75 }, uses = 5, maxlevel = 1 },
snappy = { times = { [1] = 2.75, [2] = 1.45, [3] = 0.60 }, uses = 10, maxlevel = 1 },
Expand All @@ -54,6 +59,7 @@ return {
},
tin = {
description = SL("Tin Battleaxe"),
range = 4.5,
max_drop_level = 1,
choppy = { times = { [1] = 3.25, [2] = 2.00, [3] = 1.75 }, uses = 5, maxlevel = 1 },
snappy = { times = { [1] = 2.75, [2] = 1.45, [3] = 0.60 }, uses = 10, maxlevel = 1 },
Expand All @@ -63,6 +69,7 @@ return {
},
silver = {
description = SL("Silver Battleaxe"),
range = 4.5,
max_drop_level = 1,
choppy = { times = { [1] = 2.80, [2] = 1.70, [3] = 1.30 }, uses = 15, maxlevel = 2 },
snappy = { times = { [1] = 2.60, [2] = 1.30, [3] = 0.50 }, uses = 25, maxlevel = 2 },
Expand All @@ -72,6 +79,7 @@ return {
},
gold = {
description = SL("Gold Battleaxe"),
range = 4.5,
max_drop_level = 1,
choppy = { times = { [1] = 2.80, [2] = 1.70, [3] = 1.30 }, uses = 20, maxlevel = 2 },
snappy = { times = { [1] = 2.60, [2] = 1.30, [3] = 0.50 }, uses = 30, maxlevel = 2 },
Expand All @@ -81,6 +89,7 @@ return {
},
galvorn = {
description = SL("Galvorn Battleaxe"),
range = 4.5,
max_drop_level = 1,
choppy = { times = { [1] = 2.50, [2] = 1.50, [3] = .90 }, uses = 25, maxlevel = 2 },
snappy = { times = { [1] = 2.50, [2] = 1.50, [3] = 0.85 }, uses = 35, maxlevel = 2 },
Expand All @@ -90,6 +99,7 @@ return {
},
mithril = {
description = SL("Mithril Battleaxe"),
range = 4.5,
max_drop_level = 1,
choppy = { times = { [1] = 2, [2] = 1, [3] = .50 }, uses = 35, maxlevel = 3 },
snappy = { times = { [1] = 1, [2] = 1.10, [3] = 0.50 }, uses = 40, maxlevel = 3 },
Expand Down
20 changes: 10 additions & 10 deletions mods/lord/Tools/tools/src/daggers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ return {
end,
wood = {
description = SL("Wooden Dagger"),
range = 2,
range = 2.5,
max_drop_level = 0,
snappy = { times = { [2] = 2.25, [3] = 1.75 }, uses = 2, maxlevel = 1 },
damage_groups = { fleshy = .65 },
Expand All @@ -18,15 +18,15 @@ return {
},
stone = {
description = SL("Stone Dagger"),
range = 2,
range = 2.5,
max_drop_level = 0,
snappy = { times = { [2] = 1.35, [3] = 0.85 }, uses = 5, maxlevel = 1 },
damage_groups = { fleshy = .70 },
full_punch_interval = 0.25,
},
steel = {
description = SL("Steel Dagger"),
range = 2,
range = 2.5,
max_drop_level = 0,
snappy = { times = { [2] = 1.00, [3] = 0.50 }, uses = 10, maxlevel = 1 },
damage_groups = { fleshy = 1.5 },
Expand All @@ -35,7 +35,7 @@ return {
},
bronze = {
description = SL("Bronze Dagger"),
range = 2,
range = 2.5,
max_drop_level = 0,
snappy = { times = { [2] = 1.00, [3] = 0.50 }, uses = 15, maxlevel = 1 },
damage_groups = { fleshy = 2.2 },
Expand All @@ -44,7 +44,7 @@ return {
},
copper = {
description = SL("Copper Dagger"),
range = 2,
range = 2.5,
max_drop_level = 0,
snappy = { times = { [2] = 1.25, [3] = 0.75 }, uses = 5, maxlevel = 1 },
damage_groups = { fleshy = 1.8 },
Expand All @@ -53,7 +53,7 @@ return {
},
tin = {
description = SL("Tin Dagger"),
range = 2,
range = 2.5,
max_drop_level = 0,
snappy = { times = { [2] = 1.25, [3] = 0.75 }, uses = 5, maxlevel = 1 },
damage_groups = { fleshy = 1.2 },
Expand All @@ -62,7 +62,7 @@ return {
},
silver = {
description = SL("Silver Dagger"),
range = 2,
range = 2.5,
max_drop_level = 0,
snappy = { times = { [2] = .80, [3] = 0.40 }, uses = 10, maxlevel = 1 },
damage_groups = { fleshy = 3.5625 },
Expand All @@ -71,7 +71,7 @@ return {
},
gold = {
description = SL("Gold Dagger"),
range = 2,
range = 2.5,
max_drop_level = 0,
snappy = { times = { [2] = .80, [3] = 0.40 }, uses = 15, maxlevel = 1 },
damage_groups = { fleshy = 3.84 },
Expand All @@ -80,7 +80,7 @@ return {
},
galvorn = {
description = SL("Galvorn Dagger"),
range = 2,
range = 2.5,
max_drop_level = 0,
snappy = { times = { [2] = .90, [3] = 0.45 }, uses = 20, maxlevel = 1 },
damage_groups = { fleshy = 6.0 },
Expand All @@ -89,7 +89,7 @@ return {
},
mithril = {
description = SL("Mithril Dagger"),
range = 2,
range = 2.5,
max_drop_level = 0,
snappy = { times = { [2] = .75, [3] = 0.35 }, uses = 25, maxlevel = 2 },
damage_groups = { fleshy = 2.0 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ minetest.register_tool('tools:sword_human', {
minetest.register_tool('tools:dagger_hobbit', {
description = S('Hobbit Dagger'),
inventory_image = 'tools_dagger_hobbit.png',
range = 2,
range = 3,
tool_capabilities = {
max_drop_level = 0,
groupcaps = { snappy = { times = { [2] = 2.25, [3] = 1.75 }, uses = 15, maxlevel = 1 }, },
Expand Down
19 changes: 10 additions & 9 deletions mods/lord/Tools/tools/src/warhammers.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ return {
end,
wood = {
description = SL("Wooden Warhammer"),
range = 2,
range = 3,
max_drop_level = 1,
snappy = { times = { [1] = 3.40, [2] = 2.40, [3] = 1.30 }, uses = 5, maxlevel = 1 },
damage_groups = { fleshy = 15 },
Expand All @@ -19,15 +19,15 @@ return {
},
stone = {
description = SL("Stone Warhammer"),
range = 2,
range = 3,
max_drop_level = 1,
snappy = { times = { [1] = 2.85, [2] = 1.85, [3] = 1.10 }, uses = 5, maxlevel = 1 },
damage_groups = { fleshy = 18.4 },
full_punch_interval = 2.3,
},
steel = {
description = SL("Steel Warhammer"),
range = 2,
range = 3,
max_drop_level = 1,
snappy = { times = { [1] = 2.75, [2] = 1.45, [3] = 0.60 }, uses = 25, maxlevel = 2 },
damage_groups = { fleshy = 20 },
Expand All @@ -36,7 +36,7 @@ return {
},
bronze = {
description = SL("Bronze Warhammer"),
range = 2,
range = 3,
max_drop_level = 1,
snappy = { times = { [1] = 2.75, [2] = 1.45, [3] = 0.60 }, uses = 30, maxlevel = 2 },
damage_groups = { fleshy = 26.10 },
Expand All @@ -45,7 +45,7 @@ return {
},
copper = {
description = SL("Copper Warhammer"),
range = 2,
range = 3,
max_drop_level = 1,
snappy = { times = { [1] = 3, [2] = 1.80, [3] = 1.00 }, uses = 5, maxlevel = 1 },
damage_groups = { fleshy = 21.81 },
Expand All @@ -54,7 +54,7 @@ return {
},
tin = {
description = SL("Tin Warhammer"),
range = 2,
range = 3,
max_drop_level = 1,
snappy = { times = { [1] = 3, [2] = 1.80, [3] = 1.00 }, uses = 5, maxlevel = 1 },
damage_groups = { fleshy = 20.4 },
Expand All @@ -63,7 +63,7 @@ return {
},
silver = {
description = SL("Silver Warhammer"),
range = 2,
range = 3,
max_drop_level = 1,
snappy = { times = { [1] = 2.60, [2] = 1.40, [3] = 0.50 }, uses = 20, maxlevel = 2 },
damage_groups = { fleshy = 29 },
Expand All @@ -72,6 +72,7 @@ return {
},
gold = {
description = SL("Gold Warhammer"),
range = 3,
max_drop_level = 1,
snappy = { times = { [1] = 2.60, [2] = 1.40, [3] = 0.50 }, uses = 30, maxlevel = 2 },
damage_groups = { fleshy = 33 },
Expand All @@ -80,7 +81,7 @@ return {
},
galvorn = {
description = SL("Galvorn Warhammer"),
range = 2,
range = 3,
max_drop_level = 1,
snappy = { times = { [1] = 2.50, [2] = 1.30, [3] = 0.45 }, uses = 35, maxlevel = 2 },
damage_groups = { fleshy = 36 },
Expand All @@ -89,7 +90,7 @@ return {
},
mithril = {
description = SL("Mithril Warhammer"),
range = 2,
range = 3,
max_drop_level = 1,
snappy = { times = { [1] = 2.60, [2] = 1.40, [3] = 0.50 }, uses = 40, maxlevel = 3 },
damage_groups = { fleshy = 25 },
Expand Down

0 comments on commit f87eb27

Please sign in to comment.