Module:Character age

local p = {}

function p.characterAge(frame) local age = frame.args.age local work_input = frame.args.work:lower local year_input = frame.args.year:lower if string.find(work_input, ' pd') then work, punc, year = frame.args.work, , 

--- Campaign 1 elseif work_input == 'c1' and string.find(year_input, ' pd') or work_input == 'campaign 1' and string.find(year_input, ' pd') or work_input == 'campaign one' and string.find(year_input, ' pd') then work, punc, year = 'Campaign 1', '; ',  .. frame.args.year .. 

elseif work_input == 'c1' or work_input == 'campaign 1' or work_input == 'campaign one' then work, punc, year = 'Campaign 1', '; ', '810–812 PD' elseif work_input == 'c1 start' or string.find(work_input, 'one start') or string.find(work_input, 'start of .+1') or string.find(work_input, 'start of .+one') then work, punc, year = 'start of Campaign 1', '; ', '810 PD' elseif work_input == 'c1 end' or string.find(work_input, 'one end') or string.find(work_input, 'end of .+1') then work, punc, year = 'end of Campaign 1', '; ', '812 PD' --- Campaign 2 elseif work_input == 'c2' and string.find(year_input, ' pd') or work_input == 'campaign 2' and string.find(year_input, ' pd') or work_input == 'campaign two' and string.find(year_input, ' pd') then work, punc, year = 'Campaign 2', '; ',  .. frame.args.year .. 

elseif work_input == 'c2' or work_input == 'campaign 2' or work_input == 'campaign two' then work, punc, year = 'Campaign 2', '; ', '835–836 PD' elseif work_input == 'c2 start' or string.find(work_input, 'two start') or string.find(work_input, 'start of .+2') or string.find(work_input, 'start of .+two') then work, punc, year = 'start of Campaign 2', '; ', '835 PD' elseif work_input == 'c2 end' or string.find(work_input, 'two end') or string.find(work_input, 'end of .+2') then work, punc, year = 'end of Campaign 2', '; ', '836 PD' --- Campaign 3 elseif work_input == 'c3' and string.find(year_input, ' pd') or work_input == 'campaign 3' and string.find(year_input, ' pd') or work_input == 'campaign three' and string.find(year_input, ' pd') then work, punc, year = 'Campaign 3', '; ',  .. frame.args.year ..  elseif work_input == 'c3' or work_input == 'campaign 3' or work_input == 'campaign three' then work, punc, year = 'Campaign 3', '; ', '843 PD'

--- EXU elseif work_input == 'exu' or work_input == 'exandria unlimited' then work, punc, year = '\'\'Exandria Unlimited\'\'', '; ', '842–843 PD' elseif string.find(work_input, 'kymal') then work, punc, year = '\'\'Exandria Unlimited: Kymal\'\'', '; ', '843 PD' elseif string.find(work_input, 'calamity') then work, punc, year = '\'\'Exandria Unlimited: Calamity\'\, , '' elseif work_input == 'k&k' or work_input == 'kith & kin' then work, punc, year = '\'\'Kith & Kin\'\'', '; ', '807 PD' elseif string.find(work_input, 'eyes') or string.find(work_input, 'lucien') then work, punc, year = '\'\'The Nine Eyes of Lucien\'\'', '; ', '822–836 PD' elseif year_input == '' then work, punc, year = frame.args.work, '; ', 'Please provide a year '

else work, punc, year = frame.args.work, '; ', frame.args.year end

return age .. ' (' .. work .. punc .. year .. ')' end

return p