Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def __wildPokemonEncounter(self, user: discord.User, pokemon: PokemonClass, active: PokemonClass, descLog: str):
- stats = pokemon.getPokeStats()
- color = getTypeColor(pokemon.type1)
- # Create the embed object
- embed = discord.Embed(
- title=f"Wild {pokemon.pokemonName.capitalize()}",
- # description=descLog,
- color=color
- )
- embed.set_author(name=f"{user.display_name}",
- icon_url=str(user.avatar_url))
- types = pokemon.type1
- # Pokemon are not guaranteed to have a second type.
- # Check that the second type is not set to None and is not an empty string.
- if pokemon.type2 is not None and pokemon.type2:
- types += ', ' + pokemon.type2
- activeTypes = active.type1
- # Pokemon are not guaranteed to have a second type.
- # Check that the second type is not set to None and is not an empty string.
- if active.type2 is not None and active.type2:
- activeTypes += ', ' + active.type2
- # embed.add_field(
- # name="Type", value=f"{types}", inline=False)
- # embed.add_field(
- # name="Level", value=f"{pokemon.currentLevel}", inline=True)
- # embed.add_field(
- # name="HP", value=f"{pokemon.currentHP} / {stats['hp']}", inline=True)
- activeStats = active.getPokeStats()
- embed.add_field(
- name=f"{active.pokemonName.capitalize()}",
- value=f'''
- Type : {activeTypes}
- Level : {active.currentLevel}
- HP : {active.currentHP} / {activeStats['hp']}
- ''',
- inline=True
- )
- embed.add_field(
- name=f"{pokemon.pokemonName.capitalize()}",
- value=f'''
- Type : {types}
- Level : {pokemon.currentLevel}
- HP : {pokemon.currentHP} / {stats['hp']}
- ''',
- inline=True
- )
- embed.set_thumbnail(url=pokemon.frontSpriteURL)
- embed.set_image(url = active.backSpriteURL)
- # activeStats = active.getPokeStats()
- embed.set_footer(text=descLog)
- return embed
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement