public void ReduceBasePoint(enmPropType type, int reducePoint = 1) { PropItem <int> pi = mBasePoints.GetPropItem((int)type); if (pi != null) { pi.SetValue(pi.GetValue() - reducePoint); } }
public void AddBasePoint(enmPropType type, int addPoint = 1) { PropItem <int> pi = mBasePoints.GetPropItem((int)type); if (pi != null) { pi.SetValue(pi.GetValue() + addPoint); } }
public int GetRaceMod(enmPropType type) { PropItem <int> pi = mRaceMod.GetPropItem((int)type); if (pi != null) { return(pi.GetValue()); } return(0); }
public int GetAdvProp(enmPropType type) { PropItem <int> pi = mAdvProp.GetPropItem((int)type); if (pi != null) { return(pi.GetValue()); } return(0); }
public int GetBasePoint(enmPropType type) { PropItem <int> pi = mBasePoints.GetPropItem((int)type); if (pi != null) { return(pi.GetValue()); } return(0); }
public int GetClassMod(enmPropType type) { PropItem <int> pi = mBasePropBonus.GetPropItem((int)type); if (pi != null) { return(pi.GetValue()); } return(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); }
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); }