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:
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user