public int ApplyFatigue(int rFtg, FatigueType type = FatigueType.General) { int eFtg = CalculateEffectiveFatigue(rFtg, type); AddStatusEffect(new StatusEffect(1, 2, eFtg)); return(eFtg); }
public static int CalculateEffectiveFatigue(int rFtg, FatigueType type, params IAttributeCollection[] attributeSets) { switch (type) { case FatigueType.Movement: // eFtg = ROUND(rFtg * (1 + Ftg_pm) * (1 + Ftg_p)) return(Mathf.RoundToInt(rFtg * (1 + AttributeSet.Sum(AttributeType.Ftg_pm, attributeSets)) * (1 + AttributeSet.Sum(AttributeType.Ftg_p, attributeSets)))); default: // eFtg = ROUND(rFtg * (1 + Ftg_p)) return(Mathf.RoundToInt(rFtg * (1 + AttributeSet.Sum(AttributeType.Ftg_p, attributeSets)))); } }
public int CalculateEffectiveFatigue(int rFtg, FatigueType type = FatigueType.General) { return(CalculateEffectiveFatigue(rFtg, type, talents, statusEffects)); }