Raiders in a raid no longer count idle time twice as fast

A raider's idle counter grew by 4 per tick while in a raid, so it
dropped out of the raid after about 700 ticks instead of 1400 and could
no longer be recruited sooner than in vanilla. Remove the extra tick
added by the raid bookkeeping; the counter now grows by 3 like vanilla.
This commit is contained in:
Kacpherek
2026-10-26 19:30:07 +01:00
parent 3a5aa2b3e7
commit cb97c5496e
+5 -8
View File
@@ -819,14 +819,11 @@ impl Game<'_> {
if !alive {
continue;
}
// Raider.updateNoActionTime adds two per tick, and a raider
// fighting a player or golem in a raid is never idle.
if s.raid_id.is_some() {
m.ai.no_action_time = if target_player || target_golem {
0
} else {
m.ai.no_action_time + 1
};
// Raider.aiStep: a raider fighting a player or golem in a raid is
// never idle. The per-tick growth (+1 serverAiStep, +2
// Raider.updateNoActionTime) is added by the mob's own step.
if s.raid_id.is_some() && (target_player || target_golem) {
m.ai.no_action_time = 0;
}
// Raider.aiStep: join the raid the raider stands in.
if s.raid_id.is_none()