public override void Create(Player player, IDiceShaker shaker, IDiceAttribute diceAttribute) { var handSize = player.Hand.GetValue<double>(); var coordination = player.Coordination.GetValue<double>(); var value = shaker.Roll((dynamic)diceAttribute); // coordination modifier if (coordination <= 30) { _coordinationModifier = shaker.RandomRoll(-.4, -.3); } else if (coordination > 30 && coordination <= 60) { _coordinationModifier = shaker.RandomRoll(-.3, -.2); } else if (coordination > 60 && coordination <= 75) { _coordinationModifier = shaker.RandomRoll(-.1, 0); } else if (coordination > 75 && coordination <= 90) { _coordinationModifier = shaker.RandomRoll(.1, .19); } else { _coordinationModifier = shaker.RandomRoll(.19, .25); } // handSize modifier if (handSize <= 5) { _handSizeModifier = shaker.RandomRoll(-.2, 0); } else if (handSize > 5 && handSize <= 5.5) { _handSizeModifier = shaker.RandomRoll(-.12, 0); } else if (handSize > 5.5 && handSize <= 6) { _handSizeModifier = shaker.RandomRoll(0, .01); } else if (handSize > 6 && handSize <= 7) { _handSizeModifier = shaker.RandomRoll(.06, .1); } else if (handSize > 7 && handSize <= 8) { _handSizeModifier = shaker.RandomRoll(.1, .19); } else { _handSizeModifier = shaker.RandomRoll(.19, 1); } var result = _calculateValue(player, value); SetValue(result); }
public override void Create(Player player, IDiceShaker shaker, IDiceAttribute diceAttribute) { var armStrength = player.ArmStrength.GetValue<double>(); var legStrength = player.LegStrength.GetValue<double>(); var value = shaker.Roll((dynamic)diceAttribute); // arm strength modifier if (armStrength <= 30) { _armStrengthModifier = shaker.RandomRoll(0, .15); } else if (armStrength > 30 && armStrength <= 60) { _armStrengthModifier = shaker.RandomRoll(0, .15); } else if (armStrength > 60 && armStrength <= 75) { _armStrengthModifier = shaker.RandomRoll(0, .15); } else if (armStrength > 75 && armStrength <= 90) { _armStrengthModifier = shaker.RandomRoll(-.16, 0); } else { _armStrengthModifier = shaker.RandomRoll(-.22, -.12); } // leg strength modifier if (legStrength <= 30) { _legStrengthModifier = shaker.RandomRoll(0, .15); } else if (legStrength > 30 && legStrength <= 60) { _legStrengthModifier = shaker.RandomRoll(0, .15); } else if (legStrength > 60 && legStrength <= 75) { _legStrengthModifier = shaker.RandomRoll(0, .15); } else if (legStrength > 75 && legStrength <= 90) { _legStrengthModifier = shaker.RandomRoll(-.16, 0); } else { _legStrengthModifier = shaker.RandomRoll(-.22, -.12); } var result = _calculateValue(player, value); SetValue(result); }
public override void Create(Player player, IDiceShaker shaker, IDiceAttribute diceAttribute) { var twitch = player.MuscleFibreTwitch.GetValue<double>(); var strength = player.LegStrength.GetValue<double>(); var flexibility = player.Flexibility.GetValue<double>(); var value = shaker.Roll((dynamic)diceAttribute); // strength modifier if (strength <= 30) { _strengthModifier = shaker.RandomRoll(-.3, -.2); } else if (strength > 30 && strength <= 60) { _strengthModifier = shaker.RandomRoll(-.15, -.05); } else if (strength > 60 && strength <= 75) { _strengthModifier = shaker.RandomRoll(.09, .15); } else if (strength > 75 && strength <= 90) { _strengthModifier = shaker.RandomRoll(.15, .19); } else { _strengthModifier = shaker.RandomRoll(.19, .25); } // twitch modifier if (twitch <= 30) { _twitchModifier = shaker.RandomRoll(-.12, 0); } else if (twitch > 30 && twitch <= 60) { _twitchModifier = shaker.RandomRoll(-.8, 0); } else if (twitch > 60 && twitch <= 75) { _twitchModifier = shaker.RandomRoll(.03, .06); } else if (twitch > 75 && twitch <= 90) { _twitchModifier = shaker.RandomRoll(.06, .09); } else { _twitchModifier = shaker.RandomRoll(.09, .15); } // How much of the flexibility should we take if (flexibility <= 30) { _flexibilityModifier = shaker.RandomRoll(-.2, 0); } else if (flexibility > 30 && flexibility <= 60) { _flexibilityModifier = shaker.RandomRoll(-.1, 0); } else if (flexibility > 60 && flexibility <= 75) { _flexibilityModifier = shaker.RandomRoll(0, .05); } else if (flexibility > 75 && flexibility <= 90) { _flexibilityModifier = shaker.RandomRoll(.05, .08); } else { _flexibilityModifier = shaker.RandomRoll(.08, .12); } var result = _calculateValue(player, value); SetValue(result); }