Snipe doesn't work on earth
simonlindholm opened this issue · comments
Just so no-one else spends too much time debugging this: the problem is that sniping happens on both Earth and Mars while the current planet is Mars, and then damage_location
doesn't work with Earth because it uses my_planet().units_by_loc
. Changing it to get_planet(location.planet)
moves the problem into destroy_unit
which also only deals with the current planet. I guess the fix should be to do Earth-sniping when Earth is done, or at the beginning of each turn. I'll see if I can make a PR for this.
(Got side-tracked with Java OOM stuff, and now it's suddenly 2AM. Will look tomorrow if no one else gets to it.)