示例#1
0
 public FarmerSlave(string name, string type) : base(name, type)
 {
     HardcoreLvl  = Rand.Next(200, 300);
     AuthorityLvl = Rand.Next(1, 3);
     Intelligence = 1;
     Money        = 0;
     Duties.Add("Dig dirt");
     Duties.Add("Graze animals");
     Metadata = new Reflector.ReflectionMetadata(typeof(FarmerSlave));
 }
 public Craftsmen(string name, string type) : base(name, type)
 {
     HardcoreLvl  = Rand.Next(100, 150);
     AuthorityLvl = Rand.Next(15, 35);
     Intelligence = Rand.Next(20, 50);
     Money        = Rand.Next(300);
     Resources    = 1000;
     Duties.Add("Craft weapons");
     Duties.Add("Craft tools");
     Duties.Add("Sell crafted stuff");
     Duties.Add("Making money");
     Metadata = new Reflector.ReflectionMetadata(typeof(Craftsmen));
 }
示例#3
0
 public Soldier(string name, string type) : base(name, type)
 {
     HardcoreLvl   = 500;
     AuthorityLvl  = 250;
     Intelligence  = 100;
     SoldierSkills = Rand.Next(50, 100);
     Money         = Rand.Next(500, 1000);
     Duties.Add("Protect territories");
     Duties.Add("Kill enemies");
     Duties.Add("Conquering territories");
     Duties.Add("Supervise the farmers and slaves");
     Metadata = new Reflector.ReflectionMetadata(typeof(Soldier));
 }
示例#4
0
 public Scribe(string name, string type) : base(name, type)
 {
     Age             = Rand.Next(10, 50);
     HardcoreLvl     = 40;
     AuthorityLvl    = 200;
     Intelligence    = 500;
     Money           = Rand.Next(500, 1000);
     WriteReadSkills = Rand.Next(45, 80);
     Duties.Add("Write on papyrus");
     Duties.Add("Learn to read and write");
     Duties.Add("Update databases(food, soldiers, gifts to the Gods, etc.)");
     Metadata = new Reflector.ReflectionMetadata(typeof(Scribe));
 }
示例#5
0
 public Merchant(string name, string type) : base(name, type)
 {
     HardcoreLvl  = Rand.Next(75, 150);
     AuthorityLvl = Rand.Next(40, 100);
     Intelligence = Rand.Next(50, 86);
     Money        = Rand.Next(250, 750);
     Duties.Clear();
     Duties.Add("Exist");
     Duties.Add("Sell stuff");
     Duties.Add("Buy stuff");
     Duties.Add("Making money");
     Metadata = new Reflector.ReflectionMetadata(typeof(Merchant));
 }
示例#6
0
 public PriestNoblesOfficials(string name, string type) : base(name, type)
 {
     HardcoreLvl     = 150;
     AuthorityLvl    = 400;
     Intelligence    = 400;
     Money           = Rand.Next(1000, 2500);
     WriteReadSkills = 100;
     Rules           = Rand.Next(15, 50);
     Duties.Clear();
     Duties.Add("Making laws");
     Duties.Add("Keep peace in the society");
     Duties.Add("Making rituals and ceremonies");
     Duties.Add("Keep the Gods happy");
     Metadata = new Reflector.ReflectionMetadata(typeof(PriestNoblesOfficials));
 }
示例#7
0
 public Pharaoh(string name, string type) : base(name, type)
 {
     Age             = Rand.Next(5, 100);
     HardcoreLvl     = 1000;
     AuthorityLvl    = 1000;
     Intelligence    = 3000;
     WriteReadSkills = 100;
     Territories     = 10000;
     Money           = 100000;
     Rules           = 150;
     Duties.Clear();
     Duties.Add("Making and implementing rules and regulations");
     Duties.Add("Rule the army");
     Duties.Add("Protect provinces");
     Duties.Add("Сollect taxes");
     Metadata = new Reflector.ReflectionMetadata(typeof(Pharaoh));
 }
示例#8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="duty"></param>
        /// <returns></returns>
        public async Task <bool> CreateAsync(Duty duty)
        {
            if (duty == null)
            {
                throw new ArgumentNullException(nameof(duty));
            }

            duty.DutyPosts       = new List <DutyPost>();
            duty.DutySharedFiles = new List <DutySharedFile>();

            Duties.Add(duty);
            try
            {
                await SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                return(false);
            }

            return(true);
        }