Code:
0 hit = 0% TP return
1 hit (first swing hit) = Base TP return %
1 hit (first swing miss) = 1,STP%
2 hits (first swing hit) = Base TP return + 1,STP%
2 hits (first swing miss) = 2,STP%
3 hits (first swing hit) = Base TP return + 2,STP%
3 hits (first swing miss) = 3,STP%
4 hits = Base TP return + 3,STP%
STP= StoreTP%
You got the TP return wrong for the 3 situations in bold. I have corrected them and added a case which I didn't think of (missing all 4 swings).
The testing would be easier if the tester used 0 sTP, as this would make the TP returns 'easier' to read.