New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix system ship unstealthiness #3839
fix system ship unstealthiness #3839
Conversation
fleet stealth != planet stealth and the fleet stealth effects (e.g. empty system) were in ROOT_DECEPTION
Not sure what your point is... |
probably my point was i am not sure that the InOrIsSystem::Eval works correctly for the both search domains. but probably it does. and changing it (see below) would also be fine. @geoffthemedio the underlying question was if we should change the behaviour of the condition not to interpret -1 as "match any system"; probably by using a different int constant (e.g. ANY_SYSTEM_ID -2) |
What are the two search domains you mean?
This is how most / all conditions and valuerefs work. ID |
matches and non_matches
ok, so InSystem id = Target.SystemID matching any object on a starlane is expected behavior. I added documentation entries in the wiki. case closed. |
lienrag found the fleet unstealthiness to misbehave if in transit. (e.g. screenshot in forum )
if a candidate is not in a system (has SystemID -1) it matches nothing. the -1 as target is used to signal "match any system" (i.e. an SystemID but -1).
not sure if the implementation of InSystem is a bug or if it is correct and simply not helpful/not intuitive. Not Not InSystem id = xxx probably has to be the same as InSystem id = xxx for all xxx .
so for fleet unstealthiness code. the ship the stealth effect applies to is the target. the ships which are counted are the candidates.
according to my code dive the stealth of a ship on a starlane would be decreased depending on the count of all ships which are not on a starlane - which is clearly a bug.
the scope condition needs an InSystem condition (without id).
this PR contains three commits; one fixes a typo; one fixes the unstealthiness ; one moves the effect to a more fitting focs file