Module:Print ref/switcher

local p = {};

p.ref = function (frame) local title_input = frame.args.title:lower if string.find(title_input, 'jester') then title, titletype = 'The Mighty Nein Origins: Jester Lavorre', 'gn' elseif string.find(title_input, 'caleb') then title, titletype = 'The Mighty Nein Origins: Caleb Widogast', 'gn' elseif string.find(title_input, 'yasha') then title, titletype = 'The Mighty Nein Origins: Yasha Nydoorin', 'gn' elseif string.find(title_input, 'nott') or string.find(title_input, 'veth') then title, titletype = 'The Mighty Nein Origins: Nott the Brave', 'gn' elseif string.find(title_input, 'fjord') then title, titletype = 'The Mighty Nein Origins: Fjord Stone', 'gn' elseif string.find(title_input, 'molly') then title, titletype = 'The Mighty Nein Origins: Mollymauk Tealeaf', 'gn' elseif string.find(title_input, 'home') then title, titletype = 'The Mighty Nein Origins: Home', 'gn' elseif string.find(title_input, 'tbq') or string.find(title_input, 'bright queen') then title, titletype = 'The Tales of Exandria: The Bright Queen', 'comic' elseif string.find(title_input, 'cotn') or string.find(title_input, 'netherdeep') then title, titletype = 'Call of the Netherdeep', 'book' elseif string.find(title_input, 'egtw') or string.find(title_input, 'explorer\'s') or string.find(title_input, 'wildemount') then title, titletype = 'Explorer\'s Guide to Wildemount', 'book' elseif title_input == 'tcs' or title_input == 'tal\'dorei campaign setting' or title_input == 'taldorei' or title_input == 'tal\'dorei' then title, titletype = 'Tal\'Dorei Campaign Setting', 'book' elseif string.find(title_input, 'reborn') or title_input == 'tcsr' then title, titletype = 'Tal\'Dorei Campaign Setting Reborn', 'book' elseif string.find(title_input, 'k&k') or string.find(title_input, 'kith') then title, titletype = 'Vox Machina — Kith & Kin', 'book' elseif string.find(title_input, 'eyes') or string.find(title_input, 'lucien') then title, titletype = 'The Mighty Nein — The Nine Eyes of Lucien', 'book' elseif string.find(title_input, 'winter') then title, titletype = 'Critical Role: Winter\'s Crest Festival', 'comic' elseif string.find(title_input, 'vmo') or string.find(title_input, 'vox machina origins') then if string.find(title_input, 'iii') or string.find(title_input, '3') then title, titletype = 'Vox Machina Origins Series III', 'comic' elseif string.find(title_input, 'ii') or string.find(title_input, '2') then title, titletype = 'Vox Machina Origins Series II', 'comic' elseif string.find(title_input, 'animals') then title, titletype = 'Vox Machina Origins: Animals', 'gn' else title, titletype = 'Vox Machina Origins Series I', 'comic' end elseif title_input == 'player\'s handbook' or title_input == 'phb' or title_input == 'ph' then title, titletype = 'Player\'s Handbook, 5th edition', 'dnd' elseif title_input == 'dungeon master\'s guide' or title_input == 'dmg' then title, titletype = 'Dungeon Master\'s Guide, 5th edition', 'dnd' elseif title_input == 'monster manual' or title_input == 'mm' then title, titletype = 'Monster Manual, 5th edition', 'dnd' elseif title_input == 'xanathar\'s guide to everything' or title_input == 'xanathar' or title_input == 'xgte' then title, titletype = 'Xanathar\'s Guide to Everything', 'dnd' elseif title_input == 'volo\'s guide to monsters' or title_input == 'vgtm' or title_input == 'vgm' or title_input == 'volo\'s' or title_input == 'volo' then title, titletype = 'Volo\'s Guide to Monsters', 'dnd' elseif title_input == 'wild beyond the witchlight' or title_input == 'witchlight' or title_input == 'wbtw' then title, titletype = 'Wild Beyond the Witchlight', 'dnd' elseif title_input == 'mordenkainen\'s tome of foes' or title_input == 'mot' or title_input == 'mtof' then title, titletype = 'Mordenkainen\'s Tome of Foes', 'dnd' elseif title_input == 'guildmaster\'s guide to ravnica' or title_input == 'ravnica' or title_input == 'ggtr' then title, titletype = 'Guildmaster\'s Guide to Ravnica', 'dnd' elseif title_input == 'tasha\'s cauldron of everything' or title_input == 'tasha\'s' or title_input == 'tce' or title_input == 'tcoe' then title, titletype = 'Tasha\'s Cauldron of Everything', 'dnd' elseif title_input == 'mystic odysseys of theros' or title_input == 'mot' then title, titletype = 'Mystic Odysseys of Theros', 'dnd' elseif title_input == 'out of the abyss' or title_input == 'oota' then title, titletype = 'Out of the Abyss', 'dnd' elseif title_input == 'tomb of annihilation' or title_input == 'toa' then title, titletype = 'Tomb of Annihilation', 'dnd' elseif title_input == 'sword coast adventurer\'s guide' or title_input == 'scag' then title, titletype = 'Sword Coast Adventurer\'s Guide', 'dnd' elseif title_input == 'storm king\'s thunder' or title_input == 'sky' then title, titletype = 'Storm King\'s Thunder', 'dnd' elseif title_input == 'eberron: rising from the last war' or title_input == 'erlw' then title, titletype = 'Eberron: Rising from the Last War', 'dnd' elseif title_input == 'lost library of kwalish' or title_input == 'llok' then title, titletype = 'Lost Library of Kwalish', 'dnd' elseif title_input == 'baldur\'s gate: descent into avernus' or title_input == 'bgdia' then title, titletype = 'Baldur\'s Gate: Descent into Avernus', 'dnd' elseif title_input == 'candlekeep mysteries' or title_input == 'cm' then title, titletype = 'Candlekeep Mysteries', 'dnd' elseif title_input == 'elemental evil player\'s companion' or title_input == 'eepc' then title, titletype = 'Elemental Evil Player\'s Companion', 'dnd' elseif title_input == 'ghosts of saltmarsh' or title_input == 'gos' then title, titletype = 'Ghosts of Saltmarsh', 'dnd' elseif title_input == 'icewind dale' or title_input == 'idrotf' then title, titletype = 'Icewind Dale: Rise of the Frostmaiden', 'dnd' elseif title_input == '' then title, titletype = 'Title Missing', '' else title, titletype = frame.args.title, 'custom' end return title, titletype end

return p