Exemplo n.º 1
0
        public void ReduceBasePoint(enmPropType type, int reducePoint = 1)
        {
            PropItem <int> pi = mBasePoints.GetPropItem((int)type);

            if (pi != null)
            {
                pi.SetValue(pi.GetValue() - reducePoint);
            }
        }
Exemplo n.º 2
0
        public void AddBasePoint(enmPropType type, int addPoint = 1)
        {
            PropItem <int> pi = mBasePoints.GetPropItem((int)type);

            if (pi != null)
            {
                pi.SetValue(pi.GetValue() + addPoint);
            }
        }
Exemplo n.º 3
0
        public int GetRaceMod(enmPropType type)
        {
            PropItem <int> pi = mRaceMod.GetPropItem((int)type);

            if (pi != null)
            {
                return(pi.GetValue());
            }
            return(0);
        }
Exemplo n.º 4
0
        public int GetAdvProp(enmPropType type)
        {
            PropItem <int> pi = mAdvProp.GetPropItem((int)type);

            if (pi != null)
            {
                return(pi.GetValue());
            }
            return(0);
        }
Exemplo n.º 5
0
        public int GetBasePoint(enmPropType type)
        {
            PropItem <int> pi = mBasePoints.GetPropItem((int)type);

            if (pi != null)
            {
                return(pi.GetValue());
            }
            return(0);
        }
Exemplo n.º 6
0
        public int GetClassMod(enmPropType type)
        {
            PropItem <int> pi = mBasePropBonus.GetPropItem((int)type);

            if (pi != null)
            {
                return(pi.GetValue());
            }
            return(0);
        }
Exemplo n.º 7
0
        private void RecalcAdvanceProps()
        {
            int hp = 0;

            hp += mClassModule.GetClassMod(enmPropType.HP);
            PropItem <int> piMod = mPropMod.GetPropItem((int)enmPropType.CON);

            if (piMod != null)
            {
                hp += piMod.GetValue();
            }
            mAdvProp.SetPropItem((int)enmPropType.HP, hp);

            int ab = 0;

            ab += mClassModule.GetClassMod(enmPropType.ATTACK_BONUS);

            piMod = mPropMod.GetPropItem((int)enmPropType.STR);
            if (piMod != null)
            {
                ab += mPropMod.GetPropItem((int)enmPropType.STR).GetValue();
                if (ab < 0)
                {
                    ab = 0;
                }
            }
            mAdvProp.SetPropItem((int)enmPropType.ATTACK_BONUS, ab);

            int ac = 10;

            piMod = mPropMod.GetPropItem((int)enmPropType.DEX);
            if (piMod != null)
            {
                ac += piMod.GetValue();
            }
            mAdvProp.SetPropItem((int)enmPropType.ARMOR_CLASS, ac);
        }
Exemplo n.º 8
0
        public int GetLevelById(byte classId)
        {
            if (mClassLevels == null)
            {
                return(0);
            }

            PropReference <int> pr;

            if (mClassLevels.TryGetValue(classId, out pr))
            {
                PropItem <int> pi = pr.GetPropItem();
                if (pi != null)
                {
                    return(pi.GetValue());
                }
            }
            return(0);
        }