There are multiple solutions for this but it depends on the details. Do you want the piranha to still animate when Mario is near? Hunter's solution will do if the answer is yes.
If you want to stop the animation, you can *probably* add:
LDA !C2,x ; sprite state
And it should work.