Multiple characters allowed. Starting base health lowered. Fylgjr system implemented.
This commit is contained in:
@@ -454,11 +454,21 @@ void update_time() {
|
||||
}
|
||||
}
|
||||
|
||||
if (is_daytime && residents_count > 0 && barricade_health < BARRICADE_MAX_HEALTH && current_hour % 4 == 0) {
|
||||
if (has_any_storage_food()) {
|
||||
int gained = add_barricade_health(residents_count * get_resident_effect_multiplier());
|
||||
if (gained > 0 && x <= BASE_END) {
|
||||
speak_with_history("Residents repaired the barricade. +" + gained + " health.", true);
|
||||
if (is_daytime && residents_count > 0 && barricade_health < BARRICADE_MAX_HEALTH) {
|
||||
const int day_start_hour = 6;
|
||||
const int day_end_hour = 18; // Exclusive for repair scheduling (12-hour window)
|
||||
if (current_hour >= day_start_hour && current_hour < day_end_hour) {
|
||||
int repair_window_hours = day_end_hour - day_start_hour;
|
||||
int interval = repair_window_hours / residents_count;
|
||||
if (interval < 1) interval = 1;
|
||||
int day_hour = current_hour - day_start_hour;
|
||||
if (day_hour % interval == 0) {
|
||||
if (has_any_storage_food()) {
|
||||
int gained = add_barricade_health(residents_count * get_resident_effect_multiplier());
|
||||
if (gained > 0 && x <= BASE_END) {
|
||||
speak_with_history("Residents repaired the barricade. +" + gained + " health.", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -469,9 +479,6 @@ void update_time() {
|
||||
attempt_resident_butchering();
|
||||
attempt_resident_foraging();
|
||||
}
|
||||
if (current_hour == 12) {
|
||||
attempt_resident_foraging();
|
||||
}
|
||||
attempt_daily_invasion();
|
||||
keep_base_fires_fed();
|
||||
update_incense_burning();
|
||||
|
||||
Reference in New Issue
Block a user