Ejemplo n.º 1
0
        public Shade(int level)
        {
            int headHealth  = Dice.Roll("1D5");
            int torsoHealth = Dice.Roll("2D5");
            int legHealth   = Dice.Roll("3D3-2");

            Bodyparts.Add(new Torso(torsoHealth, true, 5));
            Bodyparts.Add(new Head(headHealth, true, 2)
            {
                Strength = 5
            });
            Bodyparts.Add(new Leg(legHealth, false, 1));
            Awareness = 10;
            int health = CalculateSimpleHealth();

            SimpleHealth    = health;
            SimpleMaxHealth = health;
            Name            = "Shade";
            Initiative      = Dice.Roll("10D7+20");
            Speed           = Game.Random.Next(1, Initiative);
            Symbol          = 's';
            Color           = Colors.ShadeColor;
            Regen           = 0;
            Actions.Add(new Walk(this));
            Actions.Add(new Wait(this));
            Actions.Add(Prototypes.Attacks.Bite(this));
            LastAction = new Wait(this);
            Behaviors.Add(new HuntPlayer());
        }
Ejemplo n.º 2
0
        public Bodypart GetBodypart(bool sizeWeighted)
        {
            Bodypart bodypart = null;

            if (sizeWeighted)
            {
                bodypart = GetWeightedBodypart(Bodyparts);
            }
            else
            {
                bodypart = Bodyparts.ElementAt(Game.Random.Next(Bodyparts.Count() - 1));
            }
            return(bodypart);
        }
Ejemplo n.º 3
0
        public Bodypart GetVitalBodypart(bool sizeWeighted)
        {
            Bodypart vitalBodypart = null;

            if (sizeWeighted)
            {
                List <Bodypart> vitalBodyparts = Bodyparts.FindAll(bodypart => bodypart.IsVital == true);
                vitalBodypart = GetWeightedBodypart(vitalBodyparts);
            }
            else
            {
                List <Bodypart> vitalBodyparts = Bodyparts.FindAll(bodypart => bodypart.IsVital == true);
                vitalBodypart = vitalBodyparts.ElementAt(Game.Random.Next(vitalBodyparts.Count() - 1));
            }
            return(vitalBodypart);
        }
Ejemplo n.º 4
0
        public Player()
        {
            int headHealth  = 15;
            int torsoHealth = 50;
            int armHealth   = 15;
            int legHealth   = 20;

            Bodyparts.Add(new Torso(torsoHealth, true, 15));
            Bodyparts.Add(new Head(headHealth, true, 4));

            Bodyparts.Add(new Arm(armHealth, false, 6, 10)
            {
                Name = "Left Arm"
            });
            Bodyparts.Add(new Arm(armHealth, false, 6, 10)
            {
                Name = "Right Arm"
            });

            Bodyparts.Add(new Leg(legHealth, false, 7)
            {
                Name = "Left Leg"
            });
            Bodyparts.Add(new Leg(legHealth, false, 7)
            {
                Name = "Right Leg"
            });


            Awareness  = 15;
            Color      = Colors.Player;
            Name       = "Adventurer";
            Initiative = 50;
            Speed      = 1;
            Regen      = 1;
            Symbol     = '@';
            Actions.Add(new Walk(this));
            Actions.Add(new Wait(this));
            Actions.Add(Prototypes.Attacks.Punch(this));
            Actions.Add(Prototypes.Attacks.Slash(this));
            LastAction = new Wait(this);
        }
Ejemplo n.º 5
0
 public Bodypart GetBodypart(string bodypartName)
 {
     return(Bodyparts.Find(bodypart => bodypart.Name == bodypartName));
 }
Ejemplo n.º 6
0
 public Bodypart GetBodypart(BodypartType type)
 {
     return(Bodyparts.Find(bodypart => bodypart.PartType == type));
 }