More casts to make gcc happy. Change 2nd chapter bonus boss mob counter from using std::reduce to std::accumulate (Apparently gcc is ambiguous about argument order?? wtf)

This commit is contained in:
2024-06-18 15:57:00 -05:00
parent c6c3e5cf72
commit c83aff8962
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -49,8 +49,8 @@ using A=Attribute;
void Monster::STRATEGY::MAJOR_HAWK(Monster&m,float fElapsedTime,std::string strategy){
//Runs the Hawk strategy and has an aggressive mode when the amount of this monster falls below an amount.
const int majorHawkCount=std::reduce(MONSTER_LIST.begin(),MONSTER_LIST.end(),0,[&](const int&acc,const std::unique_ptr<Monster>&monster){return std::move(acc)+((monster->IsAlive()&&monster->GetName()==ConfigString("Aggressive Name Check"))?1:0);});
const int majorHawkCount=std::accumulate(MONSTER_LIST.begin(),MONSTER_LIST.end(),0,[&](const int&acc,const std::unique_ptr<Monster>&monster){return std::move(acc)+((monster->IsAlive()&&monster->GetName()==ConfigString("Aggressive Name Check"))?1:0);});
if(majorHawkCount<=ConfigInt("Aggressive Hawk Count"))HAWK(m,fElapsedTime,"Major Hawk");
else HAWK(m,fElapsedTime,"Hawk"); //Use normal hawk behaviors when there are too many Major Hawks.
}
}