Page 1 of 1

Traitor fighter attacks its fleet

Posted: Tue Mar 26, 2019 11:21 pm
by Oberlus
Playing latest Windows Test version. Check out attached screenshot.
TraitorFighter.png
TraitorFighter.png (925.07 KiB) Viewed 5248 times
A purple colonizer (Egassem) was in Tewari alpha on turn 68, and my fleet of two Fleet Carriers LBz was on its way.
At start of turn 69 the Egassem colonizer has colonized Tewari alpha II, my fleet arrives and combat ensues, but the combat is between my figthers!
Check out screenshot for combat log. Looks like my own figthers got crazy and attacked its own fleet.
Oh, and one of the fighters attacked the uninhabited planet Tewari alpha III.
WTF

Re: Traitor fighter attacks its fleet

Posted: Wed Mar 27, 2019 7:45 am
by Ophiuchus
Oh the cylons! Even the developers did not know they are here :)


The culprit is "Weapon has no targeting condition?? Should have been set when initializing PartAttackInfo"


But the parsing of FT_HANGAR_3.focs.txt goes through fine.

Is that a game freshly started with the test version?

Re: Traitor fighter attacks its fleet

Posted: Wed Mar 27, 2019 9:17 am
by Ophiuchus
Ok, I can replicate the issue. The targeting condition works (so bombers attack ships first etc) until it runs out of targets. Then everything matches, which is plainly wrong.

I checked with the TopmostMatchesCondition branch which introduced the new targeting conditions and i could not replicate the issue so it looks some (not-so-)unrelated commit in master broke it.

Edit2:
It is actually a subtle bug in the OrderedAlternativesOf condition which did not manifest without the changes in master. In master species targeting was added which at the moment for any species' fighters matches any target. This ensures that all targets are in the matches set before the OrderedAlternativesOf condition is evaluated and applied. The OrderedAlternativesOf should match nothing if none of the conditions applies.

edit1: thought this was a usage bug
edit2: actually the matches input set seems is not correctly moved to the non_matches input set if none of the alternatives applies, needs a bugfix

Re: Traitor fighter attacks its fleet

Posted: Wed Mar 27, 2019 1:38 pm
by Ophiuchus
Fixed in PR 2413.

Note also the freeorion beta snap already got a hotfix release. I can't do anything about the windows and mac builds, so i guess those will be fixed with the next weekly release.

Re: Traitor fighter attacks its fleet

Posted: Wed Mar 27, 2019 8:22 pm
by Oberlus
Good job!