def pantheon_control(state: Optional[PantheonViewState]): if state is None: return None reaction_list = state.reaction_list return EmbedControl( [PantheonView.embed(state)], reaction_list or [emoji_cache.get_by_name(e) for e in IdMenuPanes.emoji_names()])
def otherinfo_control(state: OtherInfoViewState): if state is None: return None reaction_list = state.reaction_list return EmbedControl( [OtherInfoView.embed(state)], reaction_list or [emoji_cache.get_by_name(e) for e in IdMenuPanes.emoji_names()])
async def get_id_menu_initial_reaction_list( ctx, dgcog, monster: "MonsterModel", full_reaction_list: List[Optional[str]] = None, force_evoscroll=False): # hide some panes if we're in evo scroll mode if not full_reaction_list: full_reaction_list = [ emoji_cache.get_by_name(e) for e in IdMenuPanes.emoji_names() ] if not force_evoscroll and not settings.checkEvoID(ctx.author.id): return full_reaction_list alt_versions, gem_versions = await EvosViewState.query(dgcog, monster) if alt_versions is None and gem_versions is None: full_reaction_list.remove(IdMenuEmoji.left) full_reaction_list.remove(IdMenuEmoji.right) full_reaction_list.remove(IdMenuEmoji.evos) pantheon_list, _, _ = await PantheonViewState.query(dgcog, monster) if pantheon_list is None: full_reaction_list.remove(IdMenuEmoji.pantheon) mats, usedin, gemid, _, skillups, _, _, _ = await MaterialsViewState.query( dgcog, monster) if mats is None and usedin is None and gemid is None and skillups is None: full_reaction_list.remove(IdMenuEmoji.mats) return full_reaction_list
def id_control(state: IdViewState): return EmbedControl( [IdView.embed(state)], [emoji_cache.get_by_name(e) for e in emoji_button_names] )
def ls_control(state: LeaderSkillViewState): return EmbedControl( [LeaderSkillView.embed(state)], [emoji_cache.get_by_name(e) for e in emoji_button_names] )
def process_monster(behavior: MonsterBehavior, encounter: "EncounterModel", database: "DbContext") -> DungeonMonster: emoji_map = SafeDgEmojiDict( resolve_status=emoji_cache.get_by_name('resolve'), fire_orb=emoji_cache.get_by_name('orb_fire'), recover_health=emoji_cache.get_by_name('misc_autoheal'), roulette=emoji_cache.get_by_name('spinner'), unknown_type='Unknown', defense_status=emoji_cache.get_by_name('defense'), combo_absorb_status=emoji_cache.get_by_name('combo'), absorb_status=emoji_cache.get_by_name('attribute_absorb'), damage_absorb_status=emoji_cache.get_by_name('damage_absorb'), damage_void_status=emoji_cache.get_by_name('vdp'), status_shield_status=emoji_cache.get_by_name('status'), movetime_buff_status=emoji_cache.get_by_name('time_buff'), movetime_debuff_status=emoji_cache.get_by_name('time_debuff'), dispel_status='Dispel', leader_swap_status=emoji_cache.get_by_name('swap'), skill_delay=emoji_cache.get_by_name('misc_sb'), lock_orbs=emoji_cache.get_by_name('lock'), tape_status=emoji_cache.get_by_name('res_seal'), fixed_start=emoji_cache.get_by_name('orb_start'), cloud_status=emoji_cache.get_by_name('res_cloud'), gravity=emoji_cache.get_by_name('gravity'), invincible_status=emoji_cache.get_by_name('invincible'), invincible_off_status=emoji_cache.get_by_name('invincible'), # TODO force_target_status=emoji_cache.get_by_name('force_target'), leader_alter_status=emoji_cache.get_by_name('transform'), board_size_status=emoji_cache.get_by_name('board_size'), super_resolve_status=emoji_cache.get_by_name('super_resolve'), turn_change=emoji_cache.get_by_name('turn_change'), enrage_status=emoji_cache.get_by_name('enrage'), active_skill_bind=emoji_cache.get_by_name('skill_bound'), do_nothing='\N{SLEEPING SYMBOL}', awoken_skill_bind=emoji_cache.get_by_name('awoken_skill_bind'), no_skyfall_status=emoji_cache.get_by_name('no_skyfall'), bind=emoji_cache.get_by_name('res_bind'), skyfall_status='\N{CLOUD WITH RAIN}', blind=emoji_cache.get_by_name('black_circle_real'), super_blind=emoji_cache.get_by_name('blind_orb'), to='\N{BLACK RIGHTWARDS ARROW}️', attack=emoji_cache.get_by_name('single_hit'), multi_attack=emoji_cache.get_by_name('multi_hit'), target_self='Self', health=emoji_cache.get_by_name('health'), combo_orb=emoji_cache.get_by_name('orb_combo'), locked_bomb_orb=emoji_cache.get_by_name('locked_bomb_orb'), random_attribute='[Random Att]', water_orb=emoji_cache.get_by_name('orb_water'), wood_orb=emoji_cache.get_by_name('orb_wood'), light_orb=emoji_cache.get_by_name('orb_light'), dark_orb=emoji_cache.get_by_name('orb_dark'), healer_orb=emoji_cache.get_by_name('heal_orb'), jammer_orb=emoji_cache.get_by_name('jammer_orb'), poison_orb=emoji_cache.get_by_name('poison_orb'), bomb_orb=emoji_cache.get_by_name('bomb_orb'), mortal_poison_orb=emoji_cache.get_by_name('mortal_poison_orb'), evo_material_type=emoji_cache.get_by_name('killer_evomat'), balanced_type=emoji_cache.get_by_name('killer_balance'), physical_type=emoji_cache.get_by_name('killer_physical'), healer_type=emoji_cache.get_by_name('killer_healer'), dragon_type=emoji_cache.get_by_name('killer_dragon'), god_type=emoji_cache.get_by_name('killer_god'), attacker_type=emoji_cache.get_by_name('killer_attacker'), devil_type=emoji_cache.get_by_name('killer_devil'), machine_type=emoji_cache.get_by_name('killer_machine'), awakening_material_type=emoji_cache.get_by_name('killer_awoken'), enhance_material_type=emoji_cache.get_by_name('killer_enhancemat'), redeemable_material_type='\U0001fa99', # Coin Emoji no_match_fire=emoji_cache.get_by_name('no_match_fire'), no_match_wood=emoji_cache.get_by_name('no_match_wood'), no_match_water=emoji_cache.get_by_name('no_match_water'), no_match_dark=emoji_cache.get_by_name('no_match_dark'), no_match_light=emoji_cache.get_by_name('no_match_light'), no_match_heart=emoji_cache.get_by_name('no_match_heart'), no_match_jammer=emoji_cache.get_by_name('no_match_jammer'), no_match_poison=emoji_cache.get_by_name('no_match_poison'), no_match_heal=emoji_cache.get_by_name('no_match_heal'), recover_debuff_status=emoji_cache.get_by_name('recover_debuff_status'), attack_debuff_status='\N{CROSSED SWORDS}\N{DOWNWARDS BLACK ARROW}️') monster_model = database.graph.get_monster(encounter.monster_id) monster = DungeonMonster(hp=encounter.hp, atk=encounter.atk, defense=encounter.defense, turns=encounter.turns, level=encounter.level, monster=monster_model) if behavior is None: return monster level_behavior = behavior_for_level(behavior, encounter.level) if level_behavior is None: return monster for group in level_behavior.groups: monster.add_group( process_behavior_group(group, database, encounter, emoji_map)) return monster
def id_control(state: IdViewState): return EmbedControl( [IdView.embed(state)], [emoji_cache.get_by_name(e) for e in LeaderSkillSingleMenuPanes.emoji_names()] )
def tf_control(state: TransformInfoViewState): return EmbedControl( [TransformInfoView.embed(state)], [emoji_cache.get_by_name(e) for e in emoji_button_names])
def otherinfo_control(state: OtherInfoViewState): return EmbedControl( [OtherInfoView.embed(state)], [emoji_cache.get_by_name(e) for e in IdMenuPanes.emoji_names()])
def pantheon_control(state: PantheonViewState): return EmbedControl( [PantheonView.embed(state)], [emoji_cache.get_by_name(e) for e in IdMenuPanes.emoji_names()])
def mats_control(state: MaterialsViewState): return EmbedControl( [MaterialsView.embed(state)], [emoji_cache.get_by_name(e) for e in IdMenuPanes.emoji_names()])
def evos_control(state: EvosViewState): return EmbedControl( [EvosView.embed(state)], [emoji_cache.get_by_name(e) for e in IdMenuPanes.emoji_names()])
def ls_control(state: LeaderSkillViewState): return EmbedControl([LeaderSkillView.embed(state)], [ emoji_cache.get_by_name(e) for e in LeaderSkillMenuPanes.emoji_names() ])