Player.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. using Domain.Weapons;
  2. using Infrastructure;
  3. namespace Domain;
  4. public class Player : BaseEntity
  5. {
  6. public string? Name { get; set; }
  7. public string? CharacterName { get; set; }
  8. public string? Background { get; set; }
  9. public int Experience { get; set; }
  10. public int CC { get; set; }
  11. public int CT { get; set; }
  12. public int F { get; set; }
  13. public int E { get; set; }
  14. public int AG { get; set; }
  15. public int INT { get; set; }
  16. public int PER { get; set; }
  17. public int FM { get; set; }
  18. public int SOC { get; set; }
  19. public int MF { get; set; }
  20. public ICollection<Weapon> Weapons { get; set; }
  21. public int Initiative()
  22. {
  23. return DiceService.RollDices(1, 10) + DiceService.Bonus(AG);
  24. }
  25. public bool TestCC()
  26. {
  27. return DiceService.RollDices(1, 100) <= CC;
  28. }
  29. public bool TestCT()
  30. {
  31. return DiceService.RollDices(1, 100) <= CT;
  32. }
  33. public bool TestF()
  34. {
  35. return DiceService.RollDices(1, 100) <= F;
  36. }
  37. public bool TestE()
  38. {
  39. return DiceService.RollDices(1, 100) <= E;
  40. }
  41. public bool TestAG()
  42. {
  43. return DiceService.RollDices(1, 100) <= AG;
  44. }
  45. public bool TestINT()
  46. {
  47. return DiceService.RollDices(1, 100) <= INT;
  48. }
  49. public bool TestPER()
  50. {
  51. return DiceService.RollDices(1, 100) <= PER;
  52. }
  53. public bool TestFM()
  54. {
  55. return DiceService.RollDices(1, 100) <= FM;
  56. }
  57. public bool TestSOC()
  58. {
  59. return DiceService.RollDices(1, 100) <= SOC;
  60. }
  61. public bool TestMF()
  62. {
  63. return DiceService.RollDices(1, 100) <= MF;
  64. }
  65. }