From a447c5f43c0c186779359eb23db1a07d3e1e279b Mon Sep 17 00:00:00 2001 From: Marek Wolan Date: Tue, 14 Jan 2025 09:05:13 +0000 Subject: [PATCH] #2869 - Make periodic agent timing check stricter --- src/primaite/game/agent/scripted_agents/random_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/primaite/game/agent/scripted_agents/random_agent.py b/src/primaite/game/agent/scripted_agents/random_agent.py index b5601a58..999669d8 100644 --- a/src/primaite/game/agent/scripted_agents/random_agent.py +++ b/src/primaite/game/agent/scripted_agents/random_agent.py @@ -59,7 +59,7 @@ class PeriodicAgent(AbstractScriptedAgent, identifier="PeriodicAgent"): If variance were greater than frequency, sometimes the bracketed term would be negative and the attack would never happen again. """ - if self.variance > self.frequency: + if self.variance >= self.frequency: raise ValueError( f"Agent start settings error: variance must be lower than frequency " f"{self.variance=}, {self.frequency=}"