Example #1
0
        //ticket status enum (added, removed)
        public void UpdateAirline(int airNumber, byte ticketStatus, ClassEnum ticketType)
        {
            var airLine = this[airNumber];

            switch (ticketStatus)
            {
            case 1:
                if (ticketType == ClassEnum.Business || airLine.FreeBSeats != 0)
                {
                    airLine.FreeBSeats--;
                    return;
                }

                if (airLine.FreeESeats != 0)
                {
                    airLine.FreeESeats--;
                }

                break;

            case 2:
                if (ticketType == ClassEnum.Business)
                {
                    airLine.FreeBSeats++;
                }
                else
                {
                    airLine.FreeESeats++;
                }
                break;
            }
        }
Example #2
0
        private void Testing(ClassEnum classEnum)
        {
            try
            {
                testPath = ReaderWriter.ReaderWriter.CreateTestFile(testsDictionary[classEnum]);

                reader = new ReaderWriter.ReaderGraph(testPath, false);
                graph  = reader.ReadFile();

                stringBuilder.AppendLine(classEnum.ToString());
                stringBuilder.AppendLine("Graph created.");
                stringBuilder.AppendLine(graph.ToString());

                GraphClass.GraphClassEnum graphClassEnum = GraphClass.GetGraphClass(graph);

                stringBuilder.AppendLine("Graph class: " + graphClassEnum.ToString());
            }
            catch (KeyNotFoundException)
            {
                throw new MyException.TestsException.TestsMissingTestException(classEnum.ToString());
            }
            catch (MyException.ReaderWriterException.ReaderWriterException e)
            {
                stringBuilder.AppendLine(e.Message);
            }
        }
Example #3
0
    public override void OnInspectorGUI()
    {
        serializedObject.Update();

        base.OnInspectorGUI();
        Unit thisUnit = (Unit)this.target;

        if (thisUnit._classBool == null || thisUnit._classBool.Length < ClassEnum.GetNames(typeof(ClassEnum)).Length)
        {
            thisUnit._classBool = new bool[ClassEnum.GetNames(typeof(ClassEnum)).Length];
        }

        if (GUILayout.Button("UpdateList"))
        {
            thisUnit._canKill = new List <ClassEnum>(_canKill);
        }

        _canKill.Clear();
        foreach (ClassEnum classEnum in ClassEnum.GetValues(typeof(ClassEnum)))
        {
            EditorGUILayout.BeginHorizontal();
            GUILayout.Label(classEnum.ToString());
            GUILayout.FlexibleSpace();
            thisUnit._classBool[(int)classEnum] = EditorGUILayout.Toggle(thisUnit._classBool[(int)classEnum]);
            if (thisUnit._classBool[(int)classEnum])
            {
                _canKill.Add(classEnum);
            }
            GUILayout.Space(100);
            EditorGUILayout.EndHorizontal();
        }

        serializedObject.ApplyModifiedProperties();
    }
Example #4
0
 private void AddClassToListIfPresent(ClassEnum aClassEnum, List <ClassEnum> aList)
 {
     if (Classes.HasFlag(aClassEnum))
     {
         aList.Add(aClassEnum);
     }
 }
Example #5
0
        /// <summary>
        /// Test a particular enum (file)
        /// </summary>
        /// <param name="graphEnum">enum (file)</param>
        /// <returns>report</returns>
        public StringBuilder Test(ClassEnum classEnum)
        {
            stringBuilder.Clear();

            Testing(classEnum);

            return(stringBuilder);
        }
Example #6
0
        private static void ExtractStepInfo(Guide aGuide, Step aStep, string aFileContents, string aStepDirectory)
        {
            aStep.IsValid = true;

            bool validTitleFound      = false;
            bool validStepNumberFound = false;
            bool wasNewLine           = true;

            for (int index = 0; index < aFileContents.Length; index++)
            {
                var character = aFileContents[index];
                if (wasNewLine && character == '#')
                {
                    continue;
                }

                wasNewLine = character == '\r' || character == '\n';
                if (TagParser.ParseTag(aFileContents, ref index, out var tag, out var tagContent, out var attributes, isIncrementIndex: true))
                {
                    if (SimpleTags.IsTag(SimpleTags.Tag.Title, tag))
                    {
                        aStep.Title     = SimpleTags.GetContent <string>(tagContent);
                        validTitleFound = !string.IsNullOrEmpty(aStep.Title);
                    }
                    else if (SimpleTags.IsTag(SimpleTags.Tag.Image, tag))
                    {
                        ClassEnum classEnum = ClassEnum.All;
                        if (attributes.ContainsKey("class")) //TODO make hard reference
                        {
                            classEnum = SimpleTags.GetContent <ClassEnum>(attributes["class"]);
                        }

                        aStep.ImageSources[classEnum] = Path.Combine(aStepDirectory, SimpleTags.GetContent <string>(tagContent));
                    }
                    else if (SimpleTags.IsTag(SimpleTags.Tag.StepNumber, tag))
                    {
                        aStep.StepNumber     = SimpleTags.GetContent <int>(tagContent);
                        validStepNumberFound = true;
                    }
                    else if (SimpleTags.IsTag(SimpleTags.Tag.SubStep, tag))
                    {
                        SubStep subStep = SubStep.Parse(aGuide, aStep, attributes, tagContent);
                        if (subStep.IsValid)
                        {
                            aStep.SubSteps.Add(subStep);
                        }
                    }
                }
            }

            aStep.ValidateImageSources();
            if (!validTitleFound || !validStepNumberFound)
            {
                aStep.IsValid = false;
            }
        }
Example #7
0
 public Npc(IList <Dialogue> Dialogue, NpcRaceEnum Race, ClassEnum Class, string Name, string Description, int CurrentHealth, int MaxHealth, int BaseDamage) : this()
 {
     this.StartingDialogue = Dialogue;
     this.Race             = Race;
     this.Class            = Class;
     this.Name             = Name;
     this.Description      = Description;
     this.CurrentHealth    = CurrentHealth;
     this.MaxHealth        = MaxHealth;
     this.BaseDamage       = BaseDamage;
 }
        public PlayerCharacter( Armor[] armor, string name, int[] stats, Weapon weapon, LevelTract pclass, ClassEnum classes )
            : base(armor,  name, stats, weapon, pclass)
        {
            /* start constructor */

            mExperience = 1000;
            mClass = pclass;
            mIsPlayer = true;
            mClassEnum = classes;

            mClass.LevelUp(1);
        }
Example #9
0
        public bool GetValue <TEnum, TValue>(out TEnum value, IParameter <ClassEnum <TValue, TEnum> > param)
            where TEnum : ClassEnum <TValue, TEnum>
        {
            if (Invoke(out TValue result, nameof(GetValue), param))
            {
                value = ClassEnum <TValue, TEnum> .GetEnumForValue(result);

                return(true);
            }
            value = null;
            return(false);
        }
