questions

Forum > Questions > equipment damage formula
Reply To Thread (login)
magicianmon [1]
2013-08-31 00:07:39
[10 years, 264 days ago]

what is the actual formula? this doesn't make sense:

public static function getDamageProbability($item, $str, $dex) { if ($item->getReqDex() === null || $item->getReqStr() >= $item->getReqDex()) { $difference = $str - $item->getReqStr(); } else if ($item->getReqStr() === null || $item->getReqDex() > $item->getReqStr()) { $difference = $dex - $item->getReqDex(); }

if ($difference > 0) {
    return min(0.25, max(0.025, 1 / (10 + $difference)));
} else {
    return min(0.25, max(0.025, 0.1 + $difference * -0.0025));
}

}


 
Jans [87]
2013-08-31 01:40:50
[10 years, 264 days ago]

Here are a bunch of formulas from Bots2, which are the same - i think - in Bots4: http://edmazur.com/bots/game_formulas.php


 
Ender [1]
Administrator
2013-08-31 17:00:18
[10 years, 264 days ago]

I assume this is referring to my 2011-06-12 14:15:03 post from this thread? Which part are you having trouble with?


 
Crab Whistler [130]
2013-08-31 17:01:53
[10 years, 264 days ago]

The requested thread does not exist.

:(


 
Ender [1]
Administrator
2013-08-31 17:05:13
[10 years, 264 days ago]

Oops, fixed.


 
Forum > Questions > equipment damage formula
Reply To Thread (login)