/// <summary> /// Checks if the player's endurance beats the score required and if they fail impacts the skill by whatever amount is set. Default is 0. Use + or - /// </summary> /// <param name="client"></param> /// <param name="scoreToBeat"></param> /// <returns></returns> public static bool CheckEndurance(Client client, int scoreToBeat = 10, int impact = 0) { TalentScoresheet scoresheet = client.GetData("TalentScoresheet") as TalentScoresheet; if (scoresheet.GetEndScore() + Dice.RollDice() > scoreToBeat) { return(true); } scoresheet.EnduranceModifier += impact; return(false); }
/// <summary> /// Will return true if the client wins. False is the target wins. /// </summary> /// <param name="client"></param> /// <param name="target"></param> /// <returns></returns> public static bool CheckEndAgainstOpponent(Client client, Client target, int impact = 0) { TalentScoresheet clientSheet = client.GetData("TalentScoresheet") as TalentScoresheet; TalentScoresheet targetSheet = client.GetData("TalentScoresheet") as TalentScoresheet; if (clientSheet.GetEndScore() + Dice.RollDice() > targetSheet.GetEndScore() + Dice.RollDice()) { return(true); } clientSheet.EnduranceModifier += impact; return(false); }
public void SkillCheck(Client client) { if (Settings.DisableCommands) { return; } if (!client.HasData("TalentScoresheet")) { return; } TalentScoresheet sheet = client.GetData("TalentScoresheet") as TalentScoresheet; client.SendChatMessage($"=== ~b~SHEET ~w~==="); client.SendChatMessage($"~g~END: ~w~{sheet.Endurance} > +{sheet.GetEndScore()} Modifier"); client.SendChatMessage($"~r~STR: ~w~{sheet.Strength} > +{sheet.GetStrScore()} Modifier"); client.SendChatMessage($"~b~INT: ~w~{sheet.Intelligence} > +{sheet.GetIntScore()} Modifier"); client.SendChatMessage($"~o~CHA: ~w~{sheet.Charisma} > +{sheet.GetChaScore()} Modifier"); }