Example #10
0
 private Player(Inventory Inventory, PlayerRaceEnum Race, string Gender, ClassEnum Class, string Name, DateTime LastSaveDateTime, IList <LanguageEnum> KnownLanguages,
                int CurrentHealth)
 {
     this.Inventory        = Inventory;
     this.CurrentHealth    = CurrentHealth;
     this.Race             = Race;
     this.Gender           = Gender;
     this.Class            = Class;
     this.Name             = Name;
     this.LastSaveDateTime = LastSaveDateTime;
     this.KnownLanguages   = KnownLanguages;
 }
Example #11
0
        //Check Character class and set's appropriate Attributes
        public void CheckClass(ClassEnum classType)
        {
            CharacterClass checkclass = new CharacterClass();

            checkclass.swapStats(classType);
            this.Name        = checkclass.ClassName;
            this.Attack      = checkclass.Attack;
            this.Speed       = checkclass.Speed;
            this.Defense     = checkclass.Defense;
            this.ClassName   = checkclass.ClassName;
            this.EntityImage = checkclass.ClassImage;
            this.Description = checkclass.Description;
        }
        private bool HasMoreVisibleSubSteps(SubStep aSubStep, ClassEnum aClassEnum)
        {
            if (aSubStep.NextSubSteps.Any(ss => ss.HasClass(aClassEnum)))
            {
                return(true);
            }

            foreach (var subStep in aSubStep.NextSubSteps)
            {
                return(HasMoreVisibleSubSteps(subStep, aClassEnum));
            }

            return(false);
        }
Example #13
0
 public void UpdateClass(float value)
 {
     if (value <= 2)
     {
         Class = ClassEnum.Negative;
     }
     else if (value >= 4)
     {
         Class = ClassEnum.Positive;
     }
     else
     {
         Class = ClassEnum.Neutral;
     }
 }
Example #14
0
        public PlayerCharacter NewCharacter(string name, RaceEnum race, ClassEnum characterClass, Abilities startingAbilities)
        {
            var newCharacter = new PlayerCharacter();

            newCharacter.Name  = name;
            newCharacter.Race  = GetRace(race);
            newCharacter.Class = GetClass(characterClass);

            newCharacter.SetStartingAbilities(startingAbilities);
            newCharacter.SetStartingHP();

            newCharacter.ApplyTraitsFromRace();

            return(newCharacter);
        }
Example #15
0
 public static int AddLeague(string name, DateTime year, LeagueTypeEnum type, ClassEnum classname, short rounds)
 {
     return(Network.Post <LeagueModel, int>(new HTTPPostRequestModel <LeagueModel>
     {
         Url = "/api/floorball/leagues",
         ErrorMsg = "Error during adding league!",
         Body = new LeagueModel
         {
             Name = name,
             Year = year,
             Type = type,
             Class = classname,
             Rounds = rounds
         }
     }));
 }
Example #16
0
        public static void IncrementUse(ClassEnum ce, Token t)
        {
            if (!ClassCount.ContainsKey(ce))
            {
                ClassCount.Add(ce, 0);
                ClassOccurances.Add(ce, new Dictionary <Token, int>());
            }
            ClassCount[ce]++;

            if (!ClassOccurances[ce].ContainsKey(t))
            {
                ClassOccurances[ce][t] = 0;
            }

            ClassOccurances[ce][t]++;
        }
Example #17
0
        public Class GetClass(ClassEnum className)
        {
            var settings = new JsonSerializerSettings()
            {
                TypeNameHandling = TypeNameHandling.All
            };

            var classList = JsonConvert.DeserializeObject <List <Class> >(ClassFile, settings);

            var characterClass = classList.FirstOrDefault(x => x.Type == className);

            if (characterClass == null)
            {
                _logger.LogError("There is no class by that name in the repository.");
            }

            return(characterClass);
        }
Example #18
0
        //Method to set character default name and images depending on enum
        public void swapStats(ClassEnum id)
        {
            switch (id)
            {
            case ClassEnum.Warrior:
                Warrior();
                ClassName  = "Warrior";
                ClassImage = "WarriorClass.png";
                break;

            case ClassEnum.Wizard:
                Wizard();
                ClassName  = "Wizard";
                ClassImage = "WizardClass.png";
                break;

            case ClassEnum.Rogue:
                Rogue();
                ClassName  = "Rogue";
                ClassImage = "RogueClass.png";
                break;

            case ClassEnum.Cleric:
                Cleric();
                ClassName  = "Cleric";
                ClassImage = "ClericClass.png";
                break;

            case ClassEnum.Ranger:
                Ranger();
                ClassName  = "Ranger";
                ClassImage = "RangerClass.png";
                break;

            case ClassEnum.Druid:
                Druid();
                ClassName  = "Druid";
                ClassImage = "DruidClass.png";
                break;

            default:
                break;
            }
        }
Example #19
0
        public void NewCharacter_GivenClassAndConstitution_ShouldStartWithExpectedHP(
            RaceEnum characterRace,
            ClassEnum characterClass,
            int constitution,
            int expectedStartingHP)
        {
            // Arrange
            var creator           = new PlayerCharacterCreator();
            var startingAbilities = new Abilities
            {
                Constitution = constitution,
            };

            // Act
            var character = creator.NewCharacter("Player Name", characterRace, characterClass, startingAbilities);

            // Assert
            Assert.AreEqual(expectedStartingHP, character.HP);
        }
        internal void SetClass(ClassEnum aClassEnum)
        {
            _selectedClass = aClassEnum;
            RaisePropertyChanged(nameof(StepImageSource));

            int stepNumber = 1;

            foreach (var subStepViewModel in SubStepItemsSource.Select(stv => stv.ViewModel))
            {
                if (subStepViewModel.SubStep.HasClass(aClassEnum))
                {
                    subStepViewModel.Update(stepNumber++, HasMoreVisibleSubSteps(subStepViewModel.SubStep, aClassEnum));
                    subStepViewModel.Visibility = Visibility.Visible;
                }
                else
                {
                    subStepViewModel.Visibility = Visibility.Collapsed;
                }
            }
        }
