public int GetSpecial(SPECIAL.Type type) { var special = _special.GetSPECIALLvl(type); special += GetTraitSpecialMods(_trait1, type); special += GetTraitSpecialMods(_trait2, type); return(special); }
private static int GetTraitSpecialMods(Trait trait, SPECIAL.Type type) { var special = 0; switch (trait.TraitType) { case Trait.Type.Gifted: special += trait.BenefitAmount; break; case Trait.Type.Bruiser: if (type == SPECIAL.Type.Strength) { special += trait.BenefitAmount; } break; case Trait.Type.NightPerson: if (type == SPECIAL.Type.Intelligence || type == SPECIAL.Type.Perception) { if (WorldClock.Instance != null && WorldClock.Instance.IsNight) { special += trait.BenefitAmount; } else { special += trait.PenaltyAmount; } } break; case Trait.Type.SmallFrame: if (type == SPECIAL.Type.Agility) { special += trait.BenefitAmount; } break; default: break; } return(special); }