Esempio n. 1
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
Esempio n. 2
0
    def sharpshooter_attack_favoured(self, target_ac):
        """
        Single sharpshooter attack.

        :param target_ac:   AC of target creature.
        :return:            Damage caused by attack.
        """
        probability = calculate_accuracy(target_ac, self.to_hit_modifier - 5)
        average_damage = calculate_average_damage(8) + self.damage_modifier + 10 + self.favoured_bonus
        return probability * average_damage
Esempio n. 3
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