Example #21
0
        private Class GetClass(ClassEnum characterClass)
        {
            switch (characterClass)
            {
            case ClassEnum.Fighter:
                return(new Fighter());

            case ClassEnum.Cleric:
                return(new Cleric());

            case ClassEnum.Ranger:
                return(new Ranger());

            case ClassEnum.Rogue:
                return(new Rogue());

            case ClassEnum.Wizard:
                return(new Wizard());

            default:
                throw new InvalidOperationException("Class not defined");
            }
        }
        public static Character getCharacter( ClassEnum classes, String name )
        {
            /* start getCharacter */

            if( classes == ClassEnum.REDMAGE )
                return getRedMage( name );

            if (classes == ClassEnum.WHITEMAGE)
               return getRedMage( name );// return getWhiteMage( name );

            if (classes == ClassEnum.BLACKMAGE)
              return getRedMage( name );//  return getBlackMage( name );

            if (classes == ClassEnum.WARRIOR)
               return getRedMage( name );// return getWarrior( name );//

            if (classes == ClassEnum.THEIF)
               return getRedMage( name );// return getTheif( name );

            if (classes == ClassEnum.MONK)
                return getRedMage(name);// return getBlackMage( name );

            return null;
        }
        public Character getCharacter( ClassEnum classes, String name )
        {
            /* start getCharacter */

            if( classes == ClassEnum.REDMAGE )
                setRedMage();

            if (classes == ClassEnum.WHITEMAGE)
                setWhiteMage();

            if (classes == ClassEnum.BLACKMAGE)
                setBlackMage( );

            if (classes == ClassEnum.WARRIOR)
                setWarrior();

            if (classes == ClassEnum.THEIF)
                setTheif();

            if (classes == ClassEnum.MONK)
                setMonk();

            return new PlayerCharacter(mArmor, name, mStats, mWeapon, mClass, classes);
        }
Example #24
0
        public Armor[] getBasicArmorSet( ClassEnum classes )
        {
            /* start getArmorSet */

            if (classes == ClassEnum.REDMAGE)
                setBasicRedMageArmor();

            if (classes == ClassEnum.WHITEMAGE)
                setBasicWhiteMageArmor();

            if (classes == ClassEnum.BLACKMAGE)
                setBasicBlackMageArmor();

            if (classes == ClassEnum.WARRIOR)
                setBasicWarriorArmor();

            if (classes == ClassEnum.THEIF)
                setBasicTheifArmor();

            if (classes == ClassEnum.MONK)
                setBasicMonkArmor();

            return mArmorSet;
        }
Example #25
0
        public static SpellBook GenerateForBreed(ClassEnum Class)
        {
            var Book = new SpellBook();

            switch (Class)
            {
            case ClassEnum.CLASS_FECA:
                Book.AddSpell(3, Position: 1);
                Book.AddSpell(6, Position: 2);
                Book.AddSpell(17, Position: 3);
                break;

            case ClassEnum.CLASS_OSAMODAS:
                Book.AddSpell(34, Position: 1);
                Book.AddSpell(21, Position: 2);
                Book.AddSpell(23, Position: 3);
                break;

            case ClassEnum.CLASS_ENUTROF:
                Book.AddSpell(51, Position: 1);
                Book.AddSpell(43, Position: 2);
                Book.AddSpell(41, Position: 3);
                break;

            case ClassEnum.CLASS_SRAM:
                Book.AddSpell(61, Position: 1);
                Book.AddSpell(72, Position: 2);
                Book.AddSpell(65, Position: 3);
                break;

            case ClassEnum.CLASS_XELOR:
                Book.AddSpell(82, Position: 1);
                Book.AddSpell(81, Position: 2);
                Book.AddSpell(83, Position: 3);
                break;

            case ClassEnum.CLASS_ECAFLIP:
                Book.AddSpell(102, Position: 1);
                Book.AddSpell(103, Position: 2);
                Book.AddSpell(105, Position: 3);
                break;

            case ClassEnum.CLASS_ENIRIPSA:
                Book.AddSpell(125, Position: 1);
                Book.AddSpell(128, Position: 2);
                Book.AddSpell(121, Position: 3);
                break;

            case ClassEnum.CLASS_IOP:
                Book.AddSpell(143, Position: 1);
                Book.AddSpell(141, Position: 2);
                Book.AddSpell(142, Position: 3);
                break;

            case ClassEnum.CLASS_CRA:
                Book.AddSpell(161, Position: 1);
                Book.AddSpell(169, Position: 2);
                Book.AddSpell(164, Position: 3);
                break;

            case ClassEnum.CLASS_SADIDA:
                Book.AddSpell(183, Position: 1);
                Book.AddSpell(200, Position: 2);
                Book.AddSpell(193, Position: 3);
                break;

            case ClassEnum.CLASS_SACRIEUR:
                Book.AddSpell(432, Position: 1);
                Book.AddSpell(431, Position: 2);
                Book.AddSpell(434, Position: 3);
                break;

            case ClassEnum.CLASS_PANDAWA:
                Book.AddSpell(686, Position: 1);
                Book.AddSpell(692, Position: 2);
                Book.AddSpell(687, Position: 3);
                break;
            }

            return(Book);
        }
Example #26
0
 public bool SetValue <TEnum, TValue>(IParameter <TEnum> param, ClassEnum <TValue, TEnum> enumClass)
     where TEnum : ClassEnum <TValue, TEnum>
 {
     return(Invoke(nameof(SetValue), param, enumClass));
 }
Example #27
0
 public bool HasClass(ClassEnum aClassEnum)
 {
     return(((int)ClassFlags & (int)aClassEnum) == (int)aClassEnum);
 }
        public int AddLeague(int id, string name, DateTime year, LeagueTypeEnum type, ClassEnum classname, short rounds, CountriesEnum country, GenderEnum gender)
        {
            using (var db = new SQLiteConnection(Platform, DatabasePath))
            {
                League l = new League();
                l.Id      = id;
                l.Name    = name;
                l.Year    = year;
                l.Type    = type;
                l.Class   = classname;
                l.Rounds  = rounds;
                l.Country = country;
                l.Gender  = gender;

                db.Insert(l);

                return(l.Id);
            }
        }
Example #29
0
 //Call swap stats with character class enum
 public CharacterClass(ClassEnum eenum)
 {
     swapStats(eenum);
 }
Example #30
0
 private ClassTester(ClassEnum @class)
 {
     this.@class = @class;
 }
