Reduced bubbles damage and allowing warrior to dash when not touching the ground

This commit is contained in:
Giov4 2022-12-09 00:02:53 +01:00
parent 5e20a199a5
commit 2a26fd6e4b
3 changed files with 19 additions and 18 deletions

View File

@ -34,7 +34,7 @@ local bubble_beam = {
initial_sprite_basepos = {x = 0, y = 0},
speed = 50,
range = 1.8,
damage = 1.5
damage = 1
},
pl_name = "",
hit = false,

View File

@ -10,27 +10,19 @@ minetest.register_tool("fantasy_brawl:sword_steel", {
},
groups = {sword = 1},
on_place = function(itemstack, player, pointed_thing)
if fbrawl.is_on_the_ground(player) then
local pl_name = player:get_player_name()
local death_twirl = pl_name:get_skill("fbrawl:death_twirl")
local pl_name = player:get_player_name()
local death_twirl = pl_name:get_skill("fbrawl:death_twirl")
if death_twirl then
death_twirl:start()
end
else
skills.error(player:get_player_name(), T("You must be touching the ground!"))
if death_twirl then
death_twirl:start()
end
end,
on_secondary_use = function(itemstack, player)
if fbrawl.is_on_the_ground(player) then
local pl_name = player:get_player_name()
local death_twirl = pl_name:get_skill("fbrawl:death_twirl")
local pl_name = player:get_player_name()
local death_twirl = pl_name:get_skill("fbrawl:death_twirl")
if death_twirl then
death_twirl:start()
end
else
skills.error(player:get_player_name(), T("You must be touching the ground!"))
if death_twirl then
death_twirl:start()
end
end,
on_drop = function() return end,
@ -108,7 +100,7 @@ minetest.register_craftitem("fantasy_brawl:hero_fury", {
inventory_image = "fbrawl_hero_fury_skill.png",
tool_capabilities = {
full_punch_interval = 1,
damage_groups = {fleshy=0},
damage_groups = {fleshy=-0.5},
},
on_drop = function() return end,
})

View File

@ -29,6 +29,15 @@ end
function fbrawl.get_left_dir(player)
local yaw = player:get_look_horizontal()
local pl_left_dir = vector.new(math.cos(0) * math.cos(yaw), math.sin(0), math.cos(0) * math.sin(yaw))
return vector.normalize(pl_left_dir)
end
function fbrawl.is_on_the_ground(player)
local pl_name = player:get_player_name()
local under_pl_feet = player:get_pos()