public static float GetSpellSuccessChance(Pawn caster, Pawn victim, bool usePsychicSensitivity = true) { float successChance; float penetration = TM_Calc.GetSpellPenetration(caster); float resistance = TM_Calc.GetArcaneResistance(victim, usePsychicSensitivity); successChance = 1f + penetration - resistance; return(successChance); }