Fixes for earlier commit to fix GetEffectiveness in type library.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
51415895a4
commit
748f68b6d8
|
@ -5,7 +5,9 @@
|
|||
using namespace CreatureLib::Library;
|
||||
|
||||
float TypeLibrary::GetEffectiveness(uint8_t attacking, const List<uint8_t>& defensive) const {
|
||||
return std::accumulate(defensive.begin(), defensive.end(), (float)1, std::multiplies<float>());
|
||||
return std::accumulate(
|
||||
defensive.begin(), defensive.end(), (float)1,
|
||||
[this, attacking](float init, uint8_t defense) { return init * GetSingleEffectiveness(attacking, defense); });
|
||||
}
|
||||
|
||||
float TypeLibrary::GetSingleEffectiveness(uint8_t attacking, uint8_t defensive) const {
|
||||
|
|
Loading…
Reference in New Issue