Example #31
0
        public void GenerateLevelUpSpell(ClassEnum Class, int Level)
        {
            switch (Class)
            {
            case ClassEnum.CLASS_FECA:
                if (Level == 3)
                {
                    this.AddSpell(4);    //Renvoie de sort
                }
                if (Level == 6)
                {
                    this.AddSpell(2);    //Aveuglement
                }
                if (Level == 9)
                {
                    this.AddSpell(1);    //Armure Incandescente
                }
                if (Level == 13)
                {
                    this.AddSpell(9);    //Attaque nuageuse
                }
                if (Level == 17)
                {
                    this.AddSpell(18);    //Armure Aqueuse
                }
                if (Level == 21)
                {
                    this.AddSpell(20);    //Immunit�
                }
                if (Level == 26)
                {
                    this.AddSpell(14);    //Armure Venteuse
                }
                if (Level == 31)
                {
                    this.AddSpell(19);    //Bulle
                }
                if (Level == 36)
                {
                    this.AddSpell(5);    //Tr�ve
                }
                if (Level == 42)
                {
                    this.AddSpell(16);    //Science du b�ton
                }
                if (Level == 48)
                {
                    this.AddSpell(8);    //Retour du b�ton
                }
                if (Level == 54)
                {
                    this.AddSpell(12);    //glyphe d'Aveuglement
                }
                if (Level == 60)
                {
                    this.AddSpell(11);    //T�l�portation
                }
                if (Level == 70)
                {
                    this.AddSpell(10);    //Glyphe Enflamm�
                }
                if (Level == 80)
                {
                    this.AddSpell(7);    //Bouclier F�ca
                }
                if (Level == 90)
                {
                    this.AddSpell(15);    //Glyphe d'Immobilisation
                }
                if (Level == 100)
                {
                    this.AddSpell(13);    //Glyphe de Silence
                }
                if (Level == 200)
                {
                    this.AddSpell(1901);    //Invocation de Dopeul F�ca
                }
                break;

            case ClassEnum.CLASS_OSAMODAS:
                if (Level == 3)
                {
                    this.AddSpell(26);    //B�n�diction Animale
                }
                if (Level == 6)
                {
                    this.AddSpell(22);    //D�placement F�lin
                }
                if (Level == 9)
                {
                    this.AddSpell(35);    //Invocation de Bouftou
                }
                if (Level == 13)
                {
                    this.AddSpell(28);    //Crapaud
                }
                if (Level == 17)
                {
                    this.AddSpell(37);    //Invocation de Prespic
                }
                if (Level == 21)
                {
                    this.AddSpell(30);    //Fouet
                }
                if (Level == 26)
                {
                    this.AddSpell(27);    //Piq�re Motivante
                }
                if (Level == 31)
                {
                    this.AddSpell(24);    //Corbeau
                }
                if (Level == 36)
                {
                    this.AddSpell(33);    //Griffe Cinglante
                }
                if (Level == 42)
                {
                    this.AddSpell(25);    //Soin Animal
                }
                if (Level == 48)
                {
                    this.AddSpell(38);    //Invocation de Sanglier
                }
                if (Level == 54)
                {
                    this.AddSpell(36);    //Frappe du Craqueleur
                }
                if (Level == 60)
                {
                    this.AddSpell(32);    //R�sistance Naturelle
                }
                if (Level == 70)
                {
                    this.AddSpell(29);    //Crocs du Mulou
                }
                if (Level == 80)
                {
                    this.AddSpell(39);    //Invocation de Bwork Mage
                }
                if (Level == 90)
                {
                    this.AddSpell(40);    //Invocation de Craqueleur
                }
                if (Level == 100)
                {
                    this.AddSpell(31);    //Invocation de Dragonnet Rouge
                }
                if (Level == 200)
                {
                    this.AddSpell(1902);    //Invocation de Dopeul Osamodas
                }
                break;

            case ClassEnum.CLASS_ENUTROF:
                if (Level == 3)
                {
                    this.AddSpell(49);    //Pelle Fantomatique
                }
                if (Level == 6)
                {
                    this.AddSpell(42);    //Chance
                }
                if (Level == 9)
                {
                    this.AddSpell(47);    //Bo�te de Pandore
                }
                if (Level == 13)
                {
                    this.AddSpell(48);    //Remblai
                }
                if (Level == 17)
                {
                    this.AddSpell(45);    //Cl� R�ductrice
                }
                if (Level == 21)
                {
                    this.AddSpell(53);    //Force de l'Age
                }
                if (Level == 26)
                {
                    this.AddSpell(46);    //D�sinvocation
                }
                if (Level == 31)
                {
                    this.AddSpell(52);    //Cupidit�
                }
                if (Level == 36)
                {
                    this.AddSpell(44);    //Roulage de Pelle
                }
                if (Level == 42)
                {
                    this.AddSpell(50);    //Maladresse
                }
                if (Level == 48)
                {
                    this.AddSpell(54);    //Maladresse de Masse
                }
                if (Level == 54)
                {
                    this.AddSpell(55);    //Acc�l�ration
                }
                if (Level == 60)
                {
                    this.AddSpell(56);    //Pelle du Jugement
                }
                if (Level == 70)
                {
                    this.AddSpell(58);    //Pelle Massacrante
                }
                if (Level == 80)
                {
                    this.AddSpell(59);    //Corruption
                }
                if (Level == 90)
                {
                    this.AddSpell(57);    //Pelle Anim�e
                }
                if (Level == 100)
                {
                    this.AddSpell(60);    //Coffre Anim�
                }
                if (Level == 200)
                {
                    this.AddSpell(1903);    //Invocation de Dopeul Enutrof
                }
                break;

            case ClassEnum.CLASS_SRAM:
                if (Level == 3)
                {
                    this.AddSpell(66);    //Poison insidieux
                }
                if (Level == 6)
                {
                    this.AddSpell(68);    //Fourvoiement
                }
                if (Level == 9)
                {
                    this.AddSpell(63);    //Coup Sournois
                }
                if (Level == 13)
                {
                    this.AddSpell(74);    //Double
                }
                if (Level == 17)
                {
                    this.AddSpell(64);    //Rep�rage
                }
                if (Level == 21)
                {
                    this.AddSpell(79);    //Pi�ge de Masse
                }
                if (Level == 26)
                {
                    this.AddSpell(78);    //Invisibilit� d'Autrui
                }
                if (Level == 31)
                {
                    this.AddSpell(71);    //Pi�ge Empoisonn�
                }
                if (Level == 36)
                {
                    this.AddSpell(62);    //Concentration de Chakra
                }
                if (Level == 42)
                {
                    this.AddSpell(69);    //Pi�ge d'Immobilisation
                }
                if (Level == 48)
                {
                    this.AddSpell(77);    //Pi�ge de Silence
                }
                if (Level == 54)
                {
                    this.AddSpell(73);    //Pi�ge r�pulsif
                }
                if (Level == 60)
                {
                    this.AddSpell(67);    //Peur
                }
                if (Level == 70)
                {
                    this.AddSpell(70);    //Arnaque
                }
                if (Level == 80)
                {
                    this.AddSpell(75);    //Pulsion de Chakra
                }
                if (Level == 90)
                {
                    this.AddSpell(76);    //Attaque Mortelle
                }
                if (Level == 100)
                {
                    this.AddSpell(80);    //Pi�ge Mortel
                }
                if (Level == 200)
                {
                    this.AddSpell(1904);    //Invocation de Dopeul Sram
                }
                break;

            case ClassEnum.CLASS_XELOR:
                if (Level == 3)
                {
                    this.AddSpell(84);    //Gelure
                }
                if (Level == 6)
                {
                    this.AddSpell(100);    //Sablier de X�lor
                }
                if (Level == 9)
                {
                    this.AddSpell(92);    //Rayon Obscur
                }
                if (Level == 13)
                {
                    this.AddSpell(88);    //T�l�portation
                }
                if (Level == 17)
                {
                    this.AddSpell(93);    //Fl�trissement
                }
                if (Level == 21)
                {
                    this.AddSpell(85);    //Flou
                }
                if (Level == 26)
                {
                    this.AddSpell(96);    //Poussi�re Temporelle
                }
                if (Level == 31)
                {
                    this.AddSpell(98);    //Vol du Temps
                }
                if (Level == 36)
                {
                    this.AddSpell(86);    //Aiguille Chercheuse
                }
                if (Level == 42)
                {
                    this.AddSpell(89);    //D�vouement
                }
                if (Level == 48)
                {
                    this.AddSpell(90);    //Fuite
                }
                if (Level == 54)
                {
                    this.AddSpell(87);    //D�motivation
                }
                if (Level == 60)
                {
                    this.AddSpell(94);    //Protection Aveuglante
                }
                if (Level == 70)
                {
                    this.AddSpell(99);    //Momification
                }
                if (Level == 80)
                {
                    this.AddSpell(95);    //Horloge
                }
                if (Level == 90)
                {
                    this.AddSpell(91);    //Frappe de X�lor
                }
                if (Level == 100)
                {
                    this.AddSpell(97);    //Cadran de X�lor
                }
                if (Level == 200)
                {
                    this.AddSpell(1905);    //Invocation de Dopeul X�lor
                }
                break;

            case ClassEnum.CLASS_ECAFLIP:
                if (Level == 3)
                {
                    this.AddSpell(109);    //Bluff
                }
                if (Level == 6)
                {
                    this.AddSpell(113);    //Perception
                }
                if (Level == 9)
                {
                    this.AddSpell(111);    //Contrecoup
                }
                if (Level == 13)
                {
                    this.AddSpell(104);    //Tr�fle
                }
                if (Level == 17)
                {
                    this.AddSpell(119);    //Tout ou rien
                }
                if (Level == 21)
                {
                    this.AddSpell(101);    //Roulette
                }
                if (Level == 26)
                {
                    this.AddSpell(107);    //Topkaj
                }
                if (Level == 31)
                {
                    this.AddSpell(116);    //Langue R�peuse
                }
                if (Level == 36)
                {
                    this.AddSpell(106);    //Roue de la Fortune
                }
                if (Level == 42)
                {
                    this.AddSpell(117);    //Griffe Invocatrice
                }
                if (Level == 48)
                {
                    this.AddSpell(108);    //Esprit F�lin
                }
                if (Level == 54)
                {
                    this.AddSpell(115);    //Odorat
                }
                if (Level == 60)
                {
                    this.AddSpell(118);    //R�flexes
                }
                if (Level == 70)
                {
                    this.AddSpell(110);    //Griffe Joueuse
                }
                if (Level == 80)
                {
                    this.AddSpell(112);    //Griffe de Ceangal
                }
                if (Level == 90)
                {
                    this.AddSpell(114);    //Rekop
                }
                if (Level == 100)
                {
                    this.AddSpell(120);    //Destin d'Ecaflip
                }
                if (Level == 200)
                {
                    this.AddSpell(1906);    //Invocation de Dopeul Ecaflip
                }
                break;

            case ClassEnum.CLASS_ENIRIPSA:
                if (Level == 3)
                {
                    this.AddSpell(124);    //Mot Soignant
                }
                if (Level == 6)
                {
                    this.AddSpell(122);    //Mot Blessant
                }
                if (Level == 9)
                {
                    this.AddSpell(126);    //Mot Stimulant
                }
                if (Level == 13)
                {
                    this.AddSpell(127);    //Mot de Pr�vention
                }
                if (Level == 17)
                {
                    this.AddSpell(123);    //Mot Drainant
                }
                if (Level == 21)
                {
                    this.AddSpell(130);    //Mot Revitalisant
                }
                if (Level == 26)
                {
                    this.AddSpell(131);    //Mot de R�g�n�ration
                }
                if (Level == 31)
                {
                    this.AddSpell(132);    //Mot d'Epine
                }
                if (Level == 36)
                {
                    this.AddSpell(133);    //Mot de Jouvence
                }
                if (Level == 42)
                {
                    this.AddSpell(134);    //Mot Vampirique
                }
                if (Level == 48)
                {
                    this.AddSpell(135);    //Mot de Sacrifice
                }
                if (Level == 54)
                {
                    this.AddSpell(129);    //Mot d'Amiti�
                }
                if (Level == 60)
                {
                    this.AddSpell(136);    //Mot d'Immobilisation
                }
                if (Level == 70)
                {
                    this.AddSpell(137);    //Mot d'Envol
                }
                if (Level == 80)
                {
                    this.AddSpell(138);    //Mot de Silence
                }
                if (Level == 90)
                {
                    this.AddSpell(139);    //Mot d'Altruisme
                }
                if (Level == 100)
                {
                    this.AddSpell(140);    //Mot de Reconstitution
                }
                if (Level == 200)
                {
                    this.AddSpell(1907);    //Invocation de Dopeul Eniripsa
                }
                break;

            case ClassEnum.CLASS_IOP:
                if (Level == 3)
                {
                    this.AddSpell(144);    //Compulsion
                }
                if (Level == 6)
                {
                    this.AddSpell(145);    //Ep�e Divine
                }
                if (Level == 9)
                {
                    this.AddSpell(146);    //Ep�e du Destin
                }
                if (Level == 13)
                {
                    this.AddSpell(147);    //Guide de Bravoure
                }
                if (Level == 17)
                {
                    this.AddSpell(148);    //Amplification
                }
                if (Level == 21)
                {
                    this.AddSpell(154);    //Ep�e Destructrice
                }
                if (Level == 26)
                {
                    this.AddSpell(150);    //Couper
                }
                if (Level == 31)
                {
                    this.AddSpell(151);    //Souffle
                }
                if (Level == 36)
                {
                    this.AddSpell(155);    //Vitalit�
                }
                if (Level == 42)
                {
                    this.AddSpell(152);    //Ep�e du Jugement
                }
                if (Level == 48)
                {
                    this.AddSpell(153);    //Puissance
                }
                if (Level == 54)
                {
                    this.AddSpell(149);    //Mutilation
                }
                if (Level == 60)
                {
                    this.AddSpell(156);    //Temp�te de Puissance
                }
                if (Level == 70)
                {
                    this.AddSpell(157);    //Ep�e C�leste
                }
                if (Level == 80)
                {
                    this.AddSpell(158);    //Concentration
                }
                if (Level == 90)
                {
                    this.AddSpell(160);    //Ep�e de Iop
                }
                if (Level == 100)
                {
                    this.AddSpell(159);    //Col�re de Iop
                }
                if (Level == 200)
                {
                    this.AddSpell(1908);    //Invocation de Dopeul Iop
                }
                break;

            case ClassEnum.CLASS_CRA:
                if (Level == 3)
                {
                    this.AddSpell(163);    //Fl�che Glac�e
                }
                if (Level == 6)
                {
                    this.AddSpell(165);    //Fl�che enflamm�e
                }
                if (Level == 9)
                {
                    this.AddSpell(172);    //Tir Eloign�
                }
                if (Level == 13)
                {
                    this.AddSpell(167);    //Fl�che d'Expiation
                }
                if (Level == 17)
                {
                    this.AddSpell(168);    //Oeil de Taupe
                }
                if (Level == 21)
                {
                    this.AddSpell(162);    //Tir Critique
                }
                if (Level == 26)
                {
                    this.AddSpell(170);    //Fl�che d'Immobilisation
                }
                if (Level == 31)
                {
                    this.AddSpell(171);    //Fl�che Punitive
                }
                if (Level == 36)
                {
                    this.AddSpell(166);    //Tir Puissant
                }
                if (Level == 42)
                {
                    this.AddSpell(173);    //Fl�che Harcelante
                }
                if (Level == 48)
                {
                    this.AddSpell(174);    //Fl�che Cinglante
                }
                if (Level == 54)
                {
                    this.AddSpell(176);    //Fl�che Pers�cutrice
                }
                if (Level == 60)
                {
                    this.AddSpell(175);    //Fl�che Destructrice
                }
                if (Level == 70)
                {
                    this.AddSpell(178);    //Fl�che Absorbante
                }
                if (Level == 80)
                {
                    this.AddSpell(177);    //Fl�che Ralentissante
                }
                if (Level == 90)
                {
                    this.AddSpell(179);    //Fl�che Explosive
                }
                if (Level == 100)
                {
                    this.AddSpell(180);    //Ma�trise de l'Arc
                }
                if (Level == 200)
                {
                    this.AddSpell(1909);    //Invocation de Dopeul Cra
                }
                break;

            case ClassEnum.CLASS_SADIDA:
                if (Level == 3)
                {
                    this.AddSpell(198);    //Sacrifice Poupesque
                }
                if (Level == 6)
                {
                    this.AddSpell(195);    //Larme
                }
                if (Level == 9)
                {
                    this.AddSpell(182);    //Invocation de la Folle
                }
                if (Level == 13)
                {
                    this.AddSpell(192);    //Ronce Apaisante
                }
                if (Level == 17)
                {
                    this.AddSpell(197);    //Puissance Sylvestre
                }
                if (Level == 21)
                {
                    this.AddSpell(189);    //Invocation de la Sacrifi�e
                }
                if (Level == 26)
                {
                    this.AddSpell(181);    //Tremblement
                }
                if (Level == 31)
                {
                    this.AddSpell(199);    //Connaissance des Poup�es
                }
                if (Level == 36)
                {
                    this.AddSpell(191);    //Ronce Multiples
                }
                if (Level == 42)
                {
                    this.AddSpell(186);    //Arbre
                }
                if (Level == 48)
                {
                    this.AddSpell(196);    //Vent Empoisonn�
                }
                if (Level == 54)
                {
                    this.AddSpell(190);    //Invocation de la Gonflable
                }
                if (Level == 60)
                {
                    this.AddSpell(194);    //Ronces Agressives
                }
                if (Level == 70)
                {
                    this.AddSpell(185);    //Herbe Folle
                }
                if (Level == 80)
                {
                    this.AddSpell(184);    //Feu de Brousse
                }
                if (Level == 90)
                {
                    this.AddSpell(188);    //Ronce Insolente
                }
                if (Level == 100)
                {
                    this.AddSpell(187);    //Invocation de la Surpuissante
                }
                if (Level == 200)
                {
                    this.AddSpell(1910);    //Invocation de Dopeul Sadida
                }
                break;

            case ClassEnum.CLASS_SACRIEUR:
                if (Level == 3)
                {
                    this.AddSpell(444);    //D�robade
                }
                if (Level == 6)
                {
                    this.AddSpell(449);    //D�tour
                }
                if (Level == 9)
                {
                    this.AddSpell(436);    //Assaut
                }
                if (Level == 13)
                {
                    this.AddSpell(437);    //Ch�timent Agile
                }
                if (Level == 17)
                {
                    this.AddSpell(439);    //Dissolution
                }
                if (Level == 21)
                {
                    this.AddSpell(433);    //Ch�timent Os�
                }
                if (Level == 26)
                {
                    this.AddSpell(443);    //Ch�timent Spirituel
                }
                if (Level == 31)
                {
                    this.AddSpell(440);    //Sacrifice
                }
                if (Level == 36)
                {
                    this.AddSpell(442);    //Absorption
                }
                if (Level == 42)
                {
                    this.AddSpell(441);    //Ch�timent Vilatesque
                }
                if (Level == 48)
                {
                    this.AddSpell(445);    //Coop�ration
                }
                if (Level == 54)
                {
                    this.AddSpell(438);    //Transposition
                }
                if (Level == 60)
                {
                    this.AddSpell(446);    //Punition
                }
                if (Level == 70)
                {
                    this.AddSpell(447);    //Furie
                }
                if (Level == 80)
                {
                    this.AddSpell(448);    //Ep�e Volante
                }
                if (Level == 90)
                {
                    this.AddSpell(435);    //Tansfert de Vie
                }
                if (Level == 100)
                {
                    this.AddSpell(450);    //Folie Sanguinaire
                }
                if (Level == 200)
                {
                    this.AddSpell(1911);    //Invocation de Dopeul Sacrieur
                }
                break;

            case ClassEnum.CLASS_PANDAWA:
                if (Level == 3)
                {
                    this.AddSpell(689);    //Epouvante
                }
                if (Level == 6)
                {
                    this.AddSpell(690);    //Souffle Alcoolis�
                }
                if (Level == 9)
                {
                    this.AddSpell(691);    //Vuln�rabilit� Aqueuse
                }
                if (Level == 13)
                {
                    this.AddSpell(688);    //Vuln�rabilit� Incandescente
                }
                if (Level == 17)
                {
                    this.AddSpell(693);    //Karcham
                }
                if (Level == 21)
                {
                    this.AddSpell(694);    //Vuln�rabilit� Venteuse
                }
                if (Level == 26)
                {
                    this.AddSpell(695);    //Stabilisation
                }
                if (Level == 31)
                {
                    this.AddSpell(696);    //Chamrak
                }
                if (Level == 36)
                {
                    this.AddSpell(697);    //Vuln�rabilit� Terrestre
                }
                if (Level == 42)
                {
                    this.AddSpell(698);    //Souillure
                }
                if (Level == 48)
                {
                    this.AddSpell(699);    //Lait de Bambou
                }
                if (Level == 54)
                {
                    this.AddSpell(700);    //Vague � Lame
                }
                if (Level == 60)
                {
                    this.AddSpell(701);    //Col�re de Zato�shwan
                }
                if (Level == 70)
                {
                    this.AddSpell(702);    //Flasque Explosive
                }
                if (Level == 80)
                {
                    this.AddSpell(703);    //Pandatak
                }
                if (Level == 90)
                {
                    this.AddSpell(704);    //Pandanlku
                }
                if (Level == 100)
                {
                    this.AddSpell(705);    //Lien Spiritueux
                }
                if (Level == 200)
                {
                    this.AddSpell(1912);    //Invocation de Dopeul Pandawa
                }
                break;
            }
        }
        public List<Ability> getBasicAbilities(ClassEnum classes)
        {
            /* start getBasicAbilities */

            List<Ability> abilities = new List<Ability>();

            if (classes == ClassEnum.REDMAGE)
                addRedMageBasicAbilities(abilities);

            if (classes == ClassEnum.WHITEMAGE)
                abilities.Add(getAbility(AbilitesEnum.KISSBOOBOO));

            if (classes == ClassEnum.BLACKMAGE)
                abilities.Add(getAbility(AbilitesEnum.BREEZE));

            if (classes == ClassEnum.WARRIOR)
                abilities.Add(getAbility(AbilitesEnum.POKE));

            if (classes == ClassEnum.THEIF)
                abilities.Add(getAbility(AbilitesEnum.TRIP));

            if(classes == ClassEnum.MONK)
                abilities.Add(getAbility(AbilitesEnum.PALM));

            return abilities;
        }
