Beispiel #1
0
        public Mogwai(string key, Dictionary <double, Shift> shifts)
        {
            Key    = key;
            Shifts = shifts;

            currentShift = shifts.Values.First();

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

            blockHeight = currentShift.Height;
            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
            int[] rollEvent = new int[] { 4, 6, 3 };
            Gender       = currentShift.MogwaiDice.Roll(2, -1);
            Strength     = currentShift.MogwaiDice.Roll(rollEvent);
            Dexterity    = currentShift.MogwaiDice.Roll(rollEvent);
            Constitution = currentShift.MogwaiDice.Roll(rollEvent);
            Inteligence  = currentShift.MogwaiDice.Roll(rollEvent);
            Wisdom       = currentShift.MogwaiDice.Roll(rollEvent);
            Charisma     = currentShift.MogwaiDice.Roll(rollEvent);

            BaseSpeed = 30;

            NaturalArmor = 0;
            SizeType     = SizeType.MEDIUM;

            BaseAttackBonus = new int[] { 0 };

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

            // add simple rapier as weapon
            Equipment.PrimaryWeapon = Weapons.Rapier;

            // add simple rapier as weapon
            Equipment.Armor = Armors.StuddedLeather;

            HitPointDice     = 8;
            CurrentHitPoints = MaxHitPoints;
        }
Beispiel #2
0
        /// <inheritdoc />
        public override void AddExp(double exp, Monster.Monster monster = null)
        {
            string msg = monster == null
                    ? $"You just earned +{Coloring.Exp(exp)} experience!"
                    : $"The {Coloring.Name(monster.Name)} gave you +{Coloring.Exp(exp)}!";

            History.Add(LogType.Info, msg);
            Adventure?.LogEntries.Enqueue(new LogEntry(LogType.Info, msg));

            Exp += exp;

            while (Exp >= XpToLevelUp)
            {
                CurrentLevel += 1;
                LevelShifts.Add(_currentShift.Height);
                LevelUp();
            }
        }
Beispiel #3
0
        /// <inheritdoc />
        public override void AddExp(double exp, Monster.Monster monster = null)
        {
            var activity = ActivityLog.Create(ActivityLog.ActivityType.Exp, ActivityLog.ActivityState.None, new int[] { (int)exp }, monster);

            History.Add(LogType.Info, activity);
            if (Adventure != null)
            {
                Adventure.Enqueue(AdventureLog.Info(this, null, activity));
                Adventure.AdventureStats[AdventureStats.Experience] = Adventure.AdventureStats[AdventureStats.Experience] + exp;
            }

            Exp += exp;

            while (Exp >= XpToLevelUp)
            {
                CurrentLevel += 1;
                LevelShifts.Add(_currentShift.Height);
                LevelUp();
            }
        }
Beispiel #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="exp"></param>
        /// <param name="monster"></param>
        public override void AddExp(double exp, Monster monster = null)
        {
            if (monster == null)
            {
                History.Add(LogType.INFO, $"You just earned ¬G+{exp}§ experience!¬");
            }
            else
            {
                History.Add(LogType.INFO, $"The ¬C{monster.Name}§ gave you ¬G+{exp}§!¬");
            }

            Exp += exp;

            if (Exp >= XpToLevelUp)
            {
                CurrentLevel += 1;
                LevelShifts.Add(currentShift.Height);
                LevelUp(currentShift);
            }
        }
Beispiel #5
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);
        }