Esempio n. 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;
        }
Esempio n. 2
0
 // Use this for initialization
 public override void Start()
 {
     try{
         gameObject.name = NameGen.GenerateName("L4N2");
     }
     catch {
         Debug.Log("NameGen failed");
         gameObject.name = "NAMEGEN_ERROR";
     }
     shipClass = GetComponent <ShipClass> ();
     Collections.Freighters.Add(this);
     Collections.Available.Add(this);
     agent      = GetComponent <NavMeshAgent> ();
     controller = GameObject.FindGameObjectWithTag("Controller");
 }
Esempio n. 3
0
        public void GenerateNameTest()
        {
            var hexValue =
                new HexValue(
                    new Shift(0,
                              1530914381,
                              "32ad9e02792599dfdb6a9d0bc0b924da23bd96b1b7eb4f0a68",
                              7234,
                              "00000000090d6c6b058227bb61ca2915a84998703d4444cc2641e6a0da4ba37e",
                              2,
                              "163d2e383c77765232be1d9ed5e06749a814de49b4c0a8aebf324c0e9e2fd1cf",
                              1.00m,
                              0.0001m));

            Assert.Equal("Vihiryne", NameGen.GenerateName(hexValue));
        }
Esempio n. 4
0
 // Use this for initialization
 void Start()
 {
     NodeID = NameGen.GenerateName("L3N2L1");
 }
Esempio n. 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);
        }