Example #1
0
    def attack(self, victim: Monster):
        attacker_swing: (Damage, int) = self.get_auto_attack_damage(victim.level)

        auto_attack: Damage = attacker_swing[0]  # type: Damage
        # the sor_damage below is used just to check for printing
        sor_damage: int = attacker_swing[1]  # if the seal isn't active the damage will be 0

        auto_attack_print = victim.get_take_attack_damage_repr(auto_attack, self.level)
        if sor_damage:
            print(f'{self.name} attacks {victim.name} for {auto_attack_print} from {self.KEY_SEAL_OF_RIGHTEOUSNESS}!')
        else:
            print(f'{self.name} attacks {victim.name} for {auto_attack_print}!')

        victim.take_attack(auto_attack, self.level)
Example #2
0
    def spell_melting_strike(self, spell: PaladinSpell, target: Monster):
        """ Damages the enemy for DAMAGE_1 damage and puts a DoT effect, the index of which is EFFECT
        :return successful cast or not"""
        mana_cost: int = spell.mana_cost
        damage: Damage = Damage(phys_dmg=spell.damage1)
        dot: 'DoT' = spell.harmful_effect
        dot.update_caster_level(self.level)

        self.mana -= mana_cost
        # damage the target and add the DoT
        print(f'{spell.name} damages {target.name} for {damage}!')
        target.take_attack(damage, self.level)
        target.add_buff(dot)

        return True
Example #3
0
    def spell_melting_strike(self, spell: PaladinSpell, target: Monster):
        """ Damages the enemy for DAMAGE_1 damage and puts a DoT effect, the index of which is EFFECT
        :return successful cast or not"""
        mana_cost: int = spell.mana_cost
        damage: Damage = Damage(phys_dmg=spell.damage1)
        dot: 'DoT' = spell.harmful_effect
        dot.update_caster_level(self.level)

        self.mana -= mana_cost
        # damage the target and add the DoT
        print(f'{spell.name} damages {target.name} for {damage}!')
        target.take_attack(damage, self.level)
        target.add_buff(dot)

        return True
Example #4
0
    def attack(self, victim: Monster):
        attacker_swing: (Damage,
                         int) = self.get_auto_attack_damage(victim.level)

        auto_attack: Damage = attacker_swing[0]  # type: Damage
        # the sor_damage below is used just to check for printing
        sor_damage: int = attacker_swing[
            1]  # if the seal isn't active the damage will be 0

        auto_attack_print = victim.get_take_attack_damage_repr(
            auto_attack, self.level)
        if sor_damage:
            print(
                f'{self.name} attacks {victim.name} for {auto_attack_print} from {self.KEY_SEAL_OF_RIGHTEOUSNESS}!'
            )
        else:
            print(
                f'{self.name} attacks {victim.name} for {auto_attack_print}!')

        victim.take_attack(auto_attack, self.level)