glitchassassin / screeps-cartographer

Cartographer is an advanced (and open source) movement library for Screeps
29 stars 8 forks source link

Shoving #7

Closed glitchassassin closed 2 years ago

glitchassassin commented 2 years ago

Moving minions should be able to shove stationary minions out of the path.

Stationary minions should remember their preferred location, so that when shoved they can stay in range of their target (possibly shoving others recursively to make it happen).

If the preferred location no longer matters, it should be discarded.

Shoving should be based on priority order: any minion can be shoved if it has a happy square to move to; a higher-priority minion can shove a lower-priority minion even if it means being bumped out of its happy square; and a lower-priority minion cannot shove a higher-priority minion out of its happy square.