Beispiel #1
0
    def __init__(self,
                 record_id=None,
                 level=None,
                 health=None,
                 abilities=None,
                 is_boss=False,
                 action_type=actions_relations.ACTION_TYPE.BATTLE_PVE_1X1,
                 terrain=map_relations.TERRAIN.PLANE_GRASS):

        self.record_id = record_id
        self.level = level
        self.is_boss = is_boss

        self.abilities = self._produce_abilities(
            self.record, level) if abilities is None else abilities

        self.initiative = self.abilities.modify_attribute(
            heroes_relations.MODIFIERS.INITIATIVE, 1)
        self.health_cooficient = self.abilities.modify_attribute(
            heroes_relations.MODIFIERS.HEALTH, 1)
        self.damage_modifier = self.abilities.modify_attribute(
            heroes_relations.MODIFIERS.DAMAGE, 1)

        if self.is_boss:
            self.max_health = int(
                f.boss_hp_to_lvl(level) * self.health_cooficient)
        else:
            self.max_health = int(
                f.mob_hp_to_lvl(level) * self.health_cooficient)

        self.health = self.max_health if health is None else health

        self.action_type = action_type
        self.terrain = terrain
Beispiel #2
0
    def __init__(self,
                 record_id=None,
                 level=None,
                 health=None,
                 abilities=None,
                 is_boss=False):

        self.record_id = record_id
        self.level = level
        self.is_boss = is_boss

        self.abilities = self._produce_abilities(
            self.record, level) if abilities is None else abilities

        self.initiative = self.abilities.modify_attribute(
            HERO_MODIFIERS.INITIATIVE, 1)
        self.health_cooficient = self.abilities.modify_attribute(
            HERO_MODIFIERS.HEALTH, 1)
        self.damage_modifier = self.abilities.modify_attribute(
            HERO_MODIFIERS.DAMAGE, 1)

        if self.is_boss:
            self.max_health = int(
                f.boss_hp_to_lvl(level) * self.health_cooficient)
        else:
            self.max_health = int(
                f.mob_hp_to_lvl(level) * self.health_cooficient)

        self.health = self.max_health if health is None else health
Beispiel #3
0
    def __init__(self,
                 record_id=None,
                 level=None,
                 health=None,
                 abilities=None,
                 is_boss=False,
                 action_type=actions_relations.ACTION_TYPE.BATTLE_PVE_1X1,
                 terrain=map_relations.TERRAIN.PLANE_GRASS):

        self.record_id = record_id
        self.level = level
        self.is_boss = is_boss

        self.abilities = self._produce_abilities(self.record, level) if abilities is None else abilities

        self.initiative = self.abilities.modify_attribute(HERO_MODIFIERS.INITIATIVE, 1)
        self.health_cooficient = self.abilities.modify_attribute(HERO_MODIFIERS.HEALTH, 1)
        self.damage_modifier = self.abilities.modify_attribute(HERO_MODIFIERS.DAMAGE, 1)

        if self.is_boss:
            self.max_health = int(f.boss_hp_to_lvl(level) * self.health_cooficient)
        else:
            self.max_health = int(f.mob_hp_to_lvl(level) * self.health_cooficient)

        self.health = self.max_health if health is None else health

        self.action_type = action_type
        self.terrain = terrain
Beispiel #4
0
    def __init__(self, record_id=None, level=None, health=None, abilities=None, is_boss=False):

        self.record_id = record_id
        self.level = level
        self.is_boss = is_boss

        self.abilities = self._produce_abilities(self.record, level) if abilities is None else abilities

        self.initiative = self.abilities.modify_attribute(HERO_MODIFIERS.INITIATIVE, 1)
        self.health_cooficient = self.abilities.modify_attribute(HERO_MODIFIERS.HEALTH, 1)
        self.damage_modifier = self.abilities.modify_attribute(HERO_MODIFIERS.DAMAGE, 1)

        if self.is_boss:
            self.max_health = int(f.boss_hp_to_lvl(level) * self.health_cooficient)
        else:
            self.max_health = int(f.mob_hp_to_lvl(level) * self.health_cooficient)

        self.health = self.max_health if health is None else health