In recent nightly I added option to control cost of armor moving, now is possible to implement "glue" gun that prevent unit form moving from given spot.
By default each unit use value from:
armors:
- type: STR_NONE_UC
moveCost:
basePercent: [100, 100] #TU%, ENERGY%
Then in y-script you can alter it per unit:
begin;
var int temp;
unit.MoveCost.getBaseTimePercent temp;
add temp 100;
unit.MoveCost.setBaseTimePercent temp;
end;
This properties can have any value but game enforce that result TU cost is in range [1, 254] and Energy in [0, 255].
As side notes, now save files should be smaller by up to 40% because game stop print some whitespaces that take took lot wasted of space in file.