NatedogEZ
05-23-2014, 02:38 AM
I noticed you can get a chance to triple attack with this ability... but the math is incorrect.
special_attacks.cpp
int TripleChance = 25;
if (bDoubleSpecialAttack > 100)
TripleChance += TripleChance*(100-bDoubleSpecialAttack)/100;
if(TripleChance > MakeRandomInt(0,100)) {
MonkSpecialAttack(GetTarget(), MonkSPA[MakeRandomInt(0,4)]);
}
I'm not crazy right.. but that math makes it so that anything over 100 'bDoubleSpecialAttack' gives a LOWER chance to Triple..
200 'bDoubleSpecialAttack' ... gives a nice 0% chance to triple attack :)
special_attacks.cpp
int TripleChance = 25;
if (bDoubleSpecialAttack > 100)
TripleChance += TripleChance*(100-bDoubleSpecialAttack)/100;
if(TripleChance > MakeRandomInt(0,100)) {
MonkSpecialAttack(GetTarget(), MonkSPA[MakeRandomInt(0,4)]);
}
I'm not crazy right.. but that math makes it so that anything over 100 'bDoubleSpecialAttack' gives a LOWER chance to Triple..
200 'bDoubleSpecialAttack' ... gives a nice 0% chance to triple attack :)