DUNE - The Spice must flow!

by RedRafe

Production Challenge where you need to collect Spice to survive on Arrakis!

Scenarios
1 year, 10 months ago
1.1
603
Enemies Environment Mining

b [Open] Endless enemy attacks

1 year, 4 months ago
(updated 1 year, 4 months ago)

I put this under bug, but maybe it's intended but not stated: the attack frequency (global.attack_increase) can keep increasing until:
((attack_interval * 60 * 60) - (global.level * 180) - global.attack_increase) becomes negative, and then literally every time create_enemy_forces runs, enemies are spawned.

Apparently the function keeps running because the condition of the "level-progress" story element. It keeps running every tick, so when the negative is hit, every single tick enemies are spawned.

If the top of the create_enemy_forces is changed to:

    local attack_period = ((attack_interval * 60 * 60) - (global.level * 180) - global.attack_increase)
    attack_period = math.max(1800, attack_period)
    if global.attack_counter >= attack_period then

Then they attack only every 30 seconds at minimum... instead of every tick

New response