Ejemplo n.º 1
0
        public Mogwai(string key, Dictionary <long, Shift> shifts)
        {
            Key    = key;
            Shifts = new ConcurrentDictionary <long, Shift>(shifts);

            _currentShift = shifts.Values.First();

            LevelShifts.Add(_currentShift.Height); // adding initial creation level up

            Pointer = _currentShift.Height;

            // create appearance
            var hexValue = new HexValue(_currentShift);

            Name  = NameGen.GenerateName(hexValue);
            Body  = new Body(hexValue);
            Coat  = new Coat(hexValue);
            Stats = new Stats(hexValue);

            // create abilities
            var rollEvent = new[] { 4, 6, 3 };

            Gender           = _currentShift.MogwaiDice.Roll(2, -1);
            BaseStrength     = _currentShift.MogwaiDice.Roll(rollEvent);
            BaseDexterity    = _currentShift.MogwaiDice.Roll(rollEvent);
            BaseConstitution = _currentShift.MogwaiDice.Roll(rollEvent);
            BaseIntelligence = _currentShift.MogwaiDice.Roll(rollEvent);
            BaseWisdom       = _currentShift.MogwaiDice.Roll(rollEvent);
            BaseCharisma     = _currentShift.MogwaiDice.Roll(rollEvent);

            BaseSpeed = 30;

            NaturalArmor = 0;
            SizeType     = SizeType.Medium;

            BaseAttackBonus = new[] { 0 };

            Faction = Faction.Hero;

            // create experience
            Experience = new Experience(_currentShift);

            // create slot types
            Equipment.CreateEquipmentSlots(new[] {
                SlotType.Head, SlotType.Shoulders, SlotType.Neck,
                SlotType.Chest, SlotType.Armor, SlotType.Belt, SlotType.Wrists,
                SlotType.Hands, SlotType.Ring, SlotType.Ring, SlotType.Feet
            });

            // add weapon slot
            Equipment.WeaponSlots.Add(new WeaponSlot());

            // add simple weapon
            var baseWeapon = Weapons.Instance.ByName("Warhammer");

            AddToInventory(baseWeapon);
            EquipWeapon(baseWeapon);

            // add simple studded leather as armor
            //Equipment.Armor = Armors.StuddedLeather;
            var baseArmor = Armors.Instance.ByName("Studded Leather");

            AddToInventory(baseArmor);
            EquipItem(SlotType.Armor, baseArmor);

            HitPointDice     = 6;
            CurrentHitPoints = MaxHitPoints;

            EnvironmentTypes = new[] { EnvironmentType.Any };

            // create home town
            HomeTown = new HomeTown(_currentShift);
        }
Ejemplo n.º 2
0
 public Coat(HexValue hexValue)
 {
     All.ForEach(p => p.CreateValue(hexValue));
 }
Ejemplo n.º 3
0
 public Body(HexValue hexValue)
 {
     All.ForEach(p => p.CreateValue(hexValue));
 }