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

Incorrect message in results screen #73

Closed KroArtem closed 8 years ago

KroArtem commented 8 years ago

We were allies with one of the tribe but they're counted as enemy. I think it was lggi tribe. 2016-02-24 04-31-31

Andrettin commented 8 years ago

Unfortunately, I couldn't find any flaw in the relevant code, in /scripts/menu/results.lua:

            if (ThisPlayer.Index == i) then
                name = name .. " - You"
            elseif (ThisPlayer:IsAllied(Players[i])) then
                name = name .. " - Ally"
            elseif (ThisPlayer:IsEnemy(Players[i])) then
                name = name .. " - Enemy"
            else
                name = name .. " - Neutral"
            end

Maybe you attacked your ally by mistake and they became hostile to you as a consequence? If you order an attack against an ally or neutral AI they will change their diplomatic stance with you to hostile.

KroArtem commented 8 years ago

yep, my workes attacked his mine as they were not able to get into it and collect gold/silver/copper, they were just staying in front of mine. I had to destroy it and build my own mine. Btw, it was the last building of my ally, all the others were destroyed by our enemy.

KroArtem commented 8 years ago

Ok, the question is why did I have to destroy my ally's mine?

Andrettin commented 8 years ago

I was thinking the same when I read what you posted. I made it so now you can harvest from an ally's mine:

https://github.com/Andrettin/Wyrmgus/commit/81ca3616fefebaadcabbb7ca1296604bc70fd008

I think the AI leaving minor buildings like farms and mines standing is alright, since they aren't required for victory.