I'm not too sure, but I think adding [0] , [1] , [2] .. and so on determines the position in your party. So if you wanted to check all 6 slots, you could add all 6 lines of !if.shadow with the [0] stuff behind.
Though, regrettably I'm not sure where exactly to place the [0]s