Anonymous

Module:Items/SourceTables: Difference between revisions

From Melvor Idle
Tweaked some things that were resulting in Wandering Bard drops not appearing
(Tweaked getCombatPassiveSlotItems to sort by item id)
(Tweaked some things that were resulting in Wandering Bard drops not appearing)
Line 12: Line 12:
local Items = require('Module:Items')
local Items = require('Module:Items')
local Shop = require('Module:Shop')
local Shop = require('Module:Shop')
local Monsters = require('Module:Monsters')


-- Implements overrides for sources which cannot be obtained from game data
-- Implements overrides for sources which cannot be obtained from game data
Line 325: Line 326:
         end
         end
       end
       end
       if isDrop then
       if isDrop and Monsters.isDungeonOnlyMonster({args={monster.name}}) then
         -- 2021-05-24 Additional checks for dungeon exclusive monsters: Loot is not rolled on
         -- 2021-05-24 Additional checks for dungeon exclusive monsters: Loot is not rolled on
         -- dungeon exclusive monsters unless they are the boss/last enemy of that dungeon
         -- dungeon exclusive monsters unless they are the boss/last enemy of that dungeon
Line 653: Line 654:
     local lootChance = monster.lootChance ~= nil and monster.bones ~= item.id and monster.lootChance or 100
     local lootChance = monster.lootChance ~= nil and monster.bones ~= item.id and monster.lootChance or 100


     if wt > 0 and lootChance > 0 and not Shared.contains(item.name, 'Shard') then
     if wt > 0 and lootChance > 0 and not Shared.contains(item.name, 'Shard') and Monsters.isDungeonOnlyMonster({args={monster.name}}) then
       -- 2021-05-24 Additional checks for dungeon exclusive monsters: Loot is not rolled on
       -- 2021-05-24 Additional checks for dungeon exclusive monsters: Loot is not rolled on
       -- dungeon exclusive monsters unless they are the boss/last enemy of that dungeon
       -- dungeon exclusive monsters unless they are the boss/last enemy of that dungeon