RoyalTonberry
Member
Percent chance of gaining initiative (capped at 0 if less than 0 or 100 if greater than 100).
Extra Monster Level Penalty (does not include MCDs or Slimetube Squeezes):
+0% per +1 ML for 0-20
+1% per +1 ML for 21-40
+2% per +1 ML for 41-60
+3% per +1 ML for 61-80
+4% per +1 ML for 81-100
+5% per +1 ML for 100+
This can be easily expressed in code like so (ML in this code refers to only +ML, not total ML):
I suppose that the only thing that can really be done is to show the Init in the main GUI as your +init modifiers minus the ML penalty, since actual initiative is monster-dependent.
Then perhaps in the Location Details thingy, a spot for calculating initiative versus the specific monsters, if mafia even tracks monster's base init? If that'd be too much of a pain (as, if it's not in there, that'd be a ton of work, i think), then I wouldn't worry about it, and would just do the calculation for the main GUI.
Code:
Initiative (in %) = (100 - Monster Base Init)
+ Init Modifiers
+ max(0, Mainstat - Adjusted Monster Attack (including MCDs and Slimetube Squeezes))
- Extra Monster Level Penalty
Extra Monster Level Penalty (does not include MCDs or Slimetube Squeezes):
+0% per +1 ML for 0-20
+1% per +1 ML for 21-40
+2% per +1 ML for 41-60
+3% per +1 ML for 61-80
+4% per +1 ML for 81-100
+5% per +1 ML for 100+
This can be easily expressed in code like so (ML in this code refers to only +ML, not total ML):
Code:
int penalty = 0;
if(ML > 20) {
penalty = ML-20;
if(ML > 40) {
penalty += ML-40;
if(ML > 60) {
penalty += ML-60;
if(ML > 80) {
penalty += ML-80;
if(ML > 100) {
penalty += ML-100;
}
}
}
}
}
I suppose that the only thing that can really be done is to show the Init in the main GUI as your +init modifiers minus the ML penalty, since actual initiative is monster-dependent.
Then perhaps in the Location Details thingy, a spot for calculating initiative versus the specific monsters, if mafia even tracks monster's base init? If that'd be too much of a pain (as, if it's not in there, that'd be a ton of work, i think), then I wouldn't worry about it, and would just do the calculation for the main GUI.