Add a state parameter to dogma_type_has_effect() which checks effect category with given state.