Okies .. now I know what you are trying to do, I see the problem ... you are trying to do the second part D2=2 as a separate calculation .. when it needs to be nested as the "result" of the first IF failing
along the lines of if D2=1 (answer is),(IF d2=2 (answer is different)) ....

I think you'll find this works ...
=IF(AND((B2="W"),(D2=1)),(F1+C2+1),(IF(AND((B2="W"),(D2>1)),(F1-1))))
so we have an IF(AND((item1test),(item2test)),(if bothtrueresult),(
ifnottrueresult)) and you enter the second set of tests in the
ifnottrueresult, so if items1 or item2 are FALSE then the second test IF(AND((item1testagain),(item2testagain)),(if bothtrueresult),(
ifnottrueresult)) and then you can enter another set of tests in
ifnottrueresult and do a third set of tests ... and you can do this up to 64 times !!! although the line gets stupidly long !!! and very difficult to error check. Lookup table is easier

That reads really badly ... so I'll try it this way ...
IF (item1testtrue AND item2testtrue),trueresult,[false result is (IF(item1testagaintrue AND item2testagaintrue),truesresult2),([falseresult ......])]
given your figures we get
IF(AND [w,1] 0+5+1=6, (IF AND[w,2], 0-1=-1,))
HTH