Fire Aspect

This commit is contained in:
Lizzy Fleckenstein 2021-01-01 19:51:31 +01:00
parent 071ba77bb0
commit 92bf864807
2 changed files with 15 additions and 4 deletions

View File

@ -3789,7 +3789,6 @@ minetest.register_entity(name, {
instant_death = def.instant_death or false, instant_death = def.instant_death or false,
fire_resistant = def.fire_resistant or false, fire_resistant = def.fire_resistant or false,
fire_damage_resistant = def.fire_damage_resistant or false, fire_damage_resistant = def.fire_damage_resistant or false,
fire_entity_properties = def.fire_entity_properties or nil,
-- End of MCL2 extensions -- End of MCL2 extensions
on_spawn = def.on_spawn, on_spawn = def.on_spawn,

View File

@ -172,8 +172,8 @@ mcl_enchanting.enchantments.feather_falling = {
power_range_table = {{5, 11}, {11, 17}, {17, 23}, {23, 29}}, power_range_table = {{5, 11}, {11, 17}, {17, 23}, {23, 29}},
} }
-- requires missing MineClone2 feature -- implemented via register_on_punchplayer callback
--[[mcl_enchanting.enchantments.fire_aspect = { mcl_enchanting.enchantments.fire_aspect = {
name = S("Fire Aspect"), name = S("Fire Aspect"),
max_level = 2, max_level = 2,
primary = {sword = true}, primary = {sword = true},
@ -187,7 +187,19 @@ mcl_enchanting.enchantments.feather_falling = {
requires_tool = false, requires_tool = false,
treasure = false, treasure = false,
power_range_table = {{10, 61}, {30, 71}}, power_range_table = {{10, 61}, {30, 71}},
}]]-- }
minetest.register_on_punchplayer(function(player, hitter, time_from_last_punch, tool_capabilities, dir, damage)
if hitter and hitter:is_player() then
local wielditem = hitter:get_wielded_item()
if wielditem then
local fire_aspect_level = mcl_enchanting.get_enchantment(wielditem, "fire_aspect")
if fire_aspect_level > 0 then
mcl_burning.set_on_fire(player, 4, fire_aspect_level * 2, hitter:get_player_name())
end
end
end
end)
-- implemented in mcl_armor -- implemented in mcl_armor
mcl_enchanting.enchantments.fire_protection = { mcl_enchanting.enchantments.fire_protection = {