Something like this. However, instead of t1/4, it's more reliable to use ceil(t1/4) to avoid errors when the value is less than 4. And I don't quite understand why there's a while loop there.
Одиночные: Завеса срывается, Посол, Последний рывок, Эхо Пустоты
Кампания: Империя Единорога
Существа NCF
Орден Порядка: 1
Нейтралы: 1 2 3 4