mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-30 10:01:17 +00:00
git add [advancement][filter]
fixes #4495 Maybe it makes sense to remove the filter once the [advancement] is applied since it no longer serves any purpse after that.
This commit is contained in:
parent
d8492a7257
commit
5be808f1ba
@ -1745,6 +1745,11 @@ std::vector<config> unit::get_modification_advances() const
|
||||
if(adv["strict_amla"].to_bool() && !advances_to_.empty()) {
|
||||
continue;
|
||||
}
|
||||
if(const config& filter = adv.child("filter")) {
|
||||
if(!unit_filter(vconfig(filter)).matches(*this, loc_)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(modification_count("advancement", adv["id"]) >= static_cast<unsigned>(adv["max_times"].to_int(1))) {
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user