mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-24 20:03:45 +01:00
Re-add thorns damage type
This commit is contained in:
parent
d29c71c69a
commit
33c0aa23c5
@ -81,7 +81,7 @@ mcl_damage.register_modifier(function(obj, damage, reason)
|
|||||||
local thorns_damage = thorns_damage_regular + thorns_damage_irregular
|
local thorns_damage = thorns_damage_regular + thorns_damage_irregular
|
||||||
|
|
||||||
if thorns_damage > 0 and reason.type ~= "thorns" and reason.source ~= obj then
|
if thorns_damage > 0 and reason.type ~= "thorns" and reason.source ~= obj then
|
||||||
mcl_util.deal_damage(reason.source, thorns_damage)
|
mcl_util.deal_damage(reason.source, thorns_damage, {type = "thorns", direct = obj})
|
||||||
|
|
||||||
local thorns_item = thorns_pieces[math.random(#thorns_pieces)]
|
local thorns_item = thorns_pieces[math.random(#thorns_pieces)]
|
||||||
mcl_util.use_item_durability(thorns_item.itemstack, 2)
|
mcl_util.use_item_durability(thorns_item.itemstack, 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user