Andrettin / Wyrmsun

Strategy game based on history, mythology and fiction
http://andrettin.github.io/
GNU General Public License v2.0
301 stars 47 forks source link

Northwards the Sea doesn't give technology points #27

Closed KroArtem closed 8 years ago

KroArtem commented 8 years ago

Wyrmsun the latest f9f94d15fbb5ef52367b0c577f07f22665e1ce26 When I defeated all the enemies and got a window "Outcome victory" I was returned to quests window without any technology points.

Andrettin commented 8 years ago

Thanks for the bug report :)

The issue was that player 0 (which is set to PlayerNobody in this scenario) was being set to have germanic civilization, resulting in a 1 in 4 chance that the player would have the Asa Tribe as their faction. When that happened, this mean that in the internal code check to see which player was the Asa Tribe, player 0 was chosen, rather than player 4, as would be correct - and consequently the human player didn't get the quest's objectives. This is fixed now, by making it necessary for a player to not be of type PlayerNobody to have data set to it, and by adding an extra check to the Lua function that gets a faction's player.

This bug had probably not been found out about before because previously the Germanic civilization had many more factions (many Teuton, Goth and Norse tribes doubled as Germanic factions), so the chance of this occurring was much smaller than 1 in 4.

Bug fixed in: https://github.com/Andrettin/Wyrmgus/commit/eaf811e4da75225949cd4ac27aeae319dda3f565 https://github.com/Andrettin/Wyrmsun/commit/f8f2f50a48f6113a48b5c7bd636642a40d7bbda2