コード例 #1
0
 public CharacterAbilityClass()
 {
     NumAbilities        = Enum.GetNames(typeof(Abilities)).Length;
     MaxAbilityTomeBonus = Model.Tome.TomeModel.GetMaxBonus(Model.AbilityModel.GetIdFromName("Strength"));
     BaseStat            = new int[NumAbilities];
     BaseStatRaise       = new int[NumAbilities];
     LevelUp             = new Abilities[Constant.MaxLevels];
     for (int i = 0; i < Constant.MaxLevels; i++)
     {
         LevelUp[i] = Abilities.Strength;
     }
     Tome                 = new int[NumAbilities, MaxAbilityTomeBonus];
     PriorLifeTome        = new int [NumAbilities, MaxAbilityTomeBonus];
     Feat                 = new int[NumAbilities];
     Enhancement          = new int[NumAbilities];
     Destiny              = new int[NumAbilities];
     Gear                 = new int[NumAbilities];
     TotalStatRaisePoints = 28;
     BuildType            = BuildPointType.None;
 }
コード例 #2
0
        public void SetBuildType(BuildPointType type, bool set)
        {
            if (!set)
            {
                BuildType = BuildType & ~type;
            }
            else
            {
                BuildType = BuildType | type;
            }

            //checks (drow and iconic are mutually exclusive)
            if (type == BuildPointType.Drow)
            {
                BuildType = BuildType & ~BuildPointType.Iconic;
            }
            if (type == BuildPointType.Iconic)
            {
                BuildType = BuildType & ~BuildPointType.Drow;
            }

            //deterine the correct number of build points
            if ((BuildType & BuildPointType.Drow) != 0)
            {
                if ((BuildType & BuildPointType.ThirdLife) != 0)
                {
                    TotalStatRaisePoints = 32;
                }
                else if ((BuildType & BuildPointType.SecondLife) != 0)
                {
                    TotalStatRaisePoints = 30;
                }
                else
                {
                    TotalStatRaisePoints = 28;
                }
            }
            else
            {
                if ((BuildType & BuildPointType.ThirdLife) != 0)
                {
                    TotalStatRaisePoints = 36;
                }
                else if ((BuildType & BuildPointType.SecondLife) != 0)
                {
                    TotalStatRaisePoints = 34;
                }
                else if ((BuildType & BuildPointType.Iconic) != 0)
                {
                    TotalStatRaisePoints = 32;
                }
                else if ((BuildType & BuildPointType.Favor) != 0)
                {
                    TotalStatRaisePoints = 32;
                }
                else
                {
                    TotalStatRaisePoints = 28;
                }
            }
        }