Exemplo n.º 1
0
 public void InitManualCreation()
 {
     for (Int32 i = 0; i < 4; i++)
     {
         m_dummyChars[i] = new DummyCharacter();
     }
 }
Exemplo n.º 2
0
        public void AssignRandomAttributes(DummyCharacter p_character)
        {
            p_character.ResetAttributes();
            for (Int32 i = 0; i < 5; i++)
            {
                switch (Random.Range(0, 6))
                {
                case 0:
                    p_character.IncreaseMight();
                    break;

                case 1:
                    p_character.IncreaseMagic();
                    break;

                case 2:
                    p_character.IncreasePerception();
                    break;

                case 3:
                    p_character.IncreaseDestiny();
                    break;

                case 4:
                    p_character.IncreaseVitality();
                    break;

                case 5:
                    p_character.IncreaseSpirit();
                    break;
                }
            }
        }
Exemplo n.º 3
0
        public EClass GetUnusedClass()
        {
            DummyCharacter selectedDummyCharacter = GetSelectedDummyCharacter();
            List <EClass>  classListForRace       = GetClassListForRace(selectedDummyCharacter.Race);

            for (Int32 i = 0; i < 4; i++)
            {
                if (m_dummyChars[i].Class != EClass.NONE)
                {
                    classListForRace.Remove(m_dummyChars[i].Class);
                }
            }
            EClass result;

            if (classListForRace.Count > 0)
            {
                result = classListForRace[Random.Range(0, classListForRace.Count)];
            }
            else
            {
                classListForRace = GetClassListForRace(selectedDummyCharacter.Race);
                result           = classListForRace[Random.Range(0, classListForRace.Count)];
            }
            return(result);
        }
Exemplo n.º 4
0
        public String GetRandomName(DummyCharacter c)
        {
            CharacterClassStaticData staticData = StaticDataHandler.GetStaticData <CharacterClassStaticData>(EDataType.CHARACTER_CLASS, (Int32)c.Class);

            String[] array;
            if (c.Gender == EGender.MALE)
            {
                array = staticData.DefaultMaleNames;
            }
            else
            {
                array = staticData.DefaultFemaleNames;
            }
            return(Localization.Instance.GetText(array[Random.Range(0, array.Length)]));
        }
Exemplo n.º 5
0
        public void AssignRandomSkills(DummyCharacter p_character)
        {
            CharacterClassStaticData staticData = StaticDataHandler.GetStaticData <CharacterClassStaticData>(EDataType.CHARACTER_CLASS, (Int32)p_character.Class);
            List <Int32>             list       = new List <Int32>();
            List <Int32>             list2      = new List <Int32>(staticData.StartSkills);

            p_character.ResetPickedSkills();
            for (Int32 i = 0; i < staticData.GrandMasterSkills.Length; i++)
            {
                Int32 num = staticData.GrandMasterSkills[i];
                if (!p_character.IsSkillPicked(num) && !list2.Contains(num))
                {
                    list.Add(num);
                }
            }
            for (Int32 j = 0; j < staticData.MasterSkills.Length; j++)
            {
                Int32 num2 = staticData.MasterSkills[j];
                if (!p_character.IsSkillPicked(num2) && !list2.Contains(num2))
                {
                    list.Add(num2);
                }
            }
            for (Int32 k = 0; k < staticData.ExpertSkills.Length; k++)
            {
                Int32 num3 = staticData.ExpertSkills[k];
                if (!p_character.IsSkillPicked(num3) && !list2.Contains(num3))
                {
                    list.Add(num3);
                }
            }
            Int32 num4 = (staticData.Race != ERace.HUMAN) ? 2 : 4;

            for (Int32 l = 0; l < num4; l++)
            {
                Int32 index = Random.Range(0, list.Count);
                p_character.PickSkill(list[index]);
                list.RemoveAt(index);
            }
        }