Local rules for protein folding on a triangular lattice and generalized hydrophobicity in the HP model