def __init__(self, name=None, controller=None, fight=None, unit_dict=None, complexity=None): Unit.__init__(self, name, controller, fight=fight, unit_dict=unit_dict) self.max_wounds = 15 self.wounds = 15 self.bone_dict = {'head': True, 'legs': True, 'arms': True} self.weapon = random.choice([weapons.Knife, weapons.Bow])(self) self.melee_accuracy = 0 self.range_accuracy = 0 self.evasion = 0 self.damage = 0 self.weapons = [] self.crawl_action = self.create_action('crawl', self.crawl, 'button_1', order=10) self.crawl_back_action = self.create_action('crawl-back', self.crawl_back, 'button_2', order=10) self.default_weapon = weapons.Teeth(self) self.crawling = False self.energy = 5 self.max_energy = 5 self.loot_chances['weapon'] = 50 self.recovery_energy = 5 self.toughness = 5 if unit_dict is not None: self.equip_from_dict(unit_dict)
def __init__(self, name=None, controller=None, fight=None, unit_dict=None, complexity=None): Unit.__init__(self, name, controller, fight=fight, unit_dict=unit_dict) self.max_wounds = 30 self.wounds = 30 self.weapon = weapons.RedOakBranch(self) self.melee_accuracy = 0 self.range_accuracy = 0 self.evasion = -2 self.damage = 0 self.weapons = [] self.ancor = weapons.RedOakAncor(self) self.new_ability(ability_name='spawn_grabber_branch', ability_func=self.spawn_grabber_branch, ability_type='instant', name_tuple=self.to_string('button_1'), cooldown=6) self.new_ability(ability_name='attack_everyone', ability_func=self.attack_everyone, ability_type='instant', name_tuple=self.to_string('button_1')) self.new_ability(ability_name='throw_ancor', ability_func=self.throw_ancor, ability_type='instant', name_tuple=self.to_string('button_1')) self.energy = 7 self.max_energy = 7 self.branches = [] self.branch_spawned = False if unit_dict is not None: self.equip_from_dict(unit_dict)
def __init__(self, name=None, controller=None, fight=None, unit_dict=None, complexity=None): Unit.__init__(self, name, controller=controller, fight=fight, unit_dict=unit_dict) self.feared = False # Максимальные параметры if unit_dict is None: self.max_hp = 3 self.hp = self.max_hp self.max_energy = 5 self.recovery_energy = 5 self.toughness = 4 self.melee_accuracy = 0 self.range_accuracy = 0 self.evasion = 0 self.damage = 0 else: self.max_hp = unit_dict['max_hp'] self.hp = unit_dict['hp'] self.max_energy = unit_dict['max_energy'] self.recovery_energy = unit_dict['recovery_energy'] self.toughness = unit_dict['toughness'] self.melee_accuracy = unit_dict['melee_accuracy'] self.range_accuracy = unit_dict['range_accuracy'] self.evasion = unit_dict['evasion'] self.damage = unit_dict['damage'] # Снаряжение if unit_dict is None: self.weapon = weapons.Teeth(self) self.weapons = [] self.abilities = [ abilities.Cannibal(self), abilities.CorpseEater(self) ] self.items = [] self.armor = [] self.inventory = [] else: self.equip_from_dict(unit_dict) self.energy = int(self.max_energy / 2 + 1) self.crawl_action = self.create_action('worm-crawl-forward', self.crawl, 'button_1', order=10) self.crawl_back_action = self.create_action('worm-crawl-back', self.crawl_back, 'button_2', order=1)
def __init__(chains, name=None, controller=None, fight=None, unit_dict=None, target=None): Unit.__init__(chains, name=name, controller=controller, fight=fight, unit_dict=unit_dict) chains.wounds = 1 chains.evasion = -5 chains.chained = target chains.chained.disabled.append(chains.unit_name)
def __init__(self, name=None, controller=None, fight=None, unit_dict=None, complexity=None): Unit.__init__(self, name, controller=controller, fight=fight, unit_dict=unit_dict) # Максимальные параметры self.max_hp = 3 self.hp = self.max_hp self.max_energy = 5 self.toughness = 4 self.melee_accuracy = 0 self.range_accuracy = 0 self.evasion = 0 self.damage = 0 self.weapon = weapons.PoisonedFangs(self) self.weapons = [] self.abilities = [] self.items = [] self.armor = [] self.inventory = [] if unit_dict is not None: self.equip_from_dict(unit_dict) self.energy = self.max_energy
def __init__(self, name=None, controller=None, fight=None, unit_dict=None, owner=None): Unit.__init__(self, name=name, controller=controller, fight=fight, unit_dict=unit_dict) self.owner = owner self.wounds = 10 self.evasion = 0 self.state = 'reach' self.weapon = weapons.Knife(self) self.victim = None self.new_ability(ability_name='tighten', ability_func=self.tighten, ability_type='instant', name_tuple=self.to_string('button_1'))