2013-03-19, 04:10 AM
Locked Wrote:It isn't impossible, really.Shouldn't it be k *= (1-i/100)?
Assuming "ignoreDEF" is an array of values, you can calculate it like so.
Code:float physicalDEF() {
float k = 1.0f;
if(ignoreDEF.empty())
return mobPDR;
else {
for(auto& i : ignoreDEF) //for every value in your ignoreDEF array.
k *= (i/100); // k *= (i/100) is equivalent to k = k * (i/100) where i is the current value in ignoreDEF array.
return mobPDR*k; //mobPDR * k is your physical DEF attribute.
}
}