Example #33
0
        public static int GetRequiredStatsPoint(ClassEnum classID, int statID, int val)
        {
            switch (statID)
            {
            case 11:    //Vita
                return(1);

            case 12:    //Sage
                return(3);

            case 10:    //Force
                switch (classID)
                {
                case ClassEnum.CLASS_SACRIEUR:
                    return(3);

                case ClassEnum.CLASS_FECA:
                    if (val < 50)
                    {
                        return(2);
                    }
                    if (val < 150)
                    {
                        return(3);
                    }
                    if (val < 250)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_XELOR:
                    if (val < 50)
                    {
                        return(2);
                    }
                    if (val < 150)
                    {
                        return(3);
                    }
                    if (val < 250)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_SRAM:
                    if (val < 100)
                    {
                        return(1);
                    }
                    if (val < 200)
                    {
                        return(2);
                    }
                    if (val < 300)
                    {
                        return(3);
                    }
                    if (val < 400)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_OSAMODAS:
                    if (val < 50)
                    {
                        return(2);
                    }
                    if (val < 150)
                    {
                        return(3);
                    }
                    if (val < 250)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_ENIRIPSA:
                    if (val < 50)
                    {
                        return(2);
                    }
                    if (val < 150)
                    {
                        return(3);
                    }
                    if (val < 250)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_PANDAWA:
                    if (val < 50)
                    {
                        return(1);
                    }
                    if (val < 200)
                    {
                        return(2);
                    }
                    return(3);

                case ClassEnum.CLASS_SADIDA:
                    if (val < 50)
                    {
                        return(1);
                    }
                    if (val < 250)
                    {
                        return(2);
                    }
                    if (val < 300)
                    {
                        return(3);
                    }
                    if (val < 400)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_CRA:
                    if (val < 50)
                    {
                        return(1);
                    }
                    if (val < 150)
                    {
                        return(2);
                    }
                    if (val < 250)
                    {
                        return(3);
                    }
                    if (val < 350)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_ENUTROF:
                    if (val < 50)
                    {
                        return(1);
                    }
                    if (val < 150)
                    {
                        return(2);
                    }
                    if (val < 250)
                    {
                        return(3);
                    }
                    if (val < 350)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_ECAFLIP:
                    if (val < 100)
                    {
                        return(1);
                    }
                    if (val < 200)
                    {
                        return(2);
                    }
                    if (val < 300)
                    {
                        return(3);
                    }
                    if (val < 400)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_IOP:
                    if (val < 100)
                    {
                        return(1);
                    }
                    if (val < 200)
                    {
                        return(2);
                    }
                    if (val < 300)
                    {
                        return(3);
                    }
                    if (val < 400)
                    {
                        return(4);
                    }
                    return(5);
                }
                break;

            case 13:    //Chance
                switch (classID)
                {
                case ClassEnum.CLASS_FECA:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_XELOR:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_SACRIEUR:
                    return(3);

                case ClassEnum.CLASS_SRAM:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_SADIDA:
                    if (val < 100)
                    {
                        return(1);
                    }
                    if (val < 200)
                    {
                        return(2);
                    }
                    if (val < 300)
                    {
                        return(3);
                    }
                    if (val < 400)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_PANDAWA:
                    if (val < 50)
                    {
                        return(1);
                    }
                    if (val < 200)
                    {
                        return(2);
                    }
                    return(3);

                case ClassEnum.CLASS_IOP:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_ENUTROF:
                    if (val < 100)
                    {
                        return(1);
                    }
                    if (val < 150)
                    {
                        return(2);
                    }
                    if (val < 230)
                    {
                        return(3);
                    }
                    if (val < 330)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_OSAMODAS:
                    if (val < 100)
                    {
                        return(1);
                    }
                    if (val < 200)
                    {
                        return(2);
                    }
                    if (val < 300)
                    {
                        return(3);
                    }
                    if (val < 400)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_ECAFLIP:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_ENIRIPSA:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_CRA:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);
                }
                break;

            case 14:    //Agilit�
                switch (classID)
                {
                case ClassEnum.CLASS_FECA:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_XELOR:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_SACRIEUR:
                    return(3);

                case ClassEnum.CLASS_SRAM:
                    if (val < 100)
                    {
                        return(1);
                    }
                    if (val < 200)
                    {
                        return(2);
                    }
                    if (val < 300)
                    {
                        return(3);
                    }
                    if (val < 400)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_SADIDA:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_PANDAWA:
                    if (val < 50)
                    {
                        return(1);
                    }
                    if (val < 200)
                    {
                        return(2);
                    }
                    return(3);

                case ClassEnum.CLASS_ENIRIPSA:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_IOP:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_ENUTROF:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_ECAFLIP:
                    if (val < 50)
                    {
                        return(1);
                    }
                    if (val < 100)
                    {
                        return(2);
                    }
                    if (val < 150)
                    {
                        return(3);
                    }
                    if (val < 200)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_CRA:
                    if (val < 50)
                    {
                        return(1);
                    }
                    if (val < 100)
                    {
                        return(2);
                    }
                    if (val < 150)
                    {
                        return(3);
                    }
                    if (val < 200)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_OSAMODAS:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);
                }
                break;

            case 15:    //Intelligence
                switch (classID)
                {
                case ClassEnum.CLASS_XELOR:
                    if (val < 100)
                    {
                        return(1);
                    }
                    if (val < 200)
                    {
                        return(2);
                    }
                    if (val < 300)
                    {
                        return(3);
                    }
                    if (val < 400)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_FECA:
                    if (val < 100)
                    {
                        return(1);
                    }
                    if (val < 200)
                    {
                        return(2);
                    }
                    if (val < 300)
                    {
                        return(3);
                    }
                    if (val < 400)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_SACRIEUR:
                    return(3);

                case ClassEnum.CLASS_SRAM:
                    if (val < 50)
                    {
                        return(2);
                    }
                    if (val < 150)
                    {
                        return(3);
                    }
                    if (val < 250)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_SADIDA:
                    if (val < 100)
                    {
                        return(1);
                    }
                    if (val < 200)
                    {
                        return(2);
                    }
                    if (val < 300)
                    {
                        return(3);
                    }
                    if (val < 400)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_ENUTROF:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 60)
                    {
                        return(2);
                    }
                    if (val < 100)
                    {
                        return(3);
                    }
                    if (val < 140)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_PANDAWA:
                    if (val < 50)
                    {
                        return(1);
                    }
                    if (val < 200)
                    {
                        return(2);
                    }
                    return(3);

                case ClassEnum.CLASS_IOP:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_ENIRIPSA:
                    if (val < 100)
                    {
                        return(1);
                    }
                    if (val < 200)
                    {
                        return(2);
                    }
                    if (val < 300)
                    {
                        return(3);
                    }
                    if (val < 400)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_CRA:
                    if (val < 50)
                    {
                        return(1);
                    }
                    if (val < 150)
                    {
                        return(2);
                    }
                    if (val < 250)
                    {
                        return(3);
                    }
                    if (val < 350)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_OSAMODAS:
                    if (val < 100)
                    {
                        return(1);
                    }
                    if (val < 200)
                    {
                        return(2);
                    }
                    if (val < 300)
                    {
                        return(3);
                    }
                    if (val < 400)
                    {
                        return(4);
                    }
                    return(5);

                case ClassEnum.CLASS_ECAFLIP:
                    if (val < 20)
                    {
                        return(1);
                    }
                    if (val < 40)
                    {
                        return(2);
                    }
                    if (val < 60)
                    {
                        return(3);
                    }
                    if (val < 80)
                    {
                        return(4);
                    }
                    return(5);
                }
                break;
            }

            return(5);
        }
 /// <summary>
 /// Gets the fees where the session, term and the class is known
 /// </summary>
 /// <param name="session">session</param>
 /// <param name="term">term</param>
 /// <param name="classEnum">class</param>
 /// <returns>ClassTermFees</returns>
 public ClassTermFee GetFees(string session, TermEnum term, ClassEnum classEnum)
 {
     try
     {
         var fees =
             _classTermFees.FirstOrDefault(x => x.Session == session && x.TermEnum == term && x.ClassEnum == classEnum);
         return fees ?? new ClassTermFee();
     }
     catch (Exception ex)
     {
         _log.Error("Error", ex);
         return null;
     }
 }
