def Conceptcard(iname, page): #get card dir card = DIRS['Conceptcard'][iname] #create basic embed embed = Embed( title='', #page name url=LinkDB('card', iname, '', True, 'jp') #page link ) embed.set_author(name=card['name'], url=embed.url) #, url=LinkDB('card',iname)) embed.set_thumbnail( url='http://cdn.alchemistcodedb.com/images/cards/icons/{}.png'.format( iname)) embed.set_image( url='http://cdn.alchemistcodedb.com/images/cards/artworks/{}.png'. format(iname)) while page: if page == 'main': embed.ConvertFields(main(card)) embed.title = 'main' break break return embed
def quest(iname, page): Quest = DIRS['quests'][iname] map = MapImage(Quest['map'][0]) #create basic embed embed = Embed( title=Quest['name'], #page name #url=LinkDB('quest',iname) #page link ) #embed.set_thumbnail(url=LinkDB('/items/icons/',gear['icon'],'.png',False)) return (embed, map)
def art(unit): art_link = 'http://cdn.alchemistcodedb.com/images/units/artworks/' embeds=[] skins=[{ 'name': 'Default', 'full': art_link+unit['image'] + '.png', 'closeup': art_link+unit['image']+'-closeup.png' }] if 'skins' in unit: for skin in unit['skins']: if 'UNIQUE' not in skin: skin=DIRS['Artifact'][skin] skins.append({ 'name': skin['name'], 'full': art_link+unit['image']+'_'+skin['asset']+'.png', 'closeup': art_link+unit['image']+'_'+skin['asset']+'-closeup.png', }) if 'conceptcard' in unit: skins.append({ 'name': 'Concept Card', 'full': 'http://cdn.alchemistcodedb.com/images/cards/artworks/{}.png'.format(unit['conceptcard']), 'closeup': 'http://cdn.alchemistcodedb.com/images/cards/icons/{}.png'.format(unit['conceptcard']) }) for art in skins: embed= Embed( title=art['name'], #page name url=art['closeup'], color=ELEMENT_COLOR[unit['element']] ) embed.set_author(name=unit['name'], url='http://www.alchemistcodedb.com/{region}unit/{unit}'.format( region=''if 'dif' not in unit else 'jp/', unit= unit['iname'].replace('UN_V2_', "").replace('_', "-").lower() )) embed.set_thumbnail(url=art['closeup']) embed.set_image(url=art['full']) embeds.append(embed) return embeds
def Gear(iname, page): #get gear dir gear = DIRS['Artifact'][iname] #create basic embed embed = Embed( title='', #page name url=LinkDB('gear', iname) #page link ) embed.set_author(name=gear['name'], url=LinkDB('gear', iname)) embed.set_thumbnail( url=LinkDB('/items/icons/', gear['icon'], '.png', False)) while page: if page == 'main': embed.ConvertFields(main(gear)) embed.title = 'main' break break return embed
def Gear(iname, page): #get gear dir gear = DIRS['Artifact'][iname] #create basic embed embed = Embed( title='', #page name url=LinkDB('gear', iname) #page link ) embed.set_author(name=gear['name'], url=LinkDB('gear', iname)) embed.set_thumbnail( url='http://cdn.alchemistcodedb.com/images/items/icons/{}.png'.format( gear['icon'])) while page: if page == 'main': embed.ConvertFields(main(gear)) embed.title = 'main' break break return embed
def Job(iname, page): #get job dir job = DIRS['Job'][iname] icon = 'http://cdn.alchemistcodedb.com/images/jobs/icons/' if 'ac2d' in job and len(job['ac2d']) > len(job['model']): icon += job['ac2d'] + '.png' else: icon += job['model'] + '.png' #create basic embed embed = Embed( title=page, #page name url=LinkDB('job', iname) #page link #'http://www.alchemistcodedb.com/unit/'+unit_in[6:].replace('_', '').lower()+'#'+job_na.replace(' ', '-').replace('+', '-plus').lower() ) embed.set_author(name=job['name'], url=LinkDB('job', iname)) embed.set_thumbnail(url=icon) embed.set_footer(text='Job') while page: if page == 'main': embed.ConvertFields(main(job)) embed.title = 'main' break if page == 'main ability': embed.ConvertFields(ability(job['abilities']['main'])) embed.title = page if page == 'sub ability': embed.ConvertFields(ability(job['abilities']['sub'])) embed.title = page if page == 'reaction ability': embed.ConvertFields(ability(job['abilities']['reaction'])) embed.title = page if page == 'passive ability': embed.ConvertFields(ability(job['abilities']['passive'])) embed.title = page break return embed
def Job(iname, page): #get job dir job = DIRS['Job'][iname] #create basic embed embed = Embed( title='', #page name url=LinkDB('job', iname) #page link #'http://www.alchemistcodedb.com/unit/'+unit_in[6:].replace('_', '').lower()+'#'+job_na.replace(' ', '-').replace('+', '-plus').lower() ) embed.set_author(name=job['name'], url=LinkDB('job', iname)) embed.set_thumbnail( url=LinkDB('/items/icons/', job['icon'], '.png', False)) while page: if page == 'main': embed.ConvertFields(main(job)) embed.title = 'main' break if page == 'main ability': embed.ConvertFields(ability(job[''])) embed.title = page if page == 'sub ability': embed.ConvertFields(ability(job[''])) embed.title = page if page == 'reactives': embed.ConvertFields(ability(job[''])) embed.title = page if page == 'passives': embed.ConvertFields(ability(job[''])) embed.title = page break return embed
def Unit(iname, page): #get job dir unit=DIRS['Unit'][iname] #create basic embed embed= Embed( title=page, #page name url='http://www.alchemistcodedb.com/{region}unit/{unit}'.format( region='jp/' if 'birthid' in unit or ('dif' in unit and 'birthid' in unit['dif']) else '', unit= unit['iname'].replace('UN_V2_', "").replace('_', "-").lower() ), color=ELEMENT_COLOR[unit['element']] ) embed.set_author(name=unit['name'], url=embed.url) embed.set_thumbnail(url='http://cdn.alchemistcodedb.com/images/units/profiles/' + unit["image"] + ".png") embed.set_footer(text='Unit') while page: if page=='main': embed.ConvertFields(main(unit)) if 'tierlist' in unit: embed.title += ", overall rank: [{tier}]".format(tier=unit['tierlist']['total']) break if page=='lore': embed.ConvertFields(lore(unit)) embed.url=embed.url+'#profile' break if page=='kaigan': embed.ConvertFields(kaigan(unit)) break if page=='nensou': embed.ConvertFields(nensou(unit)) break if 'job' in page: fields,name=job(unit,page) embed.ConvertFields(fields) embed.title=name break if page=='art': embed=art(unit) break return embed