Treat negative number of strikes as 0 instead of the unmodified amount

Fixes #9366.
This commit is contained in:
Yoruma 2024-10-07 02:43:59 +08:00 committed by GitHub
parent a9637de7e7
commit 0e13a7e30f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1261,7 +1261,7 @@ void attack_type::modified_attacks(unsigned & min_attacks,
int attacks_value = composite_value(get_specials_and_abilities("attacks"), num_attacks());
if ( attacks_value < 0 ) {
attacks_value = num_attacks();
attacks_value = 0;
ERR_NG << "negative number of strikes after applying weapon specials";
}