def rested_turn(self, target_ac):
        """
        Calculate the average damage dealt during a turn with all abilities available.

        :param target_ac:   AC of target creature.
        :return:            Damage caused by turn.
        """
        return (self.weapon_attack(target_ac) +
                calculate_average_damage(8)) * 5
Exemple #2
0
    def weapon_attack(self, target_ac):
        """
        Single weapon attack.

        :param target_ac:   AC of target creature.
        :return:            Damage caused by attack.
        """
        probability = calculate_accuracy(target_ac, self.to_hit_modifier)
        average_damage = calculate_average_damage(8) + self.damage_modifier
        return probability * average_damage
Exemple #3
0
    def sharpshooter_attack_resolve(self, target_ac):
        """
        Single sharpshooter attack.

        :param target_ac:   AC of target creature.
        :return:            Damage caused by attack.
        """
        probability = calculate_accuracy_advantage(target_ac, self.to_hit_modifier - 5)
        average_damage = calculate_average_damage(8) + self.damage_modifier + 10
        return probability * average_damage
Exemple #4
0
    def weapon_attack_favoured_resolve(self, target_ac):
        """
        Single weapon attack with favoured bonus.

        :param target_ac:   AC of target creature.
        :return:            Damage caused by attack.
        """
        probability = calculate_accuracy_advantage(target_ac, self.to_hit_modifier)
        average_damage = calculate_average_damage(8) + self.damage_modifier + self.favoured_bonus
        return probability * average_damage
Exemple #5
0
    def booming_blade(self, target_ac):
        """
        Booming blade cantrip.

        :param target_ac:   AC of target creature.
        :return:            Damage caused by attack.
        """
        probability = calculate_accuracy(target_ac, self.to_hit_modifier)
        average_damage = (calculate_average_damage(8) *
                          4) + self.damage_modifier
        return probability * average_damage