| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System.Collections;
- using System.Collections.Generic;
- using System.ComponentModel.DataAnnotations;
- using Warhammer.Models.Weapons;
- using Warhammer.Service;
- namespace Warhammer.Models
- {
- public class Player : BaseEntity
- {
- public string Name { get; set; }
- public string CharacterName { get; set; }
- public string Background { get; set; }
- public int Experience { get; set; }
- public int CC { get; set; }
- public int CT { get; set; }
- public int F { get; set; }
- public int E { get; set; }
- public int AG { get; set; }
- public int INT { get; set; }
- public int PER { get; set; }
- public int FM { get; set; }
- public int SOC { get; set; }
- public int MF { get; set; }
- public ICollection<Weapon> Weapons { get; set; }
- public int Initiative()
- {
- return DiceService.RollDices(1, 10) + DiceService.Bonus(AG);
- }
- public bool TestCC() { return DiceService.RollDices(1, 100) <= CC; }
- public bool TestCT() { return DiceService.RollDices(1, 100) <= CT; }
- public bool TestF() { return DiceService.RollDices(1, 100) <= F; }
- public bool TestE() { return DiceService.RollDices(1, 100) <= E; }
- public bool TestAG() { return DiceService.RollDices(1, 100) <= AG; }
- public bool TestINT() { return DiceService.RollDices(1, 100) <= INT; }
- public bool TestPER() { return DiceService.RollDices(1, 100) <= PER; }
- public bool TestFM() { return DiceService.RollDices(1, 100) <= FM; }
- public bool TestSOC() { return DiceService.RollDices(1, 100) <= SOC; }
- public bool TestMF() { return DiceService.RollDices(1, 100) <= MF; }
- }
- }
|