Bug Fixes

Fixed a small issue related to monsters attacking being too low, the issue was related to TFS function normal_random, special thanks to LooSik at otland, see thread: https://otland.net/threads/nostalrius-7-7.262406/post-2552267
This commit is contained in:
Alejandro Mujica
2019-04-13 16:10:44 -04:00
parent 840723a28b
commit a7a253f5eb
2 changed files with 8 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ function Game.removeItemsOnMap(position)
local i = 0
while i < tileCount do
local tileItem = tile:getThing(i)
if tileItem and tileItem:getType():isMovable() then
if tileItem and not tileItem:isCreature() and ItemType(tileItem:getId()):isMovable() then
tileItem:remove()
else
i = i + 1
@@ -24,8 +24,10 @@ function Game.transformItemOnMap(position, itemId, toItemId, subtype)
local tile = Tile(position)
local item = tile:getItemById(itemId)
item:transform(toItemId, subtype)
item:decay()
if item ~= nil then
item:transform(toItemId, subtype)
item:decay()
end
return item
end