Fixed nightstalk ability not working (bug #24696)
This commit is contained in:
parent
eafba52b60
commit
50da18ebba
1 changed files with 3 additions and 3 deletions
|
@ -268,14 +268,14 @@ bool terrain_filter::match_internal(const map_location& loc, const bool ignore_x
|
|||
if(!tod_type.empty()) {
|
||||
const std::vector<std::string>& vals = utils::split(tod_type);
|
||||
if(tod.lawful_bonus<0) {
|
||||
if(std::find(vals.begin(),vals.end(),std::to_string(unit_type::ALIGNMENT::CHAOTIC)) == vals.end()) {
|
||||
if(std::find(vals.begin(),vals.end(),unit_type::ALIGNMENT::enum_to_string(unit_type::ALIGNMENT::CHAOTIC)) == vals.end()) {
|
||||
return false;
|
||||
}
|
||||
} else if(tod.lawful_bonus>0) {
|
||||
if(std::find(vals.begin(),vals.end(),std::to_string(unit_type::ALIGNMENT::LAWFUL)) == vals.end()) {
|
||||
if(std::find(vals.begin(),vals.end(),unit_type::ALIGNMENT::enum_to_string(unit_type::ALIGNMENT::LAWFUL)) == vals.end()) {
|
||||
return false;
|
||||
}
|
||||
} else if(std::find(vals.begin(),vals.end(),std::to_string(unit_type::ALIGNMENT::NEUTRAL)) == vals.end()) {
|
||||
} else if(std::find(vals.begin(),vals.end(),unit_type::ALIGNMENT::enum_to_string(unit_type::ALIGNMENT::NEUTRAL)) == vals.end()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue