def test_set_level_for_trick_remove(echoes_resource_database): trick = echoes_resource_database.trick[0] config = TrickLevelConfiguration(False, {}, RandovaniaGame.METROID_PRIME_ECHOES) assert config.level_for_trick(trick) == LayoutTrickLevel.DISABLED config = config.set_level_for_trick(trick, LayoutTrickLevel.ADVANCED) assert config.level_for_trick(trick) == LayoutTrickLevel.ADVANCED config = config.set_level_for_trick(trick, LayoutTrickLevel.DISABLED) assert config.level_for_trick(trick) == LayoutTrickLevel.DISABLED
def trick_resources_for_configuration( self, configuration: TrickLevelConfiguration, resource_database: ResourceDatabase, ) -> CurrentResources: """ :param configuration: :param resource_database: :return: """ static_resources = {} for trick in resource_database.trick: if configuration.minimal_logic: level = LayoutTrickLevel.maximum() else: level = configuration.level_for_trick(trick) static_resources[trick] = level.as_number return static_resources