some changes to calculate partial spell resistance