First commit

This commit is contained in:
2025-02-26 13:42:34 +01:00
commit f465c9072c
2467 changed files with 426214 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
function doDestroyItem(target)
if not target:isItem() then
return false
end
local itemType = ItemType(target:getId())
if not itemType:isDestroyable() then
return false
end
if math.random(1,10) <= 3 then
target:transform(itemType:getDestroyTarget())
target:decay()
target:getPosition():sendMagicEffect(CONST_ME_BLOCKHIT)
else
target:getPosition():sendMagicEffect(CONST_ME_POFF)
end
return true
end