Laser Squad [Day 30] – Priming explosives

Now units can prime explosives; unit must have an explosive-type item equipped in his inventory. Every turn, all items on map and in all units inventories are checked for explosive-type items, checked if they are primed, and if the timer reached zero; if yes, there’s a kaboom.

The tricky part, which I am postponing a couple of weeks now, is the actual explosion. Every explosive has it’s own strength (radius), but what if the explosion is blocked by walls. The strength is weakened by the constitution of every map tile, and the calculations must be done in a circle. I have no idea how this is implemented in the original game, so I must find a way to do it right and realistic.

The other thing what’s missing is chained explosions. In the original game there are also map tiles which explode on destruction, but, if I remember correctly, an explosion on the map can’t affect explosive-type items in units inventory.

     

* * * * *