Example #35
0
        private void GetClassFeatures()
        {
            // Loop through all the currently selected character classes
            foreach (CharacterClassModel charClass in this.charClass.Values)
            {
                // Find the mathching class in the ClassDeck
                foreach (ClassCard c in Decks.ClassDeck.Cards)
                {
                    if (charClass.Name == c.Name)
                    {
                        // Create empty feature list if one doesn't already exist
                        if (this.charClass[c.Name].Features == null)
                        {
                            this.charClass[c.Name].Features = new List <FeaturesModel> {
                            };
                        }

                        for (int i = 1; i <= charClass.Level; i++)
                        {
                            if (c.Levels.ContainsKey(i))
                            {
                                if (c.Levels[i].Features != null)
                                {
                                    foreach (FeaturesModel item in c.Levels[i].Features)
                                    {
                                        if (this.charClass.ContainsKey(c.Name))
                                        {
                                            switch (item.Name)
                                            {
                                            case "ASI":
                                                UpdateAbilityScores(charClass.Name);
                                                break;

                                            case "Combat Superiority":
                                                break;

                                            case "Rage":
                                                if (this.charClass[c.Name].Features.Any(x => x.Name == "Rage"))
                                                {
                                                    return;
                                                }
                                                break;

                                            case "Sneak Attack":
                                                break;

                                            case "Spellcasting":
                                                AddSpellCastingFeatures(item, c.Name);
                                                break;

                                            default:
                                                this.charClass[c.Name].Features.Add(item);

                                                if (item.Name == "Extra Attack")
                                                {
                                                    this.attack++;
                                                }
                                                break;
                                            }

                                            if (item.Action != null)
                                            {
                                                this.actionList.Add(item.Action);
                                            }
                                        }
                                    }
                                }

                                // No variant is set and the SetVariant flag is present, choose a random variant
                                ClassEnum classVariant = ClassEnum.None;
                                if (c.Levels[i].SetVariant && charClass.Variant == null)
                                {
                                    ClassEnum[] variantsList = this.charClassCard.Levels[i].Variants.Keys.ToArray();
                                    classVariant      = variantsList.PickRandomItemFromArray();
                                    charClass.Variant = classVariant.GetEnumText();
                                }
                                else if (charClass.Variant != null)
                                {
                                    Enum.TryParse(charClass.Variant, out ClassEnum cv);
                                    classVariant = EnumUtil.GetValueFromDescription <ClassEnum>(charClass.Variant);
                                    //classVariant = cv;
                                }

                                // Check if class variant exists
                                if (classVariant != ClassEnum.None)
                                {
                                    //Enum.TryParse(charClass.Variant, out ClassEnum classVariant);

                                    // If class variant is found add the relevant features
                                    if (
                                        this.charClassCard.Levels[i].Variants != null &&
                                        this.charClassCard.Levels[i].Variants.ContainsKey(classVariant) &&
                                        this.charClassCard.Levels[i].Variants[classVariant].Features != null
                                        )
                                    {
                                        foreach (FeaturesModel item in this.charClassCard.Levels[i].Variants[classVariant].Features)
                                        {
                                            if (item.Name == "Spellcasting")
                                            {
                                                AddSpellCastingFeatures(item, c.Name);
                                            }
                                            else
                                            {
                                                this.charClass[c.Name].Features.Add(item);

                                                if (item.Name == "Extra Attack")
                                                {
                                                    this.attack++;
                                                }
                                            }

                                            if (item.Action != null)
                                            {
                                                this.actionList.Add(item.Action);
                                            }
                                        }
                                    }
                                }

                                // Set class specific features
                                if (c.Levels[i].BardicInspiration != 0)
                                {
                                    this.bardicInspiration = c.Levels[i].BardicInspiration;
                                }

                                if (c.Levels[i].CombatDice != 0)
                                {
                                    this.combatDice = c.Levels[i].CombatDice;
                                }

                                if (c.Levels[i].KiPoints != 0)
                                {
                                    this.kiPoints = c.Levels[i].KiPoints;
                                }

                                if (c.Levels[i].Rage != 0)
                                {
                                    this.rage = c.Levels[i].Rage;
                                }

                                if (c.Levels[i].RageDamage != 0)
                                {
                                    this.rageDamage = c.Levels[i].RageDamage;
                                }

                                if (c.Levels[i].SneakAttack != 0)
                                {
                                    this.sneakAttack = c.Levels[i].SneakAttack;
                                }
                            }
                        }
                    }
                }
            }
        }