fix: difficulty will now increment as intended

This commit is contained in:
Sara 2025-08-28 19:13:42 +02:00
parent 8dad8bbc1f
commit 8a9d70b37e

View file

@ -71,10 +71,12 @@ void MapRegion::raise_difficulty(double amount) {
if (this->hunt_phase) {
return;
}
double const new_difficulty{ this->difficulty + amount };
int const new_trunc{ (int)Math::floor(new_difficulty) };
print_line("Difficutly Increased");
int const old_trunc{ (int)Math::floor(this->difficulty) };
this->difficulty += amount;
int const new_trunc{ (int)Math::floor(this->difficulty) };
if (new_trunc != old_trunc) {
print_line("Hunt Phase Started");
emit_signal(sig_difficulty_increased);
emit_signal(sig_phase_changed, true);
this->hunt_phase = true;