diff --git a/Adventures in Lestoria/MajorHawk.cpp b/Adventures in Lestoria/MajorHawk.cpp index 99e6b48b..421937bf 100644 --- a/Adventures in Lestoria/MajorHawk.cpp +++ b/Adventures in Lestoria/MajorHawk.cpp @@ -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){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){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. -} \ No newline at end of file +} diff --git a/Adventures in Lestoria/Zephy.cpp b/Adventures in Lestoria/Zephy.cpp index d0c25e16..a252af8f 100644 --- a/Adventures in Lestoria/Zephy.cpp +++ b/Adventures in Lestoria/Zephy.cpp @@ -80,7 +80,7 @@ void Monster::STRATEGY::ZEPHY(Monster&m,float fElapsedTime,std::string strategy) #pragma region Flying Hover Effect if(m.F(A::TARGET_FLYING_HEIGHT)==0.f)m.SetZ(std::max(m.F(A::FLYING_HEIGHT),0.f)); - else m.SetZ(std::max(m.F(A::FLYING_HEIGHT)+ConfigFloat("Flight Oscillation Amount")*sin((PI*m.TimeSpentAlive())/1.5f),0.f)); + else m.SetZ(std::max(float(m.F(A::FLYING_HEIGHT)+ConfigFloat("Flight Oscillation Amount")*sin((PI*m.TimeSpentAlive())/1.5f)),0.f)); #pragma endregion if(m.F(A::FLYING_HEIGHT)-ConfigFloat("Flight Oscillation Amount"))m.F(A::FLYING_HEIGHT)=std::max(-ConfigFloat("Flight Oscillation Amount"),m.F(A::FLYING_HEIGHT)-ConfigPixels("Fly Rise/Fall Speed")*fElapsedTime); @@ -380,4 +380,4 @@ void Monster::STRATEGY::ZEPHY(Monster&m,float fElapsedTime,std::string strategy) } }break; } -} \ No newline at end of file +}