Search in sources :

Example 1 with RaidBossCounters

use of pokeraidbot.domain.raid.RaidBossCounters in project pokeraidbot by magnusmickelsson.

the class PokemonVsCommand method executeWithConfig.

@Override
protected void executeWithConfig(CommandEvent commandEvent, Config config) {
    String pokemonName = commandEvent.getArgs();
    final Pokemon pokemon = repo.search(pokemonName, commandEvent.getAuthor());
    final RaidBossCounters counters = raidInfoService.getCounters(pokemon);
    final String maxCp = raidInfoService.getMaxCp(pokemon);
    StringBuilder builder = new StringBuilder();
    final Locale localeForUser = localeService.getLocaleForUser(commandEvent.getAuthor());
    builder.append("**").append(pokemon).append("**\n");
    builder.append(localeService.getMessageFor(LocaleService.WEAKNESSES, localeForUser)).append(Utils.printWeaknesses(pokemon)).append("\n").append(localeService.getMessageFor(LocaleService.RESISTANT, localeForUser)).append(pokemon.getResistant());
    if (counters != null) {
        builder.append("\n");
        appendBestCounters(counters, builder, localeForUser);
    }
    if (maxCp != null) {
        builder.append("\nMax CP level 20 (100% IV): ").append(maxCp).append("\n");
    }
    replyBasedOnConfig(config, commandEvent, builder.toString());
}
Also used : Pokemon(pokeraidbot.domain.pokemon.Pokemon) CounterPokemon(pokeraidbot.infrastructure.CounterPokemon) RaidBossCounters(pokeraidbot.domain.raid.RaidBossCounters)

Aggregations

Pokemon (pokeraidbot.domain.pokemon.Pokemon)1 RaidBossCounters (pokeraidbot.domain.raid.RaidBossCounters)1 CounterPokemon (pokeraidbot.infrastructure.CounterPokemon)1