def attack(self): """Словарь с атаками бойца :rtype : dict :return: Словарик, ключами которого являются типы атаки(лед, огонь, яд...), а значениями кортежи вида (атака, верная атака) """ result = {} for attack_type in data.attack_types: result[attack_type] = tuples_sum( [data.get_modifier(mod).attack[1] for mod in self.modifiers() if data.get_modifier(mod).attack[0] == attack_type] ) return result
def protection(self): """ :rtype : dict :return: Словарь, ключами которого являются типы защиты, а значениями - кортежи вида (защита, верная защита). """ result = dict() for protect_type in data.protection_types: result[protect_type] = tuples_sum( [data.get_modifier(mod).protection[1] for mod in self.modifiers() if data.get_modifier(mod).protection[0] == protect_type] ) return result
def attack(self): """Словарь с атаками бойца :rtype : dict :return: Словарик, ключами которого являются типы атаки(лед, огонь, яд...), а значениями кортежи вида (атака, верная атака) """ result = {} for attack_type in data.attack_types: result[attack_type] = tuples_sum( [ data.get_modifier(mod).attack[1] for mod in self.modifiers() if data.get_modifier(mod).attack[0] == attack_type ] ) return result
def protection(self): """ :rtype : dict :return: Словарь, ключами которого являются типы защиты, а значениями - кортежи вида (защита, верная защита). """ result = dict() for protect_type in data.protection_types: result[protect_type] = tuples_sum( [ data.get_modifier(mod).protection[1] for mod in self.modifiers() if data.get_modifier(mod).protection[0] == protect_type ] ) return result
def fear(self): """ :return: Значение чудовищности(целое число) """ return sum([get_modifier(mod).fear for mod in self.modifiers()])
def magic(self): """ :return: Магическая сила(целое число) """ return sum([get_modifier(mod).magic for mod in self.modifiers()])
def max_energy(self): """ :return: Максимальная энергия(целое число) """ return self._base_energy + sum( [get_modifier(mod).max_energy for mod in self.modifiers()])
def max_energy(self): """ :return: Максимальная энергия(целое число) """ return self._base_energy + sum([get_modifier(mod).max_energy for mod in self.modifiers()])