Initialize a variable outside the loop where it is incremented.
This should allow the intended limitation of at most two spawns after $final_turns.


git-svn-id: http://svn.gna.org/svn/wesnoth/trunk@56142 75b3775d-3801-0410-9e12-e2e43121521d