The-International-Open-Source icon indicating copy to clipboard operation
The-International-Open-Source copied to clipboard

Improve safemode activation requirements

Open CarsonBurke opened this issue 2 years ago • 1 comments

Things to consider when improving code:

  • Should probably only safemode when a spawn is at risk.
  • Spawns are probably not at risk if there is a sufficiently HP rampart on top of them
  • Spawns can be killed in one hit by sufficiently fitted dismantle creeps, so checking if spawn hits are low isn't a good idea
  • Perhaps check enemy range to spawn and spawn rampart existence for each spawn each tick

CarsonBurke avatar Jul 12 '22 23:07 CarsonBurke

There is existing safemode code in defenceManager.ts. I suggest replacing that with this improved version :D

CarsonBurke avatar Jul 12 '22 23:07 CarsonBurke

Partially implemented in ac67c3616b1b4ab8963833d5ed9b4c53ec13363d

Current implementation doesn't take ramparts into account, and only react to attack from previous tick (EventLog).

A spawn can be destroyed in a single tick. In this case, safeMode will trigger after spawn is gone.

ShuP1 avatar Jun 30 '23 07:06 ShuP1