12,704
edits
(_getItemUpgradeTable: Prevent GP being shown if upgrade GP cost is zero or less (e.g. Water Chest)) |
(Alt Magic -> Alt. Magic for consistency) |
||
(One intermediate revision by the same user not shown) | |||
Line 14: | Line 14: | ||
local Shop = require('Module:Shop') | local Shop = require('Module:Shop') | ||
local Monsters = require('Module:Monsters') | local Monsters = require('Module:Monsters') | ||
local | local Skills = require('Module:Skills') | ||
local SkillEnum = mw.loadData('Module:Constants/data').skill | local SkillEnum = mw.loadData('Module:Constants/data').skill | ||
Line 245: | Line 245: | ||
local spell = Magic.getSpell(spellName, 'AltMagic') | local spell = Magic.getSpell(spellName, 'AltMagic') | ||
if spell == nil then | if spell == nil then | ||
return 'ERROR: Could not find Alt Magic spell "' .. spellName .. '"[[Category:Pages with script errors]]' | return 'ERROR: Could not find Alt. Magic spell "' .. spellName .. '"[[Category:Pages with script errors]]' | ||
else | else | ||
return p._buildAltMagicTable(spell) | return p._buildAltMagicTable(spell) | ||
Line 258: | Line 258: | ||
table.insert(resultPart, '\r\n|'..Icons._SkillReq('Magic', spell.level)) | table.insert(resultPart, '\r\n|'..Icons._SkillReq('Magic', spell.level)) | ||
-- The produces property of Alt | -- The produces property of Alt. Magic spells is as follows: | ||
-- -3 = A random gem, using the same weights as Mining | -- -3 = A random gem, using the same weights as Mining | ||
-- -2 = A bar of the type being created (Superheat) | -- -2 = A bar of the type being created (Superheat) | ||
Line 266: | Line 266: | ||
-- The amount produced is determined by the productionRatio property | -- The amount produced is determined by the productionRatio property | ||
-- The consumes property of Alt Magic spells is as follows: | -- The consumes property of Alt. Magic spells is as follows: | ||
-- 0 = Any item | -- 0 = Any item | ||
-- 1 = Junk item | -- 1 = Junk item | ||
Line 450: | Line 450: | ||
--Next: Can we take it from somebody else -without- killing them? | --Next: Can we take it from somebody else -without- killing them? | ||
local thiefItems = | local thiefItems = Skills.getThievingSourcesForItem(item.id) | ||
if type(thiefItems) == 'table' then | if type(thiefItems) == 'table' then | ||
local thiefPart = {} | local thiefPart = {} | ||
Line 782: | Line 782: | ||
--Finally, let's try just stealing it | --Finally, let's try just stealing it | ||
local thiefType = Icons.Icon({"Thieving", type='skill'}) | local thiefType = Icons.Icon({"Thieving", type='skill'}) | ||
local thiefItems = | local thiefItems = Skills.getThievingSourcesForItem(item.id) | ||
for i, thiefRow in ipairs(thiefItems) do | for i, thiefRow in ipairs(thiefItems) do | ||
local sourceTxt = '' | local sourceTxt = '' | ||
Line 987: | Line 987: | ||
local recipe = SkillData.Smithing.Recipes[item.masteryID[2] + 1] | local recipe = SkillData.Smithing.Recipes[item.masteryID[2] + 1] | ||
if recipe ~= nil and recipe.category == 0 then | if recipe ~= nil and recipe.category == 0 then | ||
table.insert(resultPart, '\r\n==='..Icons.Icon({'Alt Magic', type='skill'})..'===\r\n'..p._getItemSuperheatTable(item)) | table.insert(resultPart, '\r\n==='..Icons.Icon({'Alt. Magic', type='skill'})..'===\r\n'..p._getItemSuperheatTable(item)) | ||
end | end | ||
end | end |