Skip to content

Commit 599426f

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 25f3c9b + 499aade commit 599426f

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

eepers.adb

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ procedure Eepers is
143143
Put_Line("WARNING: could not load colors from file " & File_Name & ": " & Exception_Message(E));
144144
end;
145145

146-
TURN_DURATION_SECS : constant Float := 0.125;
146+
BASE_TURN_DURATION_SECS : constant Float := 0.125;
147+
TURN_DURATION_SECS : Float := BASE_TURN_DURATION_SECS;
147148
GUARD_ATTACK_COOLDOWN : constant Integer := 10;
148149
EEPER_EXPLOSION_DAMAGE : constant Float := 0.45;
149150
GUARD_TURN_REGENERATION : constant Float := 0.01;
@@ -934,7 +935,7 @@ procedure Eepers is
934935
when Command_Plant => null;
935936
end case;
936937
end record;
937-
Command_Capacity: constant Natural := 5;
938+
Command_Capacity: constant Natural := 3;
938939
type Command_Array is array (0..Command_Capacity-1) of Command;
939940
type Command_Queue_Record is record
940941
Items: Command_Array;
@@ -1492,6 +1493,16 @@ begin
14921493
Command_Enqueue(Command_Queue, (Kind => Command_Plant));
14931494
end if;
14941495
end if;
1496+
if Is_Key_Down(KEY_LEFT_SHIFT) then
1497+
TURN_DURATION_SECS := BASE_TURN_DURATION_SECS * 0.8;
1498+
else
1499+
if Command_Queue.Size /= 0 then
1500+
TURN_DURATION_SECS := BASE_TURN_DURATION_SECS * (1.0 / Float(Command_Queue.Size));
1501+
else
1502+
TURN_DURATION_SECS := BASE_TURN_DURATION_SECS;
1503+
end if;
1504+
end if;
1505+
14951506
Any_Key_Pressed := False;
14961507
while not Any_Key_Pressed and then Get_Key_Pressed /= KEY_NULL loop
14971508
Any_Key_Pressed := True;

0 commit comments

Comments
 (0)