fix parchment room quest demons spawning:

https://github.com/TwistedScorpio/Nostalrius/issues/18
This commit is contained in:
ErikasKontenis
2019-12-30 16:41:03 +02:00
parent c46ab0d012
commit 0364ba62ed
2 changed files with 41 additions and 9 deletions

View File

@@ -55,6 +55,17 @@ function Game.isPlayerThere(position)
return false
end
function Game.isMonsterThere(position, monsterName)
local tile = Tile(position)
local creatures = tile:getCreatures()
for _, creature in ipairs(creatures) do
if creature:isMonster() and creature:getName():lower() == monsterName:lower() then
return creature
end
end
return nil
end
function Game.broadcastMessage(message, messageType)
if messageType == nil then
messageType = MESSAGE_STATUS_WARNING