Cursed Upgradable Buildings

by L0771

* Blood handling * Upgradable buildings: - Mining drill - Assembling Machine - Furnace - Lab - Fisher - Turret - Wall - Energy Generator - Headquarter * New mecanics * Auto attack base * Auto attack base

Overhaul
3 years ago
0.16 - 1.1
908

b Turret particle reach distance

5 years ago

A lvl 100 turret has longer shooting range than the actual bullet projectiles.
https://steamcommunity.com/sharedfiles/filedetails/?id=1520488829 - here a spitter is attacking my laser turret, but the laser turrets won't attack it, because they calculate that the cursed turret's projectile will kill the spitter, but the projectile disappears right before it reaches the spitter. So the spitter destroyed my laser turrets until it got out of range from the cursed turret

In cursed-turrets.lua you have the turret distance as:
obj.attack_parameters.range = math.ceil(7 + i / 3)
But the ammo delivery is:
obj.attack_parameters.ammo_type.action.action_delivery.max_range = 34

I suppose it would be best to use the same range logic for the projectile?. math.ceil(7 + i / 3) for i=100 is 41. Maybe it would even be better to have the projectile range a bit longer, so that biters trying to move sideways around the turret will definitely be hit if they enter the range of the turret (laser turrets work like this I think?). I'm setting it to math.ceil(7 + i / 3) + 5 locally to test it.

This is my last bug report.. I promise! (for now... hehehe) :D

New response