Tehran said it would “leave no act of hostility unanswered,” complicating negotiations to end the war.