Ejemplo n.º 1
0
        public Orchardist(Town town) : base("orchardist", town.Market)
        {
            var eat = new EatBehavior(this);

            this.Behaviors.Add(eat);

            this.Behaviors.Add(new ProduceBehavior(
                                   this,
                                   town,
                                   eat,
                                   new AreaProduceBehaviorOptions(this, town, Constants.Apples)
            {
                BaseAmount       = 1,
                EatFactor        = 2,
                ToolsFactor      = 2,
                ToolsBreakChance = 0.1
            }
                                   ));
            this.Behaviors.Add(new ProduceBehavior(
                                   this,
                                   town,
                                   eat,
                                   new AreaProduceBehaviorOptions(this, town, Constants.Oranges)
            {
                BaseAmount       = 1,
                EatFactor        = 2,
                ToolsFactor      = 2,
                ToolsBreakChance = 0.1
            }
                                   ));

            this.Behaviors.Add(new WorkerBehavior(this));

            this.Inventory.Add(Constants.Money, 100);
        }
Ejemplo n.º 2
0
        public Blacksmith(Town town) : base("blacksmith", town.Market)
        {
            var eat = new EatBehavior(this);

            this.Behaviors.Add(eat);
            this.Behaviors.Add(new BlacksmithBehavior(this, eat));
            this.Behaviors.Add(new WorkerBehavior(this));

            this.Inventory.Add(Constants.Money, 100);
        }
Ejemplo n.º 3
0
        public Miller(Town town) : base("miller", town.Market)
        {
            var eat = new EatBehavior(this);

            this.Behaviors.Add(eat);
            this.Behaviors.Add(new MillerBehavior(this, town, eat));
            this.Behaviors.Add(new WorkerBehavior(this));

            this.Inventory.Add(Constants.Money, 100);
        }
Ejemplo n.º 4
0
        public Fisherman(Town town) : base("fisherman", town.Market)
        {
            var eat = new EatBehavior(this);

            this.Behaviors.Add(eat);
            this.Behaviors.Add(new ProduceBehavior(
                                   this,
                                   town,
                                   eat,
                                   new AreaProduceBehaviorOptions(this, town, Constants.Fish)
            {
                BaseAmount       = 1,
                EatFactor        = 2,
                ToolsFactor      = 2,
                ToolsBreakChance = 0.1
            }
                                   ));
            this.Behaviors.Add(new WorkerBehavior(this));

            this.Inventory.Add(Constants.Money, 100);
        }
Ejemplo n.º 5
0
 public BlacksmithBehavior(Agent agent, EatBehavior eat) : base(agent)
 {
     this.eat = eat;
 }
Ejemplo n.º 6
0
 public MillerBehavior(Agent agent, Town town, EatBehavior eat) : base(agent)
 {
     this.town = town;
     this.eat  = eat;
 }
Ejemplo n.º 7
0
 public SawyerBehavior(Agent agent, EatBehavior eat) : base(agent)
 {
     this.eat = eat;
 }