Module:Inventory slot/Aliases: Difference between revisions

m Undo revision 1197922 by A20001017 (talk)
mNo edit summary
Line 336: Line 336:


-- Potions --
-- Potions --
local status = {
{'Regeneration', '&9Regeneration', '0:45', '1:30', '0:22' },
{'Swiftness', '&9Speed', '3:00', '8:00', '1:30' },
{'Fire Resistance', '&9Fire Resistance', '3:00', '8:00', '' },
{'Poison', '&4Poison', '0:45', '1:30', '0:21.6' },
{'Healing', '&9Instant Health', '', '', '' },
{'Night Vision', '&9Night Vision', '3:00', '8:00', '' },
{'Weakness', '&4Weakness', '1:30', '4:00', '' },
{'Strength', '&9Strength', '3:00', '8:00', '1:30' },
{'Slowness', '&4Slowness', '1:30', '4:00', '' },
{'Leaping', '&9Jump Boost', '3:00', '8:00', '1:30' },
{'Harming', '&4Instant Damage', '', '', '' },
{'Water Breathing', '&9Water Breathing', '3:00', '8:00', '1:30' },
{'Invisibility', '&9Invisibility', '3:00', '8:00', '1:30' },
{'Slow Falling', '&9Slow Falling', '1:30', '4:00', '' },
{'Luck', '&9Luck', '5:00', '', '' },
{'Decay', '&4Decay', '0:40', '', '' },
  --{'potionName', 'potionStatus', 'duration', 'durationExtended', 'durationEnhanced' },
}
for _, effect in ipairs( effects ) do
for _, statusProps in ipairs( status ) do
if statusProps[3] ~= '' then
local aliasName = 'Potion of ' .. statusProps[1]
aliases[aliasName] = { title = aliasName, name = aliasName, text = '/&5When Applied:/ ' .. statusProps[2] .. ' (' .. statusProps[3] .. ')'}
else
local aliasName = 'Potion of ' .. statusProps[1]
aliases[aliasName] = { title = aliasName, name = aliasName, text = '/&5When Applied:/ ' .. statusProps[2] }
end
end
end
local effects = {
local effects = {
'Regeneration',
'Regeneration',
Line 381: Line 412:
}
}
for _, effect in ipairs( effects ) do
for _, effect in ipairs( effects ) do
table.insert( potionItems['Potion'], 'Potion of ' .. effect )
table.insert( potionItems['Splash Potion'], 'Splash Potion of ' .. effect )
table.insert( potionItems['Splash Potion'], 'Splash Potion of ' .. effect )
table.insert( potionItems['Lingering Potion'], 'Lingering Potion of ' .. effect )
table.insert( potionItems['Lingering Potion'], 'Lingering Potion of ' .. effect )