diff options
author | LainLayer <doggymangc@gmail.com> | 2024-03-24 23:21:58 +0300 |
---|---|---|
committer | LainLayer <doggymangc@gmail.com> | 2024-03-24 23:21:58 +0300 |
commit | aaf4181ba947d6bcdde88893f5ab9e023485eec1 (patch) | |
tree | 6f5b976ddc7c1151a59ba2bb8e862c2231474813 | |
parent | 9320775cfa0b537f5eb5af3bd0ee749ca8584b69 (diff) |
test reducing turn duration relative to queue size
-rw-r--r-- | eepers.adb | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -143,7 +143,8 @@ procedure Eepers is Put_Line("WARNING: could not load colors from file " & File_Name & ": " & Exception_Message(E)); end; - TURN_DURATION_SECS : constant Float := 0.125; + BASE_TURN_DURATION_SECS : constant Float := 0.125; + TURN_DURATION_SECS : Float := BASE_TURN_DURATION_SECS; GUARD_ATTACK_COOLDOWN : constant Integer := 10; EEPER_EXPLOSION_DAMAGE : constant Float := 0.45; GUARD_TURN_REGENERATION : constant Float := 0.01; @@ -1493,6 +1494,12 @@ begin Command_Enqueue(Command_Queue, (Kind => Command_Plant)); end if; end if; + if Command_Queue.Size /= 0 then + TURN_DURATION_SECS := BASE_TURN_DURATION_SECS * (1.0 / Float(Command_Queue.Size)); + else + TURN_DURATION_SECS := BASE_TURN_DURATION_SECS; + end if; + Any_Key_Pressed := False; while not Any_Key_Pressed and then Get_Key_Pressed /= KEY_NULL loop Any_Key_Pressed := True; |