1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

vcmi: make "noneOf" selector more restrictive

It should do "or-not" instead of "and-not".
This commit is contained in:
Konstantin P
2023-09-13 16:55:41 +03:00
parent 499339bfd1
commit 1522ed85e2

View File

@@ -1058,9 +1058,9 @@ CSelector JsonUtils::parseSelector(const JsonNode & ability)
value = &ability["noneOf"];
if(value->isVector())
{
CSelector base = Selector::all;
CSelector base = Selector::none;
for(const auto & andN : value->Vector())
base.And(parseSelector(andN));
base.Or(parseSelector(andN));
ret = ret.And(base.Not());
}