Esempio n. 1
0
        }                                     // represents who this entity is allied with in combat

        public Entity(string name, int level, char gender, int team, int[] abilityScoreValues = null, Die hitDie = null, MapPoint location = null)
        {
            Name = name;
            Level.SetValue(level);
            Gender        = gender;
            Team          = team;
            AbilityScores = new AbilityScores(abilityScoreValues);

            _experience = 0;
            hitDie ??= new Die(6);
            _hitDie = hitDie;
            Hp      = 0;
            for (int j = 0; j < Level.Value; j++)
            {
                Hp += _hitDie.Roll(1, getModifier("CON"));
            }
            CurrentHp = new Stat("HP", 0, Hp, Hp);

            PassivePerception = AbilityScores.TotalScores["WIS"];

            Location = location;

            Actions.Add(new TargetedAction("attack", $"[target name] - Attack a target creature within {_attackRangeFeet} feet.", "major", Attack));
            Actions.Add(new NonTargetedAction("search", "- Search surroundings for items and creatures.", "major", Search));
            Actions.Add(new NonTargetedAction("hide", "- Attempt to hide from enemies", "major", Hide));
            Actions.Add(new TargetedAction("take", "[item name] - Pick up an item within 5 feet.", "minor", TakeItem));
            Actions.Add(new TargetedAction("drop", "[item name] - Drop an item in inventory.", "minor", DropItem));
            Actions.Add(new TargetedAction("use", "[item name] - Use an item in inventory.", "minor", UseItem));
            Actions.Add(new TargetedAction("move", "[direction] [distance] - Move to an unoccupied space. Enter abbreviated direction and distance in feet. (e.g., NW 20)", "move", Move));
        }
Esempio n. 2
0
 public NonSentientNpc(string name, int level, char gender, int team, Aggression aggression, int[] abilityScoreValues = null, Die hitDie = null, MapPoint location = null) :
     base(name, level, gender, team, abilityScoreValues, hitDie, location)
 {
     Aggression = aggression;
 }