Im just working on the improved code for teammate surrender, and wanted to ask for your feedback (had some good feedback in the chat already).
This is how I currently plan to make it work:
When a teammate surrenders (or drops out due to missing 3 turns in a row), that players cities, income buildings and towers will all change owner to the still living teammembers (randomly assigned one by one).
Cities will have the townhall and citywall decreased by 1 level. Production buildtime will be reset to 0. Available production is unchanged as well as what the city is currently producing.
All units outside cities, towers, incomebuildings will be removed. For the rest of the units, the units with buildtime 1 turn will be changed owners to the new city/building owner and all units with buildtime > 1 turn will be removed.
The reasons for this is that if a teammate resigns, it should be bad for the team. If the team gets to keep everything unchanged, it might be too good for the team if one player resigns, since this opens up other possibilities of vectoring and stacking. On the other hand we dont want to make it too hard a blow to the team if one player resigns, so this is a try to find the balance.
Any feedback before I write the code?